diff --git a/models/acc_contract.py b/models/acc_contract.py new file mode 100644 index 0000000000000000000000000000000000000000..e5f9c9c7f9921af05ad59e0520b610df427d53f2 --- /dev/null +++ b/models/acc_contract.py @@ -0,0 +1,53 @@ +# Copyright 2022 Le Filament (<http://www.le-filament.com>) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class AccContract(models.Model): + _name = "acc.contract" + _description = 'Contrats' + + # ------------------------------------------------------ + # Fields declaration + # ------------------------------------------------------ + acc_operation_id = fields.Many2one("acc.operation", "Opération") + seller_id = fields.Many2one("res.partner", "Vendeur") + buyer_id = fields.Many2one("res.partner", "Acheteur") + type = fields.Selection([ + ("vente", "Vente"), + ("achat", "Achat"), + ("convention", "Convention Enedis"), + ("pmo", "Pmo") + ], string="Type de contrat") + start_date = fields.Date("Début du contrat") + end_date = fields.Date("Fin du contrat") + document = fields.Binary("Document attaché") + name = fields.Char("Nom du document") + # ------------------------------------------------------ + # SQL Constraints + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Default methods + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Computed fields / Search Fields + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Onchange / Constraints + # ------------------------------------------------------ + + # ------------------------------------------------------ + # CRUD methods (ORM overrides) + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Actions + # ------------------------------------------------------ + + # ------------------------------------------------------ + # Business methods + # ------------------------------------------------------