Skip to content

Commit 152af1a

Browse files
rvenetobella
authored andcommitted
[MIG] base_view_inheritance_extension: Fix demo view
1 parent 040320c commit 152af1a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

base_view_inheritance_extension/demo/ir_ui_view.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<field name="parent_id" position="attributes">
1111
<attribute name="context" operation="update">
1212
{
13-
"default_name": "The company name",
14-
"default_company_id": context.get("company_id", context.get("company"))
13+
"default_email": "[email protected]",
14+
"default_company_id": allowed_company_ids[0]
1515
}
1616
</attribute>
1717
</field>

base_view_inheritance_extension/tests/test_base_view_inheritance_extension.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ def test_base_view_inheritance_extension(self):
2121
self.assertEqual(arch.xpath("//form")[0].get("string"), "Partner form")
2222
# Verify our extra context key worked
2323
self.assertTrue(
24-
"default_name" in arch.xpath('//field[@name="parent_id"]')[0].get("context")
24+
"'default_email': '[email protected]'"
25+
in arch.xpath('//field[@name="parent_id"]')[0].get("context")
2526
)
2627
self.assertTrue(
27-
"context.get('company_id', context.get('company'))"
28+
"'default_company_id': allowed_company_ids[0]"
2829
in arch.xpath('//field[@name="parent_id"]')[0].get("context")
2930
)
3031

0 commit comments

Comments
 (0)