Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring to create staff user for Representation Virtual Office #18

Open
wants to merge 103 commits into
base: main
Choose a base branch
from

Conversation

javikalsan
Copy link
Contributor

@javikalsan javikalsan commented Sep 30, 2024

Description

Due to the annexation of the Representation ERP to Commercialization one, we carried out this refactor to create and identify the staff user in a more consistent way in this new scenario.

Changes

  • Specify in visible strings the word representation to distinguish from commercialization properly
  • New implementation to create and identify the user staff for Representation Virtual Office, considering more complex cases we can find in comer erp (dupped nifs, users already with addresses...)

Checklist

Justify any unchecked point:

  • Changed code is covered by tests.
  • Relevant changes are explained in the "Unreleased" section of the CHANGES.md file.
  • That section includes "Upgrade notes" with any config, dependency or deploy tweek needed on development and server setups. -> None beyond the normal update process
  • Changes on the setup process (development, testing, production) have been updated in the proper documentation. -> None beyond the normal update process

Observations

N/A

Please, review

  • ORM Many2Many abstraction
  • Tests helpers
  • Production code helpers
  • Feedback: what is the partner address order? We concluded order is id ASC

How to check the new features

Tests driven

./dodestral.sh -m som_ov_users --no-requirements -t test_res_users.ResUsersTests
./dodestral.sh -m som_ov_users --no-requirements

Via OpenERP client

  • Go to Administration - Users, here you'll find the wizard clicking in Actions button

Deploy notes

N/A

@javikalsan javikalsan assigned javikalsan and vokimon and unassigned javikalsan Sep 30, 2024
@javikalsan javikalsan added the ask Integration will be blocked until reviewed label Sep 30, 2024
Copy link

sonarqubecloud bot commented Oct 2, 2024

@vokimon vokimon requested a review from destanyol October 2, 2024 13:48
MariteSomEnergia and others added 23 commits November 7, 2024 12:10
Co-authored-by: David García Garzón <[email protected]>
with comer and repre integration, we have two
ov's, so lets explicit which one the texts
refer to.

Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
besides having a partner address

Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
test__ovrepre_provisioning_data__non_staff_with_linked_secondary_address

Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
javikalsan and others added 27 commits November 7, 2024 12:10
- The field value strategy to handle readonly was causing
the imposibility to modify the value when leaving the
input focus and the unexpected behavior of setting field
value to `False`
Co-authored-by: David García Garzón <[email protected]>
Field readonly was sent depending on having a value.
When the user gave a value, the field could not be
edited anymore.

Also readonly fields, are not used to update wizard
data so whichever we store as readonly is received
as False.

So we decoupled the real value of the fields from
the attribute telling that it should be readonly.
And considering that we could receive False for the values.

Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
- Declaring required in view is breaking the readonly
behavior and required was not working properly. Declaring
the required field behavior in the model is working.

Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
The lesser address id related to a partner is considered
the primary one. So in order to make the unlinked address
to be considered a secondary one we must assure that
the secondary address is defined the later in the xml.

Co-authored-by: David García Garzón <[email protected]>
Co-authored-by: David García Garzón <[email protected]>
@oriolpiera oriolpiera force-pushed the REF_create_staff_user branch from 2204f03 to 61d5ed6 Compare November 7, 2024 11:11
Copy link

sonarqubecloud bot commented Nov 7, 2024

Copy link

github-actions bot commented Nov 7, 2024

Test Results

122 tests   122 ✅  6s ⏱️
  2 suites    0 💤
  2 files      0 ❌

Results for commit 61d5ed6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ask Integration will be blocked until reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants