Skip to content

Commit

Permalink
[MIG] web_m2x_options_manager: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Wodran14 authored and chaule97 committed Oct 23, 2024
1 parent 0eee7de commit ea6fd9e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions web_m2x_options_manager/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Contributors
- Silvio Gregorini

- Duong (Tran Quoc) <[email protected]>
- Chau Le <[email protected]>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion web_m2x_options_manager/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions web_m2x_options_manager/models/m2x_create_edit_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Check warning on line 107 in web_m2x_options_manager/models/m2x_create_edit_option.py

View check run for this annotation

Codecov / codecov/patch

web_m2x_options_manager/models/m2x_create_edit_option.py#L106-L107

Added lines #L106 - L107 were not covered by tests

@api.depends("model_id")
Expand Down
1 change: 1 addition & 0 deletions web_m2x_options_manager/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [Camptocamp](https://www.camptocamp.com):
- Silvio Gregorini
- Duong (Tran Quoc) \<<[email protected]>\>
- Chau Le \<<[email protected]>\>
1 change: 1 addition & 0 deletions web_m2x_options_manager/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
</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">
Expand Down
4 changes: 2 additions & 2 deletions web_m2x_options_manager/tests/test_m2x_create_edit_option.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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")
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_apply_options(self):
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(
Expand Down
2 changes: 1 addition & 1 deletion web_m2x_options_manager/views/ir_model.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit ea6fd9e

Please sign in to comment.