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

Set active to falte to use as template

parent 4ec4e7bc
No related branches found
No related tags found
2 merge requests!86Fix partners company,!6614.0 fix migration error and nice to have
......@@ -14,7 +14,7 @@
<field name="list_price">0</field>
<field name="by_company">True</field>
<field name="by_individual">True</field>
<field name="company_id" ref="base.main_company"></field>
<field name="active">False</field>
</record>
</data>
</odoo>
\ No newline at end of file
......@@ -55,11 +55,11 @@ class AccountMulticompanyEasyCreationWiz(models.TransientModel):
def create_capital_share_product_template(self):
# We use sudo to be able to copy the product and not needing to be in the main company
new_share_product = self.sudo().env.ref('energy_communities.share_capital_product_template').copy()
new_share_product.write({
self.sudo().env.ref('energy_communities.share_capital_product_template').copy({
'name': _('Contribution to Share Capital'),
'company_id': self.new_company_id.id,
'list_price': self.capital_share
'list_price': self.capital_share,
'active': True
})
def update_values_from_crm_lead(self):
......
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