mirror of https://github.com/OCA/web.git
[MIG] web_m2x_options_manager: Migration to 17.0
parent
351622b948
commit
888efc67ba
|
@ -73,6 +73,7 @@ Contributors
|
|||
- Silvio Gregorini
|
||||
|
||||
- Duong (Tran Quoc) <duongtq@trobz.com>
|
||||
- Chau Le <chaulb@trobz.com>
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
- [Camptocamp](https://www.camptocamp.com):
|
||||
- Silvio Gregorini
|
||||
- Duong (Tran Quoc) \<<duongtq@trobz.com>\>
|
||||
- Chau Le \<<chaulb@trobz.com>\>
|
||||
|
|
|
@ -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) <<a class="reference external" href="mailto:duongtq@trobz.com">duongtq@trobz.com</a>></li>
|
||||
<li>Chau Le <<a class="reference external" href="mailto:chaulb@trobz.com">chaulb@trobz.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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}"
|
||||
|
|
Loading…
Reference in New Issue