-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
[18.0][MIG] account_invoice_start_end_dates: Migration to 18.0 #309
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] account_invoice_start_end_dates: Migration to 18.0 #309
Conversation
Extract a new module account_invoice_start_end_dates from account_cutoff_prepaid
…art_end_dates: fixing tests fixing product not found convert mline dates to string fixing flake8 account_invoice_start_end_dates: fixing tests fixing product not found convert mline dates to string fixing flake8 putting removed licences back fix tests fix flake8 fix pylint issues [12.0-mig-account] fix unit tests fixup! [12.0-mig-account] fix unit tests fixup! fixup! [12.0-mig-account] fix unit tests
Default value for cutoff date is end date of previous fiscal year
Currently translated at 88.2% (15 of 17 strings) Translation: account-closing-14.0/account-closing-14.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-14-0/account-closing-14-0-account_invoice_start_end_dates/fr_FR/
Currently translated at 100.0% (14 of 14 strings) Translation: account-closing-14.0/account-closing-14.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-14-0/account-closing-14-0-account_invoice_start_end_dates/pt/
Currently translated at 100.0% (14 of 14 strings) Translation: account-closing-14.0/account-closing-14.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-14-0/account-closing-14-0-account_invoice_start_end_dates/it/
Currently translated at 100.0% (14 of 14 strings) Translation: account-closing-15.0/account-closing-15.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-15-0/account-closing-15-0-account_invoice_start_end_dates/fr/
Currently translated at 100.0% (14 of 14 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/de/
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/it/
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/hr/
Currently translated at 15.3% (2 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/fa/
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/fr/
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/fr_FR/
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/it/
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/it/
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/fr/
Remove deprecated POT files
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/es/
Currently translated at 92.3% (12 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/hr/
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-16.0/account-closing-16.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-16-0/account-closing-16-0-account_invoice_start_end_dates/fr/
Co-authored-by: Alexis de Lattre <[email protected]>
Currently translated at 100.0% (13 of 13 strings) Translation: account-closing-17.0/account-closing-17.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-17-0/account-closing-17-0-account_invoice_start_end_dates/it/
ed5e932
to
fc3030f
Compare
Co-authored-by: Do Anh Duy <[email protected]>
fc3030f
to
6f26308
Compare
0, | ||
0, | ||
{ | ||
"product_id": self.env.ref("product.product_product_5").id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at this test case i guess we test positive case here - all previous lines have dates set and we don't expect any error to be raised for product_product_5 because probably this product has no flag set - i'd maybe add some comments in this case + test negative case (where error should be raised)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if moveline.start_date and not moveline.end_date:
...
if moveline.end_date and not moveline.start_date:
...
if (
moveline.end_date
and moveline.start_date
and moveline.start_date > moveline.end_date
):
hi @ajaniszewska-dev, I had the same question as you, I'm not sure what the author of this module intended, because the above conditions require at least 1 value to be assigned to start_date
and end_date
, so if no value is inputed, no error will be raised. I tried adding a filter in the lookup function like:
def _check_start_end_dates(self):
for moveline in self.filtered("must_have_date"):
...
then the error will be raised, and I wonder if that change affects the original purpose of this module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexis-via probably your input here would be valuable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, i'd slightly improve test
supersedes: #307