[FIX] quickfix
This commit is contained in:
parent
c484f3bec0
commit
1a15fe8709
@ -70,13 +70,10 @@ class PartnerContract(models.Model):
|
||||
"context": {"self_id": self.id},
|
||||
}
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
|
||||
@api.onchange('partner_id')
|
||||
def _onchange_partner_id(self):
|
||||
datetime_now = datetime.datetime.now().strftime("%Y-%m-%d")
|
||||
vals["name"] = self._calculate_contract_name(datetime_now)
|
||||
|
||||
return super(PartnerContract, self).create(vals)
|
||||
self.name = self._calculate_contract_name(datetime_now)
|
||||
|
||||
def _calculate_contract_name(self, _date):
|
||||
|
||||
|
@ -90,9 +90,8 @@ class ContractWizard(models.TransientModel):
|
||||
else self.target.contract_id.partner_id
|
||||
)
|
||||
|
||||
self.write(
|
||||
{"company_id": company_id, "partner_id": partner_id,}
|
||||
)
|
||||
self.company_id = company_id
|
||||
self.partner_id = partner_id
|
||||
|
||||
model_to_action = {
|
||||
"res.partner.contract": "client_contracts.action_get_contract_context",
|
||||
|
Loading…
x
Reference in New Issue
Block a user