[ADD] specification fields

This commit is contained in:
Stepan Savelyev 2020-01-17 18:53:33 +05:00
parent d4198e9726
commit 8a3a4c7d7b
2 changed files with 47 additions and 5 deletions

View File

@ -32,6 +32,26 @@ class ContractOrderAnnex(models.Model, IDocument, Extension):
"account.payment.term", related="order_id.payment_term_id", readonly=True,
)
development_period = fields.Integer("Product Development Period (days)",)
design_cost = fields.Float(string="Design Cost",)
design_doc_period = fields.Integer(string="Documentation Design Period (days)",)
design_doc_cost = fields.Float(string="Documentation Design Cost",)
delivery_address = fields.Char(string="Delivery Address",)
delivery_period = fields.Integer(string="Delivery Period (days)")
installation_address = fields.Char(string="Installation Address",)
installation_period = fields.Integer(string="Installation Period (days)",)
installation_cost = fields.Integer(string="Installation Cost",)
total_cost = fields.Float(string="Total Cost",)
payment_part_one = fields.Float(string="Payment 1 Part (%)", default=100)
payment_part_two = fields.Float(string="Payment 2 Part (%)",)
payment_part_three = fields.Float(string="Payment 3 Part (%)",)
@api.onchange("order_id")
def _onchange_order_id(self):
contract_number = self.contract_id.name

View File

@ -10,18 +10,40 @@
<form string="Contract Annex">
<sheet>
<group>
<field name="name" placeholder="Leave empty for compute"/>
<group name="options" invisible="1">
<field name="display_name" invisible="1"/>
<field name="payment_term" invisible="1"/>
<field name="delivery_time" invisible="1"/>
</group>
<group name="info" string="Info">
<field name="name" placeholder="Leave empty for compute"/>
<field name="contract_id" attrs="{'invisible': [('contract_id', '=', False)]}"/>
<field name="order_id" options="{'no_create': True}"/>
<field name="date_conclusion"/>
<field name="payment_term" invisible="1"/>
<field name="delivery_time" invisible="1"/>
</group>
<group name="design" string="Design">
<field name="design_cost"/>
<field name="design_doc_period"/>
<field name="design_doc_cost"/>
</group>
<group name="delivery" string="Delivery">
<field name="delivery_address"/>
<field name="delivery_period"/>
</group>
<group name="installation" string="Installation">
<field name="installation_address"/>
<field name="installation_period"/>
<field name="installation_cost"/>
</group>
<group name="payment" string="Payment">
<field name="total_cost"/>
<field name="payment_part_one" widget="integer"/>
<field name="payment_part_two" widget="integer"/>
<field name="payment_part_three" widget="integer"/>
</group>
</sheet>
</form>
</field>
</record>