-
Notifications
You must be signed in to change notification settings - Fork 0
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
[17.0][MIG] account_invoice_start_end_dates: Migration to 17.0 #4
base: 17.0
Are you sure you want to change the base?
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
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-closing-12.0/account-closing-12.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-12-0/account-closing-12-0-account_invoice_start_end_dates/
Default value for cutoff date is end date of previous fiscal year
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-closing-13.0/account-closing-13.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-13-0/account-closing-13-0-account_invoice_start_end_dates/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: account-closing-13.0/account-closing-13.0-account_invoice_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/account-closing-13-0/account-closing-13-0-account_invoice_start_end_dates/
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% (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
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. 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/
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. 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/
Co-authored-by: Alexis de Lattre <alexis@via.ecp.fr>
782cc5a
to
52eedd7
Compare
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.
Pre-commit message is incorrect
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.
==> Tree view start_end_dates.view_move_line_tree
at the line <field name="must_have_dates" invisible="1" />
replace invisible
by column_invisible
@@ -20,9 +20,8 @@ def _post(self, soft=True): | |||
raise UserError( | |||
_( | |||
"Missing Start Date and End Date for invoice " | |||
"line with Product '%s' which has the " | |||
"line with Product '{line.product_id.display_name}' which has the " |
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.
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.
replace "line with Product '{line.product_id.display_name}' which has the "
by f"line with Product '{line.product_id.display_name}' which has the "
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.
are you sure about that? why not keeping the same translation string and use form _("", line.product_id.display_name)
?
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.
you're right, i made a mistake. @lethuthao2403 waits for me to have a look, will inform you then.
@@ -19,11 +19,11 @@ def _check_start_end_dates(self): | |||
for moveline in self: | |||
if moveline.start_date and not moveline.end_date: | |||
raise ValidationError( | |||
_("Missing End Date for line '%s'.") % (moveline.display_name) | |||
_("Missing End Date for line '{moveline.display_name}'.") |
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.
string parsing is incorrect
) | ||
if moveline.end_date and not moveline.start_date: | ||
raise ValidationError( | ||
_("Missing Start Date for line '%s'.") % (moveline.display_name) | ||
_("Missing Start Date for line '{moveline.display_name}'.") |
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.
string parsing is incorrect
52eedd7
to
61885c8
Compare
@nguyenminhchien the PR has been updated. Thank you! |
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.
I made a mistake about fstring, i add some suggestion, please update
) | ||
if moveline.end_date and not moveline.start_date: | ||
raise ValidationError( | ||
_(f"Missing Start Date for line '{moveline.display_name}'.") |
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.
_(f"Missing Start Date for line '{moveline.display_name}'.") | |
_("Missing Start Date for line '%s'.", moveline.display_name) |
for moveline in self: | ||
if moveline.start_date and not moveline.end_date: | ||
raise ValidationError( | ||
_(f"Missing End Date for line '{moveline.display_name}'.") |
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.
_(f"Missing End Date for line '{moveline.display_name}'.") | |
_("Missing End Date for line '%s'.", moveline.display_name) |
"Missing Start Date and End Date for invoice " | ||
f"line with Product '{line.product_id.display_name}' which has the " | ||
"property 'Must Have Start/End Dates'." | ||
) |
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.
@lethuthao2403 please help to refactor:
raise UserError(
_(
"Missing Start Date and End Date for invoice "
"line with Product '%s' which has the "
"property 'Must Have Start/End Dates'.",
line.product_id.display_name,
)
)
61885c8
to
76f32b4
Compare
@nguyenminhchien the PR has been updated! Thank you. |
ead9c00
to
f499d0e
Compare
f499d0e
to
e075a60
Compare
No description provided.