mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX+IMP] contract: Real fix to company_id missing + improvements
* company_id was empty because an onchange, not inheritance nor visibility * Added multi-company group to company_id fields * Added multi-company access rule to contract templates * Fix double %% in XML dates that was causing an error * When creating a contract, recurring_invoices is set by default
This commit is contained in:
@@ -71,15 +71,13 @@ class AccountAnalyticAccount(models.Model):
|
||||
deletion ensures that any errant lines that are created are also
|
||||
deleted.
|
||||
"""
|
||||
|
||||
contract = self.contract_template_id
|
||||
|
||||
if not contract:
|
||||
return
|
||||
for field_name, field in contract._fields.items():
|
||||
|
||||
if field.name == 'recurring_invoice_line_ids':
|
||||
lines = self._convert_contract_lines(contract)
|
||||
self.recurring_invoice_line_ids = lines
|
||||
|
||||
elif not any((
|
||||
field.compute, field.related, field.automatic,
|
||||
field.readonly, field.company_dependent,
|
||||
|
||||
Reference in New Issue
Block a user