Skip to content
Snippets Groups Projects
Commit 26948c07 authored by Thibaud - Le Filament's avatar Thibaud - Le Filament
Browse files

[IMP] Changed rec name representation

parent 44093279
Branches
No related tags found
3 merge requests!3Ajout sequence,!2[IMP] Added sequence to financial contract name,!1[IMP] Added condition precedent and linked it to contracts
...@@ -45,11 +45,11 @@ class FinancialConditionPrecedent(models.Model): ...@@ -45,11 +45,11 @@ class FinancialConditionPrecedent(models.Model):
class FinancialConditionPrecedentContract(models.Model): class FinancialConditionPrecedentContract(models.Model):
_name = "financial.condition.precedent.contract" _name = "financial.condition.precedent.contract"
_description = "Link between a condition precedent and a contract" _description = "Link between a condition precedent and a contract"
_rec_name = "condition_precedent_id"
# ------------------------------------------------------ # ------------------------------------------------------
# Fields declaration # Fields declaration
# ------------------------------------------------------ # ------------------------------------------------------
name = fields.Char(compute="_compute_name") name = fields.Char()
condition_precedent_id = fields.Many2one("financial.condition.precedent") condition_precedent_id = fields.Many2one("financial.condition.precedent")
contract_id = fields.Many2one("financial.contract") contract_id = fields.Many2one("financial.contract")
raised = fields.Boolean() raised = fields.Boolean()
...@@ -65,11 +65,6 @@ class FinancialConditionPrecedentContract(models.Model): ...@@ -65,11 +65,6 @@ class FinancialConditionPrecedentContract(models.Model):
# ------------------------------------------------------ # ------------------------------------------------------
# Computed fields / Search Fields # Computed fields / Search Fields
# ------------------------------------------------------ # ------------------------------------------------------
def _compute_name(self):
for condition_precedent_contract in self:
condition_precedent_contract.name = (
condition_precedent_contract.condition_precedent_id.name
)
# ------------------------------------------------------ # ------------------------------------------------------
# Onchange / Constraints # Onchange / Constraints
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment