Skip to content
Snippets Groups Projects
Commit 92102b65 authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Backed out changeset af2f7565c198 (security)

Will be done better (more cases handled, more comments) by grafting rev
d11003bb260b.
parent 21ab76f3
No related branches found
No related tags found
No related merge requests found
...@@ -476,9 +476,7 @@ ...@@ -476,9 +476,7 @@
vals[column] = force_code_id vals[column] = force_code_id
else: else:
new_code, vals = self.sudo()._create_analytic_code( new_code, vals = self._create_analytic_code(vals, code_vals)
vals, code_vals
)
res = super(superclass, self).create(vals, **kwargs) res = super(superclass, self).create(vals, **kwargs)
...@@ -489,7 +487,7 @@ ...@@ -489,7 +487,7 @@
if cp is not None and cp: if cp is not None and cp:
code_vals["code_parent_id"] = cp.id code_vals["code_parent_id"] = cp.id
new_code, vals = self.sudo()._create_analytic_code( new_code, vals = self._create_analytic_code(
{ {
field: extract(getattr(res, field), field_data["type"]) field: extract(getattr(res, field), field_data["type"])
for field, field_data in list(res.fields_get().items()) for field, field_data in list(res.fields_get().items())
...@@ -588,7 +586,7 @@ ...@@ -588,7 +586,7 @@
super(superclass, rec).write(rec_vals, **kwargs) super(superclass, rec).write(rec_vals, **kwargs)
elif rec_code_vals: elif rec_code_vals:
code.sudo().write(rec_code_vals) code.write(rec_code_vals)
if code_ref_ids and news is not False: if code_ref_ids and news is not False:
for new in news: for new in news:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment