Skip to content
Snippets Groups Projects
Commit 07347a9f authored by Daniil Digtyar Vasilieva's avatar Daniil Digtyar Vasilieva :call_me:
Browse files

Set cooperative account to new company id

parent 8ad0ad79
No related branches found
No related tags found
2 merge requests!86Fix partners company,!6614.0 fix migration error and nice to have
......@@ -66,11 +66,17 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
vals = self.crm_lead_id._get_company_create_vals()
self.new_company_id.write(vals)
def set_cooperative_account(self):
new_company = self.new_company_id
new_company.write({
"property_cooperator_account": self.match_account(self.property_cooperator_account).id
})
def action_accept(self):
action = super(AccountMulticompanyEasyCreationWiz, self).action_accept()
self.update_values_from_crm_lead()
self.new_company_id.property_cooperator_account = self.property_cooperator_account
self.new_company_id.create_user = True
if self.property_cooperator_account:
self.set_cooperative_account()
self.update_product_category_company_share()
self.create_capital_share_product_template()
return action
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