[IMP] date_conclusion filling when someone sign contract
This commit is contained in:
parent
b58801ac42
commit
505d4a1717
@ -12,8 +12,6 @@ class PartnerContract(models.Model):
|
||||
)
|
||||
date_conclusion = fields.Date(
|
||||
string='Date of conclusion',
|
||||
default=datetime.date.today(),
|
||||
required=True
|
||||
)
|
||||
date_conclusion_fix = fields.Date(
|
||||
string='Manual Date of conclusion',
|
||||
@ -49,7 +47,7 @@ class PartnerContract(models.Model):
|
||||
|
||||
@api.multi
|
||||
def action_sign(self):
|
||||
self.write({'state': 'sign'})
|
||||
self.write({'state': 'sign', 'date_conclusion': fields.Date.today()})
|
||||
|
||||
@api.multi
|
||||
def action_close(self):
|
||||
|
@ -30,7 +30,7 @@
|
||||
<sheet>
|
||||
<group string="Contract parameters" name="single_params">
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="create_date"/>
|
||||
<field name="create_date" readonly="1"/>
|
||||
<field name="date_conclusion" attrs="{'readonly': [('state', 'in', ['sign', 'close'])]}"/>
|
||||
<field name="date_conclusion_fix"/>
|
||||
<field name="partner_id" readonly="1"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user