Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • xcg/odoo-modules/analytic_structure
1 result
Show changes
Commits on Source (2)
......@@ -53,3 +53,4 @@
be84278121023ebe39d0fa3001cff3eb6fe3e326 16.0.1.3.0
7741c6eba06350dff5b48e70b4fed9d3d4d0e1ba 16.0.1.3.1
35c3b70f993d933e777fab97965440ad09324fbb 16.0.1.3.2
d3acafe3e8fada160b9b5b11bfdd785019acdf56 16.0.1.3.3
......@@ -502,9 +502,11 @@
# Direct changes to the 'bound analytic code' field are ignored
# unless the 'force_code_id' context key is passed as True.
force_code_id = vals.pop(column, False)
if self.env.context.get("force_code_id"):
self._force_code(force_code_id, code_vals)
force_code_id = vals.pop(column, False) or self.env.context.get(
"force_code_id"
)
if force_code_id:
new_code = self._force_code(force_code_id, code_vals)
vals[column] = force_code_id
else:
......@@ -577,8 +579,10 @@
# Direct changes to the 'bound analytic code' field are ignored
# unless the 'force_code_id' context key is passed as True.
force_code_id = vals.pop(column, False)
if self.env.context.get("force_code_id"):
force_code_id = vals.pop(column, False) or self.env.context.get(
"force_code_id"
)
if force_code_id:
self._force_code(force_code_id, code_vals)
vals[column] = force_code_id
......@@ -677,6 +681,7 @@
if code_vals:
# These are behind-the-scenes links so bypass security rules.
force_code.sudo().write(code_vals)
return force_code
if sync_parent:
# This function is called as a method and can be overridden.
......
......@@ -2,6 +2,11 @@
Changes
=======
16.0.1.3.3
----------
Refactor "force_code_id" logic to handle context key and return _force_code.
16.0.1.3.2
----------
......
......@@ -21,7 +21,7 @@
"name": "Analytic Structure",
"license": "AGPL-3",
"summary": "Dynamic relationships between objects to build analytic matrices.",
"version": "16.0.1.3.2",
"version": "16.0.1.3.3",
"author": "XCG Consulting",
"category": "Hidden",
"website": "https://orbeet.io",
......