-
-
Notifications
You must be signed in to change notification settings - Fork 583
[18.0][MIG] chained_swapper: Migration to version 18.0 #1123
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
base: 18.0
Are you sure you want to change the base?
[18.0][MIG] chained_swapper: Migration to version 18.0 #1123
Conversation
/ocabot migration chained_swapper |
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.
allowed_field_ids = fields.Many2many( | ||
comodel_name="ir.model.fields", compute="_compute_allowed_field_ids" | ||
) |
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 think this can be reimplemented as a Binary
field, and a many2many
is not necessary.
Please check an example here:
https://github.com/odoo/odoo/blob/2d2faa413abd48e80c166c384eeede6b99843973/addons/account/models/account_tax.py#L2907
https://github.com/odoo/odoo/blob/2d2faa413abd48e80c166c384eeede6b99843973/addons/account/views/account_tax_views.xml#L47
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 don't understand the point of this
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.
Done! Can you check if it's correct? Thanks!
7a5ffa4
to
05d4fa7
Compare
…revent warning log
07cba65
to
4d75eca
Compare
4d75eca
to
9b00045
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.
LGTM. I left a few comments that I think could help improve the UI/UX. If you have any questions, feel free to let me know.
@pedrobaeza could this be improved in this PR, What do you think?
body = Markup( | ||
self.env._("<b>Chained swap done</b>:<br/>%(field)s: %(old)s ⇒ %(new)s") | ||
) % { | ||
"field": field_desc, | ||
"old": original_value, | ||
"new": new_value, | ||
} | ||
m.message_post(body=body) |
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.
body = Markup( | |
self.env._("<b>Chained swap done</b>:<br/>%(field)s: %(old)s ⇒ %(new)s") | |
) % { | |
"field": field_desc, | |
"old": original_value, | |
"new": new_value, | |
} | |
m.message_post(body=body) | |
body = Markup( | |
self.env._("<b>Chained swap done</b>:<br/>%(field)s: %(old)s ⇒ %(new)s", | |
field=field_desc, | |
old=original_value, | |
new=new_value, | |
) | |
} | |
m.message_post(body=body) |
<field name="model">chained.swapper.sub.field</field> | ||
<field name="arch" type="xml"> | ||
<list editable="bottom"> | ||
<field name="sub_field_chain" /> |
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.
<page string="Constraints"> | ||
<field name="constraint_ids" nolabel="1" /> | ||
</page> |
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.
@Tecnativa TT54143
@pedrobaeza @carlos-lopez-tecnativa