Skip to content
Snippets Groups Projects
Commit 2fb35f78 authored by daniquilez's avatar daniquilez
Browse files

add background job for custom methods executed after company creation

parent 4afe45b1
No related branches found
No related tags found
2 merge requests!253[REL] Release 06/11/23,!191V1 imrpvements to CompanyEasyCreation wizard (CRM Lead execution)🙋‍
Pipeline #59145 passed
......@@ -173,6 +173,7 @@
(4, ref('crm.group_use_lead')),
(4, ref('mass_mailing.group_mass_mailing_user')),
(4, ref('l10n_es_aeat.group_account_aeat'))
(4, ref('queue_job.group_queue_job_manager'))
]"
/>
</record>
......
......@@ -208,6 +208,10 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
def action_accept(self):
action = super().action_accept()
self.with_delay()._after_action_accept_hook()
return action
def _after_action_accept_hook(self):
if self.property_cooperator_account:
self.set_cooperative_account()
self_new_company = self.with_company(self.new_company_id)
......@@ -216,7 +220,6 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
self.create_capital_share_product_template()
self.add_company_managers()
self.add_company_log()
return action
def create_company(self):
self.new_company_id = (
......
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