diff --git a/partner_capital/models/res_partner.py b/partner_capital/models/res_partner.py index a32973a69..8adc35fe0 100644 --- a/partner_capital/models/res_partner.py +++ b/partner_capital/models/res_partner.py @@ -9,14 +9,18 @@ from openerp import models, fields class ResPartner(models.Model): _inherit = 'res.partner' - capital_country = fields.Many2one( + capital_country_id = fields.Many2one( 'res.country', "Capital country", + oldname="capital_country", help="Country of origin of this company's capital.") capital_amount = fields.Float( "Capital amount", oldname="capital_amount", help="Publicly registered capital amount.") + capital_currency_id = fields.Many2one( + "res.currency", + string="Capital currency") turnover_range_id = fields.Many2one( 'res.partner.turnover_range', "Turnover range", diff --git a/partner_capital/views/res_partner_view.xml b/partner_capital/views/res_partner_view.xml index ab192466f..f5683d59f 100644 --- a/partner_capital/views/res_partner_view.xml +++ b/partner_capital/views/res_partner_view.xml @@ -11,18 +11,16 @@ <field name="model">res.partner</field> <field name="inherit_id" ref="base.view_partner_form"/> <field name="arch" type="xml"> - <xpath expr="//page[@name='sales_purchases']" position="inside"> - <group name="captial" string="Capital"> - <field name="capital_country" - attrs="{'invisible': [('is_company', '=', False)]}"/> - <field name="capital_amount" - attrs="{'invisible': [('is_company', '=', False)]}"/> - <field name="turnover_range_id" - attrs="{'invisible': [('is_company', '=', False)]}"/> - <field name="turnover_amount" - attrs="{'invisible': [('is_company', '=', False)]}"/> - <field name="company_size" - attrs="{'invisible': [('is_company', '=', False)]}"/> + <xpath expr="//page[@name='sales_purchases']/group"> + <group name="captial" + string="Capital" + attrs="{'invisible': [('is_company', '=', False)]}"> + <field name="capital_country_id"/> + <field name="capital_amount"/> + <field name="capital_currency_id"/> + <field name="turnover_range_id"/> + <field name="turnover_amount"/> + <field name="company_size"/> </group> </xpath> </field>