Reload the context after creating a company with the config wizard
To get the new company set in the context, we must not fill the context with an empty company nor employee. issue9543 review318451002
This commit is contained in:
1 parent
77375b0e23
commit
0d3deca5bc
2 files changed
+3
-6
No files matched your search
@@ -134,6 +134,9 @@ class CompanyConfig(Wizard):
|
||||
})
|
||||
return 'end'
|
||||
|
||||
def end(self):
|
||||
return 'reload context'
|
||||
|
||||
|
||||
class CompanyReport(Report):
|
||||
|
||||
|
||||
@@ -114,12 +114,6 @@ class User(metaclass=PoolMeta):
|
||||
res['main_company'] = user.main_company.id
|
||||
res['main_company.rec_name'] = user.main_company.rec_name
|
||||
res['employees'] = [e.id for e in user.employees]
|
||||
if user.employee:
|
||||
res['employee'] = user.employee.id
|
||||
res['employee.rec_name'] = user.employee.rec_name
|
||||
if user.company:
|
||||
res['company'] = user.company.id
|
||||
res['company.rec_name'] = user.company.rec_name
|
||||
return res
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in new issue
Block a user