Repository navigation
Conversation
[FIX] - as date_start is required, constraints on it become useless [FIX] - for finished contract _get_lines_to_invoice should return False [FIX] - default value for active field in contract line [FIX] - fix flake8 [IMP] - check invoice line vals before assignment [FIX] - Fix unit tests. [FIX] - do not copy last_date_invoiced on plan_successor [FIX] - renew only recurring_invoices contract [FIX] - filter by termination_notice for contract line to renew [IMP] - Improve inprogress search filter [IMP] - Link invoice line to contract lines [IMP] - Add index on contract line [IMP] - Add is_suspended flag and _search_state [IMP] - Add is_suspended flag to stop contract line [MV] - move onchange method to contract_product module [IMP] - Replace is_suspended flag by manual_renew_needed Add a computed field for the first date of the termination notice period Adapt state compute and search method [IMP] - Improve unit tests
[ADD] Contract: new contributor [REF] Contract: indexes
…ll + rename recurring_interval to Invoice Every
[ADD] Contract: invoice partner
[REF] - refactoring for compute_first_date_end [RMV] - remove auto_renew_rule_type option monthlylastday [IMP] - rename manual_renew_needed label [IMP] - use get_product_multiline_description_sale to get contract line description
[FIX] - manual_renew_needed should be visible to all contract users [REF] - add _get_next_invoiced_period method [FIX] - Fix In progress contract filter [REF] - add method to get quantity to invoice the contract line quantity can be in some use cases variable, to simplify the way it is changed we add a new method _get_quantity_to_invoice. [FIX] - Onchange contract line don't reste contract lines [FIX] - Rename _get_invoiced_period to _get_period_to_invoice [ADD] - Add stop_at_date_end to _get_period_to_invoice [FIX] - Remove useless filter [FIX] - don't play onchange date_start for old lines on contract template change [FIX] - Fix stop post message [FIX] - Fix sale_contract_count should count all partner contract [FIX] - set recurring_next_date to False if contract line stoped at last date invoiced [FIX] - Group by next_invoice also considers dates in the past [IMP] - A canceled contract line can't be set to auto-renew [REF] Contract: pep8 [IMP] Contract: update USAGE section of README [IMP]call onchange_is_auto_renew when changing template
[REF] use context_today instead of time in filters [REF] Contract: split from analytic account [REF] Contract Sale Invoicing: split from analytic account [REF] Contract Sale Invoicing: update translations [IMP] - Assert that the predecessor is available for new link at uncancel [RMV] - remove usless changes [RMV] - Remove usless field recurring_invoices after the total isolation between contract model and account analytic one. recurring_invoices which was used to mark analytic account as contract became usless [IMP] - P3 syntax [IMP] - use @openupgrade.migrate() and openupgrade.logged_query [IMP] - drop transient table in migration script
[RMV] - Remove empty file [IMP] - Update no_update cron after migration [IMP] - move contract template recurrence info to line level [FIX] - Fix contract line model description [IMP] - Link contracts to analytic accounts [FIX] - Fix pylint [IMP] - Move chatter and attachments from analytic account to contract [IMP] - Move account_analytic_id to contract line level [IMP] - Improve version check in migration script [IMP] - Move contracts followers from analytic accounts [ADD] - Add mail.activity.mixin to contract.contract model remove data drop from migration scripts [12.0][FIX] - Fix _init_last_date_invoiced fix flake8 [ADD] - Update contributors list
* Remove incorrect oldname attributes. * Add filter on partners for running contracts (+ a support o2m field for that). * Cover more tables in model renaming + cleaner code using a loop. * Don't copy contract lines, but rename table + copy contract records on pre. * Contract code is now populated to "Reference/Description" field in invoice. * Order on new contract model has been restored to the same as old analytic accounts.
Currently translated at 100.0% (211 of 211 strings) Translation: contract-12.0/contract-12.0-contract Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/zh_CN/
Remove string attribute
Currently translated at 96.2% (204 of 212 strings) Translation: contract-12.0/contract-12.0-contract Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/it/
As v11 takes salesman from linked partner and now the salesman is a field in the contract that is initialized to current user, we need to assign to the recently converted contracts following old logic, or they will have admin as responsible.
Currently translated at 78.8% (167 of 212 strings) Translation: contract-12.0/contract-12.0-contract Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/de/
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 61.3% (130 of 212 strings) Translation: contract-12.0/contract-12.0-contract Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/ca/
Currently translated at 100.0% (212 of 212 strings) Translation: contract-12.0/contract-12.0-contract Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/pt_BR/
Done through `oldname`.
Currently translated at 98.1% (208 of 212 strings) Translation: contract-12.0/contract-12.0-contract Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/nl/
…s + Fix contract report
Currently translated at 100.0% (212 of 212 strings) Translation: contract-12.0/contract-12.0-contract Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/es/
…tract partner label + contract company must be the same as the sale order - multi-company record rules on contract line causes performance issue - the label Partner (always False) don't make any sens - When creating a contract from a sale order the company must be the sale order company and not the user company
Don't transfer to contract those analytic accounts with the "Recurring invoicing" flag unchecked.
Currently translated at 21.7% (46 of 212 strings) Translation: contract-12.0/contract-12.0-contract Translate-URL: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract/hr/
max3903
left a comment
There was a problem hiding this comment.
Left to fix
- Portal home count never runs.
_prepare_home_portal_valuesis not called in 20.0 (/my/countersuses_prepare_portal_counter_values). Override that forcontract_count, asaccountandsaledo, or the Contracts card on/mystays at 0. - Add
maintainersto__manifest__.py.
|
/ocabot migration contract |
3f56e7c to
3636f37
Compare
|
The following commit authors need to sign the Contributor License Agreement: |
bm1-phillip
left a comment
There was a problem hiding this comment.
Functional review on Odoo 20.0 Community (nightly 20261110), l10n_de (SKR03), head 3636f37. We run this module in production on 19.0 for our recurring invoices.
The 78 tests pass (the portal tour is skipped here, there is no browser in my image), no warnings from the module in the server log.
What we use works, checked in a shell with contracts created through the ORM:
- Monthly post-paid with the next invoice on the 1st: the period is the previous month, the invoice is dated the 1st,
#START#and#END#are replaced in the partner's date format, and the next date moves one month on. - Half-yearly and yearly pre-paid contracts.
cron_recurring_create_invoice()invoices what is due and nothing else.
One problem in the form view: section and note lines are shown as empty rows.
- Open a customer contract with a product line.
- "Add a section", enter a title, "Save & Close".
- The new row is there, but empty. Note lines look the same.
The browser console says Missing widget: product_label_section_and_note_field for field of type many2one and Missing widget: section_and_note_text for field of type text. views/contract.xml (both line lists) and views/contract_template.xml still use these field widgets. They are gone in 20.0: the invoice lines in account/views/account_move_views.xml now use account_product_field and text inside the product_label_section_and_note_field_o2m list.
notsebtho
left a comment
There was a problem hiding this comment.
Tested on Odoo 20.0 at 3636f37, together with #1568, #1574 and #1575. The four modules install cleanly and the combined test run passes (132 tests, 0 failed, 0 errors). Three of our demo databases that use contracts (a logistics company, a coworking space and a gym) also install with no errors.
On the open points:
- The portal counter from max3903's review looks fixed:
_prepare_portal_counter_valuesnow handlescontract_count, and the Contracts card is aportal.entryrecord. maintainersis in the manifest now, but as an empty list.- I can confirm the widget problem bm1-phillip reported.
product_label_section_and_note_fieldandsection_and_note_textaren't registered anywhere in Odoo 20.0. They're used on theproduct_idandnamefields of both line lists inviews/contract.xml(lines 168, 173, 255 and 260) and onnameinviews/contract_template.xml(line 65). The invoice lines inaccount_move_views.xmlnow usewidget="account_product_field"onproduct_idandwidget="text"onname, inside theproduct_label_section_and_note_field_o2mlist, which contract already uses. Switching to those should fix the empty section and note rows.
I'll approve once the widgets are fixed.
3636f37 to
8e4effe
Compare
fcvalgar
left a comment
There was a problem hiding this comment.
Hi @Borruso ,
During the functional testing of this migration, we detected a permissions issue.
Steps to reproduce:
- Log in with a user who has Accounting / Billing permissions (account.group_account_invoice), without Accounting Administrator rights.
- New contract.
- Try to add a new contract line.
Current behavior (20.0):
The user cannot create contract lines unless Accounting Administrator permissions are granted.
Expected behavior:
Users with Billing permissions should be able to create and manage contract lines without requiring administrator rights, as we have verified in our 19.0 environment.
Technical findings:
The relevant configuration appears to be in contract/security/ir.access.csv, specifically the contract_line_user entry:
contract_line_user,Recurring user,model_contract_line,account.group_account_invoice,r,
This entry grants read-only access to contract.line.
However, the equivalent ACL in 19.0 was also read-only, so the issue may be related to changes in the security framework, effective group permissions, or the contract line creation workflow.
Could you please review this behavior and restore the expected permissions for Billing users?
It would also be useful to add a regression test verifying that a Billing user can create and edit contract lines without Accounting Administrator rights.
Thanks for your work on this migration!
8e4effe to
c276713
Compare
|
sorry I misunderstood they said to add the maintainers tag and I added myself by mistake |
chienandalu
left a comment
There was a problem hiding this comment.
Hi, @Borruso
I found some major issues regarding security, the rules+access don't seem to be merged properly. Did you use https://github.com/odoo/odoo/blob/20.0/odoo/upgrade_code/19.4-00-ir-access.py ?
#1553