[MIG] web_m2x_options_manager: Migration to 17.0

pull/2975/head
Wodran Van de Sande 2024-06-05 10:48:35 +02:00 committed by chaule97
parent 351622b948
commit 888efc67ba
7 changed files with 10 additions and 7 deletions

View File

@ -73,6 +73,7 @@ Contributors
- Silvio Gregorini
- Duong (Tran Quoc) <duongtq@trobz.com>
- Chau Le <chaulb@trobz.com>
Maintainers
-----------

View File

@ -6,7 +6,7 @@
"summary": 'Adds an interface to manage the "Create" and'
' "Create and Edit" options for specific models and'
" fields.",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Web",

View File

@ -93,17 +93,17 @@ class M2xCreateEditOption(models.Model):
@api.model_create_multi
def create(self, vals_list):
# Clear cache to avoid misbehavior from cached :meth:`_get()`
type(self)._get.clear_cache(self.browse())
self.env.registry.clear_all_caches()
return super().create(vals_list)
def write(self, vals):
# Clear cache to avoid misbehavior from cached :meth:`_get()`
type(self)._get.clear_cache(self.browse())
self.env.registry.clear_all_caches()
return super().write(vals)
def unlink(self):
# Clear cache to avoid misbehavior from cached :meth:`_get()`
type(self)._get.clear_cache(self.browse())
self.env.registry.clear_all_caches()
return super().unlink()
@api.depends("model_id")

View File

@ -1,3 +1,4 @@
- [Camptocamp](https://www.camptocamp.com):
- Silvio Gregorini
- Duong (Tran Quoc) \<<duongtq@trobz.com>\>
- Chau Le \<<chaulb@trobz.com>\>

View File

@ -417,6 +417,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
</ul>
</li>
<li>Duong (Tran Quoc) &lt;<a class="reference external" href="mailto:duongtq&#64;trobz.com">duongtq&#64;trobz.com</a>&gt;</li>
<li>Chau Le &lt;<a class="reference external" href="mailto:chaulb&#64;trobz.com">chaulb&#64;trobz.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">

View File

@ -10,7 +10,7 @@ from odoo.tools.safe_eval import safe_eval
class TestM2xCreateEditOption(TransactionCase):
def setUp(self):
super(TestM2xCreateEditOption, self).setUp()
super().setUp()
ref = self.env.ref
# View to be used
self.view = ref("web_m2x_options_manager.res_partner_demo_form_view")
@ -90,7 +90,7 @@ class TestM2xCreateEditOption(TransactionCase):
title_node.attrib.get("can_create"),
title_node.attrib.get("can_write"),
),
("true", "true"),
("True", "True"),
)
categ_node = form_doc.xpath("//field[@name='category_id']")[0]
self.assertEqual(

View File

@ -18,7 +18,7 @@
context="{'default_model_name': model}"
>
<tree editable="bottom">
<field name="model_name" invisible="1" />
<field name="model_name" column_invisible="1" />
<field
name="field_id"
context="{'display_technical_name': True}"