Skip to content
Extraits de code Groupes Projets
Valider d93502c0 rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[CLEAN] pre-commit

parent b5f1bf9a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -5,7 +5,9 @@
"website": "https://le-filament.com",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"depends": ["financial_contract",],
"depends": [
"financial_contract",
],
"data": [
# security
"security/ir.model.access.csv",
......
# © 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
from odoo import fields, models
class FinancialContract(models.Model):
......@@ -9,9 +9,9 @@ class FinancialContract(models.Model):
tool = fields.Selection(
selection_add=[
('financial.contract.guarantee', 'Prêt'),
("financial.contract.guarantee", "Prêt"),
],
ondelete={'financial.contract.guarantee': 'cascade'}
ondelete={"financial.contract.guarantee": "cascade"},
)
# ------------------------------------------------------
......
......@@ -7,12 +7,18 @@ from odoo import fields, models
class FinancialContractGuarantee(models.Model):
_name = "financial.contract.guarantee"
_inherit = [
"mail.thread", "mail.activity.mixin",
"mail.thread",
"mail.activity.mixin",
]
_inherits = {"financial.contract": "contract_id"}
_description = "Financial contract guarantee"
_check_company_auto = True
_rec_names_search = ["name", "number", "partner_id.name", "partner_id.member_number"]
_rec_names_search = [
"name",
"number",
"partner_id.name",
"partner_id.member_number",
]
_order = "create_date desc"
external_loan_id = fields.Many2one(
......
# © 2024 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo import fields, models
class FinancialProductTemplateGuarantee(models.Model):
_name = "financial.product.template.guarantee"
_inherit = ["mail.thread", "mail.activity.mixin",]
_inherit = [
"mail.thread",
"mail.activity.mixin",
]
_inherits = {"financial.product.template": "product_id"}
_description = "Financial product template guarantee"
tool = fields.Selection(
selection_add=[
('financial.contract.guarantee', 'Garantie'),
("financial.contract.guarantee", "Garantie"),
],
ondelete={'financial.contract.guarantee': 'cascade'}
ondelete={"financial.contract.guarantee": "cascade"},
)
product_id = fields.Many2one(
comodel_name="financial.product.template",
string="Produit",
required=True,
index=True,
ondelete="cascade"
ondelete="cascade",
)
# ------------------------------------------------------
# Constrains functions
......
static/description/icon.png

10,9 ko | W: | H:

static/description/icon.png

8,95 ko | W: | H:

static/description/icon.png
static/description/icon.png
static/description/icon.png
static/description/icon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -33,7 +33,10 @@
<record model="ir.ui.view" id="financial_contract_guarantee_form_view">
<field name="name">financial.contract.guarantee.form</field>
<field name="model">financial.contract.guarantee</field>
<field name="inherit_id" ref="financial_contract.financial_contract_form_view" />
<field
name="inherit_id"
ref="financial_contract.financial_contract_form_view"
/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<xpath expr="//group" position="inside">
......@@ -54,7 +57,10 @@
</record>
<!-- Action -->
<record model="ir.actions.act_window" id="financial_contract_guarantee_action">
<record
model="ir.actions.act_window"
id="financial_contract_guarantee_action"
>
<field name="name">Garanties</field>
<field name="res_model">financial.contract.guarantee</field>
<field name="view_mode">tree,form</field>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter