-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
[16.0][MIG] agreement_rebate: Migration to 16.0 #21
Conversation
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: agreement-15.0/agreement-15.0-agreement_rebate Translate-URL: https://translation.odoo-community.org/projects/agreement-15-0/agreement-15-0-agreement_rebate/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: agreement-15.0/agreement-15.0-agreement_rebate Translate-URL: https://translation.odoo-community.org/projects/agreement-15-0/agreement-15-0-agreement_rebate/
domain="[('domain', '=', domain)]" | ||
options="{'no_create': True}" | ||
widget="many2many_tags" | ||
nolabel="1" |
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.
nolabel="1" | |
nolabel="1" | |
colspan="2" |
domain="[('agreement_type_id.domain', '=', domain)]" | ||
options="{'no_create': True}" | ||
widget="many2many_tags" | ||
nolabel="1" |
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.
nolabel="1" | |
nolabel="1" | |
colspan="2" |
domain="[('line_ids.agreement_id.agreement_type_id.domain', '=', domain)]" | ||
options="{'no_create': True}" | ||
widget="many2many_tags" | ||
nolabel="1" |
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.
nolabel="1" | |
nolabel="1" | |
colspan="2" |
widget="many2many_tags" | ||
domain="[('type', '=', domain)]" | ||
options="{'no_create': True}" | ||
nolabel="1" |
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.
nolabel="1" | |
nolabel="1" | |
colspan="2" |
domain="[('domain', '=', domain)]" | ||
options="{'no_create': True}" | ||
widget="many2many_tags" | ||
nolabel="1" |
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.
nolabel="1" | |
nolabel="1" | |
colspan="2" |
domain="[('agreement_type_id.domain', '=', domain)]" | ||
options="{'no_create': True}" | ||
widget="many2many_tags" | ||
nolabel="1" |
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.
nolabel="1" | |
nolabel="1" | |
colspan="2" |
raise UserError( | ||
_("Please define an accounting sales journal for" " this company.") | ||
) | ||
vinvoice = self.env["account.move"].new( |
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.
In this version, now you can avoid this and directly use the original dictionary. See for example:
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.
Sorry, I'm not getting your point, on V15 same function exists
https://github.com/odoo/odoo/blob/15.0/addons/account/tests/common.py#L644
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.
Yes, but it was not complete and fill all the data. Now they are thanks to the computed writable fields.
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.
Check a similar conversion in OCA/l10n-spain@3b66181
4fb6fa0
to
1eb0d01
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.
Functionally tested. LGTM
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.
Functional approval
@pedrobaeza could we merge this PR? |
@sergio-teruel can you confirm that everything is OK? |
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.
Ok.. ready... my comments only was minimal
agreement_rebate/models/__init__.py
Outdated
@@ -0,0 +1,5 @@ | |||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | |||
from . import account_invoice |
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.
Change filename to to account_move
store=True, | ||
readonly=False, | ||
) | ||
rebate_discount = fields.Float() |
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.
rebate_discount = fields.Float() | |
rebate_discount = fields.Float(digits='Discount', default=0.0,) |
Is mergeable? @sergio-teruel |
There are 2 comments to be attended. |
Please @rp-landoo Can you attend the comments ?? |
@mof-landoo Can you attend the comments ?? |
149fec9
to
0ce3196
Compare
0ce3196
to
08a9fde
Compare
@sergio-teruel changes applied, can you merge it? thanks |
ping @pedrobaeza |
/ocabot migration agreement_rebate |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 9b5321e. Thanks a lot for contributing to OCA. ❤️ |
Standard migration
@rp-landoo