account-invoicing
account-invoicing copied to clipboard
[16.0][MIG] account_invoice_date_due: Migration to 16.0
@smussie change de name PR to [16.0][MIG] account_invoice_date_due: Migration to 16.0
@smussie from 15.0 to 16.0 the field invoice_date_due became computed. That changes the way we can assert permissions to write on the field via Form.
v15 vs v16
I changed the code to control the rights of the user to write on the field invoice_date_due on the backend. This is now done via inverse compute method _inverse_invoice_date_due.
Hi @smussie
Please could you take into account these two steps from the migration wiki? (https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0)
- Check https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests for a procedure for reducing commits from "OCA Transbot...".
- Add tests to increase code coverage.
Functional review OK.
/ocabot migration account_invoice_date_due
Hello @smussie !
Thank you for this migration, in order to get it meged please attend @JavierIniesta comments in
https://github.com/OCA/account-invoicing/pull/1447#issuecomment-1602360825
Hi @smussie
Please could you take into account these two steps from the migration wiki? (https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-16.0)
Check https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests for a procedure for reducing commits from "OCA Transbot...". Add tests to increase code coverage.
This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖
Hi, When you change invoice date due, it works correctly and it changes the account move lines Date Due, But when you reset the invoice to draft and you confirm it again, the account move lines date due doesnt update.
Please, include this changes https://github.com/OCA/account-invoicing/pull/1576/commits/9511a9f06be41edfe17c0fbcae87e62e3e45c605
Hii @smussie could you please update this?
@smussie ??
@smussie ??
I'm taking this over. I just squashed the translation commits, and I'll include https://github.com/OCA/account-invoicing/commit/9511a9f06be41edfe17c0fbcae87e62e3e45c605 later today.
I'll check the tests (they are green on my computer :-/ )
the issue with reset to draft seems to be an odoo issue, and the workaround i tried has nasty side effects -> i'm dropping it for now.
What I found is that in the sync_dynamic_line context manager during the call to button_draft, we get here https://github.com/odoo/odoo/blob/01197ebdfa0f2930fa058e95af624eccc06ac2ab/addons/account/models/account_move.py#L2104
-> the needed_after and needed_before are identical -> no further processing is done.
However the existing_before and existing_after are different and the date_maturity in existing_after is different from the one in needed_after -> I would expect the code to fix things in this case.
I'm lost...
See https://github.com/odoo/odoo/blob/01197ebdfa0f2930fa058e95af624eccc06ac2ab/addons/account/models/account_move.py#L2104 for a test that illustrates the issue found by @ipconinpe
merge?
merge?
@gurneyalex is it OK for you?
/ocabot rebase
@etobella The rebase process failed, because command git push --force camptocamp tmp-pr-1447:16.0-mig-account_invoice_date_due failed with output:
remote: Permission to camptocamp/account-invoicing.git denied to OCA-git-bot.
fatal: unable to access 'https://github.com/camptocamp/account-invoicing/': The requested URL returned error: 403
@gurneyalex How do you want to proceed with the problem found? Maybe we can the issue in the ROADMAP and continue with the merge?
@gurneyalex is this OK for merge?
merge?
can it be merged?
@gurneyalex @etobella is it possible to merge?
@gurneyalex Can you help us with this?
@simahawk
Hello, correct functional test in my flow. what's about merge?
merge?
Sorry, I missed previous notifications and @smussie is not with us anymore :innocent:
/ocabot merge nobump
On my way to merge this fine PR! Prepared branch 16.0-ocabot-merge-pr-1447-by-simahawk-bump-nobump, awaiting test results.