-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
[15.0][MIG] sale_invoice_policy #2027
Conversation
…status computation
…y is required on Sale Orders
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/
Currently translated at 100.0% (17 of 17 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/ca/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/
Currently translated at 100.0% (17 of 17 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/pt/
Currently translated at 70.6% (12 of 17 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/fr/
Currently translated at 100.0% (17 of 17 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_invoice_policy Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_invoice_policy/fr/
Currently translated at 100.0% (17 of 17 strings) Translation: sale-workflow-13.0/sale-workflow-13.0-sale_invoice_policy Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_invoice_policy/es_MX/
9b0bc4f
to
396da8b
Compare
396da8b
to
68b4b03
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.
LG
@rousseldenis can you pls take a look and probably approve the workflow? |
/ocabot migration sale_invoice_policy |
@@ -7,17 +7,16 @@ | |||
class ProductTemplate(models.Model): | |||
_inherit = "product.template" | |||
|
|||
def _default_default_invoice_policy(self): |
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.
Mmmh maybe this had been done at purpose to easy override
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.
yep, I got the idea of what it was used for.
But the reason I made it another way is the fact that at v15 we don't have this default.
I checked it through debugging. We have None
value returned in this method.
At the module installation in test db I've always met:
Traceback (most recent call last):
File "/odoo/src/odoo/service/server.py", line 1246, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/odoo/src/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/odoo/src/odoo/modules/loading.py", line 474, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/odoo/src/odoo/modules/loading.py", line 363, in load_marked_modules
loaded, processed = load_module_graph(
File "/odoo/src/odoo/modules/loading.py", line 199, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name}, new_install)
File "/odoo/src/odoo/modules/registry.py", line 432, in init_models
env['ir.model.fields.selection']._reflect_selections(model_names)
File "/odoo/src/odoo/addons/base/models/ir_model.py", line 1216, in _reflect_selections
expected = {
File "/odoo/src/odoo/addons/base/models/ir_model.py", line 1219, in <dictcomp>
for field_id in [IMF._get_ids(field.model_name)[field.name]]
KeyError: 'default_invoice_policy'
So, not to break logic, I propose to use another default which should return the same value => order
.
If you have suggestion how to resolve this error another way I would highly appreciate ideas.
Thanks for review @rousseldenis
This PR has the |
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 74217b8. Thanks a lot for contributing to OCA. ❤️ |
No description provided.