Skip to content
Snippets Groups Projects
Commit af2f7565c198 authored by Etienne Ferriere's avatar Etienne Ferriere
Browse files

The superuser rights must be used to create analytic codes.

parent 805bbcf2c77a
No related branches found
No related tags found
No related merge requests found
...@@ -466,7 +466,7 @@ ...@@ -466,7 +466,7 @@
vals[column] = force_code_id vals[column] = force_code_id
else: else:
new_code, vals = self._create_analytic_code( new_code, vals = self.sudo()._create_analytic_code(
vals, code_vals vals, code_vals
) )
...@@ -479,7 +479,7 @@ ...@@ -479,7 +479,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._create_analytic_code( new_code, vals = self.sudo()._create_analytic_code(
{ {
field: extract( field: extract(
getattr(res, field), field_data['type'] getattr(res, field), field_data['type']
...@@ -579,7 +579,7 @@ ...@@ -579,7 +579,7 @@
super(superclass, rec).write(rec_vals, **kwargs) super(superclass, rec).write(rec_vals, **kwargs)
elif rec_code_vals: elif rec_code_vals:
code.write(rec_code_vals) code.sudo().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