Skip to content

[20.0] [MIG] contract_sale: Migration to 20.0 - #1568

Open
Borruso wants to merge 37 commits into
OCA:20.0from
Borruso:20.0-mig-contract_sale
Open

Borruso wants to merge 37 commits into
OCA:20.0from
Borruso:20.0-mig-contract_sale

Conversation

@Borruso

@Borruso Borruso commented Oct 23, 2026

Copy link
Copy Markdown

Luis M. Ontalba and others added 30 commits October 23, 2026 16:50
* README by fragments
* Adjusted dependency
* Changed root menu XML-ID
[REF] Contract Sale: update translations
The lowest model access for contract.contract model is group_account_invoice group. However the addon adds two smart buttons to res.partner view without any security restrictions and without compute_sudo attribute on computed fields.
This causes the view to crash when a user without the proper permissions tries to access the res.partner form view.
The solution adds groups_id to the partner form views in which the buttons are added, so the only loads when the user has proper permissions.
Other way to solve it would be to add compute_sudo attribute to the relevant fields, but this causes an access error when the user clicks on the smart buttons.
Currently translated at 100.0% (1 of 1 strings)

Translation: contract-12.0/contract-12.0-contract_sale
Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract_sale/es_CL/
[BOT] post-merge updates

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: contract-17.0/contract-17.0-contract_sale
Translate-URL: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-contract_sale/

@bm1-phillip bm1-phillip left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functional review on Odoo 20.0 Community (nightly 20261110), l10n_de (SKR03), together with #1566. We use this module in production on 19.0.

The 4 tests pass, no warnings from the module in the log. A user who only has the Sales group "User: Own Documents Only" and no accounting rights can read and create contracts and add lines (checked with the ORM as that user). LGTM.

@notsebtho notsebtho left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Odoo 20.0 at 584a3b6, together with #1566, #1574 and #1575. The combined test run for the four modules passes (132 tests, 0 failed, 0 errors).

Approving. The "unreleased dependencies" check should clear once #1566 is merged.

Comment thread contract_sale/security/ir.access.csv Resolved
@bm1-phillip

Copy link
Copy Markdown

Regarding the comment on ir.access.csv: I re-tested this at 584a3b6 on top of #1566 (c276713) with two users who only have "User: Own Documents Only". User A finds his own contracts and those without a salesperson, not the ones of user B; reading or writing B's contract and adding a line to it are refused. So the restriction holds: the CSV entry contract_contract_salesman carries the same domain as contract_contract_own_salesman. The two are duplicates, one of them could go.

Lines of B's contracts can still be read directly on contract.line, as in 19.0, where there is no rule on lines either. A user who also has Invoicing sees all contracts through the main module, also as in 19.0.

@Borruso
Borruso force-pushed the 20.0-mig-contract_sale branch from 584a3b6 to b4744f6 Compare November 16, 2026 09:10
@oca-cla-bot

oca-cla-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.