Skip to content

Commit

Permalink
Merge pull request OCA#432 from OCA/8.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/server-tools (8.0)
  • Loading branch information
bt-admin authored Feb 22, 2019
2 parents b8bd195 + de97b58 commit b7e3599
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions base_user_role/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_res_users_role,access_res_users_role,model_res_users_role,"base.group_erp_manager",1,1,1,1
access_res_users_role_line,access_res_users_role_line,model_res_users_role_line,"base.group_erp_manager",1,1,1,1
access_res_users_role_user,access_res_users_role_user,model_res_users_role,"base.group_user",1,0,0,0
access_res_users_role_line_user,access_res_users_role_line_user,model_res_users_role_line,"base.group_user",1,0,0,0
7 changes: 6 additions & 1 deletion sql_export/wizard/wizard_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ def export_sql(self):
date = today_tz.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
if sql_export.field_ids:
for field in sql_export.field_ids:
variable_dict[field.name] = self[field.name]
if field.ttype == 'many2one':
variable_dict[field.name] = self[field.name].id
elif field.ttype == 'many2many':
variable_dict[field.name] = tuple(self[field.name].ids)
else:
variable_dict[field.name] = self[field.name]
if "%(company_id)s" in sql_export.query:
variable_dict['company_id'] = self.env.user.company_id.id
if "%(user_id)s" in sql_export.query:
Expand Down

0 comments on commit b7e3599

Please sign in to comment.