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

[IMP] default country to supply point creation from partner

parent 102796d1
No related branches found
No related tags found
3 merge requests!138Hotfix setup name error,!134Release v14.0.1.1.6,!126[IMP] Feature/add energy selfconsumption distribution table
This commit is part of merge request !134. Comments created here will be created in the context of that merge request.
......@@ -21,5 +21,5 @@ class ResPartner(models.Model):
'view_mode': 'tree,form',
'res_model': 'energy_selfconsumption.supply_point',
'domain': [('owner_id', '=', self.id)],
'context': {'create': True, 'default_owner_id': self.id},
'context': {'create': True, 'default_owner_id': self.id, 'default_country_id': self.env.ref('base.es').id},
}
......@@ -28,8 +28,7 @@
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<div name="button_box" position="inside">
<button class="oe_stat_button" type="object" name="get_supply_points"
icon="fa-lightbulb-o" context="{'default_owner_id': id}">
<button class="oe_stat_button" type="object" name="get_supply_points" icon="fa-lightbulb-o">
<field string="Supply Points" name="supply_point_count" widget="statinfo"/>
</button>
</div>
......
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