diff --git a/__manifest__.py b/__manifest__.py index c6726c800521543a1c2adcb260cae8f3bb1d844f..865d31f0c446102c7284ebd25199f7fc602e3928 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -33,7 +33,7 @@ ], "assets": { "web.assets_backend": [ - 'financial_contract_guarantee/static/src/components/**/*', + "financial_contract_guarantee/static/src/components/**/*", ], }, "installable": True, diff --git a/models/financial_contract_external.py b/models/financial_contract_external.py index 9545cb5e82b8bc4339a354b74d77eb17f11d1c43..92d60ae46c6e894152e6bc28789512fd847ee2a4 100644 --- a/models/financial_contract_external.py +++ b/models/financial_contract_external.py @@ -1,7 +1,7 @@ # © 2024 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, api +from odoo import api, fields, models class FinancialContractExternal(models.Model): @@ -12,11 +12,13 @@ class FinancialContractExternal(models.Model): guarantee_ids = fields.One2many( string="Garanties", comodel_name="financial.contract.guarantee", - inverse_name="external_loan_id" + inverse_name="external_loan_id", ) # only used for debugging - guarantee_count = fields.Integer("Nombre de garanties liées", compute="_compute_guarantee_count") + guarantee_count = fields.Integer( + "Nombre de garanties liées", compute="_compute_guarantee_count" + ) @api.depends("guarantee_ids") def _compute_guarantee_count(self): diff --git a/models/financial_contract_guarantee.py b/models/financial_contract_guarantee.py index beebb016fa925c14f1522f349f305ca794b73bb8..014f83dc9f9cecf61e7fe282b8886e6575bd3c3d 100644 --- a/models/financial_contract_guarantee.py +++ b/models/financial_contract_guarantee.py @@ -1,7 +1,7 @@ # © 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, Command, fields, models +from odoo import Command, _, api, fields, models from odoo.exceptions import ValidationError @@ -25,7 +25,9 @@ class FinancialContractGuarantee(models.Model): # chaque contrat de garantie est associée à un identifiant titulaire # plusieurs contrats de garantie peuvent être associés au même identifiant titular_number = fields.Char("Identifiant Titulaire") - person_number = fields.Char("Identifiant Personne", related="partner_id.person_number") + person_number = fields.Char( + "Identifiant Personne", related="partner_id.person_number" + ) product_id = fields.Many2one( comodel_name="financial.product.template.guarantee", @@ -52,7 +54,9 @@ class FinancialContractGuarantee(models.Model): store=True, ) # 123.45 % → 1.2345 → 5 digits, 4 after decimal - guarantee_rate = fields.Float("Quotité garantie", tracking=1, aggregator="avg", digits=(5, 4)) + guarantee_rate = fields.Float( + "Quotité garantie", tracking=1, aggregator="avg", digits=(5, 4) + ) initial_guarantee_amount = fields.Monetary( string="Montant initial garanti", compute="_compute_initial_guarantee_amount", @@ -67,8 +71,7 @@ class FinancialContractGuarantee(models.Model): is_counter_guarantee = fields.Boolean("Contre Garantie", default=False) counter_guarantee_rate = fields.Float("Quotité contre garantie") counter_guarantee_partner_id = fields.Many2one( - comodel_name="financial.contract.guarantee.partner", - string="Partenaire" + comodel_name="financial.contract.guarantee.partner", string="Partenaire" ) final_risk_guarantee = fields.Monetary( string="Garantie risque final", @@ -96,9 +99,7 @@ class FinancialContractGuarantee(models.Model): # --- Social share --- social_share_number = fields.Integer( - string="Nbre parts sociales", - compute="_compute_social_share_number", - store=True + string="Nbre parts sociales", compute="_compute_social_share_number", store=True ) social_share_amount = fields.Monetary( string="Montant parts sociales décidé", @@ -106,7 +107,7 @@ class FinancialContractGuarantee(models.Model): social_share_amount_computed = fields.Monetary( string="Montant parts sociales calculé", compute="_compute_social_share", - store=True + store=True, ) social_share_ids = fields.One2many( comodel_name="company.share.line", @@ -116,13 +117,15 @@ class FinancialContractGuarantee(models.Model): social_share_paid = fields.Monetary( string="Montant parts sociales payé", compute="_compute_social_share_paid", - store=True + store=True, ) # --- Commission --- commission_ids = fields.One2many( comodel_name="financial.guarantee.commission.line", - inverse_name="guarantee_id", string="Commissions") + inverse_name="guarantee_id", + string="Commissions", + ) is_old_associate = fields.Boolean( string="Nouveau sociétaire", @@ -220,25 +223,29 @@ class FinancialContractGuarantee(models.Model): guarantee.line_ids.mapped("commission_amount") ) - @api.depends("guarantee_amount", "is_counter_guarantee", - "counter_guarantee_rate") + @api.depends("guarantee_amount", "is_counter_guarantee", "counter_guarantee_rate") def _compute_final_risk_guarantee(self): for guarantee in self: if not guarantee.is_counter_guarantee: guarantee.final_risk_guarantee = guarantee.guarantee_amount else: guarantee.final_risk_guarantee = ( - 1 - guarantee.counter_guarantee_rate) * guarantee.guarantee_amount + 1 - guarantee.counter_guarantee_rate + ) * guarantee.guarantee_amount @api.depends("remaining_capital", "guarantee_rate") def _compute_guarantee_amount(self): for guarantee in self: - guarantee.guarantee_amount = guarantee.remaining_capital * guarantee.guarantee_rate + guarantee.guarantee_amount = ( + guarantee.remaining_capital * guarantee.guarantee_rate + ) @api.depends("amount_initial", "guarantee_rate") def _compute_initial_guarantee_amount(self): for guarantee in self: - guarantee.initial_guarantee_amount = guarantee.amount_initial * guarantee.guarantee_rate + guarantee.initial_guarantee_amount = ( + guarantee.amount_initial * guarantee.guarantee_rate + ) @api.depends("initial_guarantee_amount") def _compute_fmg_amount(self): @@ -268,7 +275,9 @@ class FinancialContractGuarantee(models.Model): social_share_rate = self.company_id.social_share_rate social_share_amount_max = self.company_id.social_share_amount_max for guarantee in self: - max_amount = social_share_amount_max - guarantee.partner_id.company_share_total + max_amount = ( + social_share_amount_max - guarantee.partner_id.company_share_total + ) rate_amount = social_share_rate * guarantee.initial_guarantee_amount final_amount = rate_amount if rate_amount <= max_amount else max_amount guarantee.social_share_amount_computed = final_amount @@ -277,14 +286,16 @@ class FinancialContractGuarantee(models.Model): def _compute_social_share_number(self): share_unit_price = self.company_id.share_unit_price for guarantee in self: - guarantee.social_share_number = (guarantee.social_share_amount // share_unit_price) - + guarantee.social_share_number = ( + guarantee.social_share_amount // share_unit_price + ) @api.depends("social_share_ids", "social_share_ids.share_total_amount") def _compute_social_share_paid(self): for guarantee in self: guarantee.social_share_paid = sum( - guarantee.social_share_ids.mapped("share_total_amount")) + guarantee.social_share_ids.mapped("share_total_amount") + ) @api.depends("product_id") def _compute_suspensive_condition_ids(self): @@ -328,7 +339,7 @@ class FinancialContractGuarantee(models.Model): # ------------------------------------------------------ def action_set_social_share_amount(self): - self.write({'social_share_amount': self.social_share_amount_computed}) + self.write({"social_share_amount": self.social_share_amount_computed}) # ------------------------------------------------------ # CRUD (Override ORM) diff --git a/models/financial_contract_guarantee_commission.py b/models/financial_contract_guarantee_commission.py index a1963fd26951be8b8196599d3d569c96a9f74cb4..68667a49e9e1ec1b455160f91fc2c7386b669f4c 100644 --- a/models/financial_contract_guarantee_commission.py +++ b/models/financial_contract_guarantee_commission.py @@ -5,8 +5,8 @@ from odoo import fields, models class FinancialContractGuaranteeCommission(models.Model): - """ - """ + """ """ + _name = "financial.guarantee.commission.line" _description = "Ligne de commission sur contrat de garantie" diff --git a/models/mutual_guarantee_fund_line.py b/models/mutual_guarantee_fund_line.py index ef15133a1c87d801165a503de8e0d6f877df5e5a..afccbfe692c0727d4cea4ba2f39ce55d2cc6a8fd 100644 --- a/models/mutual_guarantee_fund_line.py +++ b/models/mutual_guarantee_fund_line.py @@ -4,6 +4,7 @@ from odoo import api, fields, models from odoo.exceptions import ValidationError + class MutualGuaranteeFundLine(models.Model): _name = "mutual.guarantee.fund.line" _description = "Ligne Fonds Mutuel de garantie" @@ -44,7 +45,7 @@ class MutualGuaranteeFundLine(models.Model): ("storing", "Mise en réserve"), ], string="Type de mouvement", - required=True + required=True, ) comment = fields.Text("Commentaire") @@ -56,8 +57,12 @@ class MutualGuaranteeFundLine(models.Model): for fmg in self: if fmg.type == "subscribe" and fmg.amount <= 0: raise ValidationError("Le montant d'une souscription doit être positif") - elif fmg.type in ["refund", "guarantee_call", "storing"] and fmg.amount >= 0: - raise ValidationError("Le montant d'un remboursement/appel/réserve doit être strictement négatif") + elif ( + fmg.type in ["refund", "guarantee_call", "storing"] and fmg.amount >= 0 + ): + raise ValidationError( + "Le montant d'un remboursement/appel/réserve doit être strictement négatif" + ) # ------------------------------------------------------ # Computed fields / Search Fields diff --git a/models/res_config_settings.py b/models/res_config_settings.py index e2c540ed6f151ba5595c6cbcdc1227d07312f5f7..28eb2bcbaf800146a2cadaeaced8a5883b6d3e97 100644 --- a/models/res_config_settings.py +++ b/models/res_config_settings.py @@ -11,8 +11,16 @@ class ResConfigSettings(models.TransientModel): related="company_id.contract_guarantee_sequence_id", readonly=False ) amount_guarantee_limit = fields.Monetary( - related="company_id.amount_guarantee_limit", readonly=False, currency_field="company_currency_id" + related="company_id.amount_guarantee_limit", + readonly=False, + currency_field="company_currency_id", ) fmg_rate = fields.Float("Taux FMG", related="company_id.fmg_rate", readonly=False) - social_share_rate = fields.Float("Taux Parts Sociales", related="company_id.social_share_rate", readonly=False) - social_share_amount_max = fields.Float("Plafond parts sociales (€)", related="company_id.social_share_amount_max", readonly=False) + social_share_rate = fields.Float( + "Taux Parts Sociales", related="company_id.social_share_rate", readonly=False + ) + social_share_amount_max = fields.Float( + "Plafond parts sociales (€)", + related="company_id.social_share_amount_max", + readonly=False, + ) diff --git a/models/res_partner.py b/models/res_partner.py index ec6321bd331f22f4bc74f564217fe69addb573a7..8d3559798821761b7303471aa26ae7c23ecc260e 100644 --- a/models/res_partner.py +++ b/models/res_partner.py @@ -59,24 +59,39 @@ class ResPartner(models.Model): def _compute_ongoing_guarantee(self): for partner in self: guarantee_by_company = self.financial_contract_guarantee_ids.read_group( - domain=[("partner_id", "=", partner.id), ("state", "in", ["paid", "litigation"])], - fields=["company_id", "remaining_capital", "guarantee_amount", "final_risk_guarantee"], - groupby=["company_id"] + domain=[ + ("partner_id", "=", partner.id), + ("state", "in", ["paid", "litigation"]), + ], + fields=[ + "company_id", + "remaining_capital", + "guarantee_amount", + "final_risk_guarantee", + ], + groupby=["company_id"], ) partner_guarantee_amount_ongoing = 0 for line in guarantee_by_company: line["currency_id"] = self.env.company.currency_id.id - if line.get("company_id") and line["company_id"][0] == self.env.company.id: + if ( + line.get("company_id") + and line["company_id"][0] == self.env.company.id + ): partner_guarantee_amount_ongoing = line.get("guarantee_amount") partner.guarantee_by_company = guarantee_by_company partner.guarantee_amount_ongoing = partner_guarantee_amount_ongoing partner.guarantee_amount_left = ( - self.env.company.amount_guarantee_limit - partner_guarantee_amount_ongoing + self.env.company.amount_guarantee_limit + - partner_guarantee_amount_ongoing ) - if partner_guarantee_amount_ongoing > self.env.company.amount_guarantee_limit: + if ( + partner_guarantee_amount_ongoing + > self.env.company.amount_guarantee_limit + ): partner.is_amount_guarantee_limit = True else: partner.is_amount_guarantee_limit = False diff --git a/security/security_rules.xml b/security/security_rules.xml index 76bcdfc9387269368ad3576c06b02969a61f8713..4f4231e2543052952f690139a7db0f5635c71e1f 100644 --- a/security/security_rules.xml +++ b/security/security_rules.xml @@ -6,9 +6,7 @@ <record id="financial_product_template_multi_company_rule" model="ir.rule"> <field name="name">Financial Product Template Guarantee Multi Company</field> <field name="model_id" ref="model_financial_product_template_guarantee" /> - <field - name="domain_force" - >[('company_id', 'in', company_ids + [False])]</field> + <field name="domain_force">[('company_id', 'in', company_ids + [False])]</field> <field name="groups" eval="[(6, 0, [ref('financial_contract.group_financial_user')])]" @@ -18,27 +16,25 @@ <field name="perm_create" eval="True" /> <field name="perm_unlink" eval="True" /> </record> -<!-- <record id="financial_contract_guarantee_multi_company_rule" model="ir.rule">--> -<!-- <field name="name">Garantie : Multi Company</field>--> -<!-- <field name="model_id" ref="model_financial_contract_guarantee" />--> -<!-- <field--> -<!-- name="domain_force"--> -<!-- >[('company_id', 'in', company_ids + [False]), ('state', '!=', 'init')]</field>--> -<!-- <field--> -<!-- name="groups"--> -<!-- eval="[(6, 0, [ref('financial_contract.group_financial_user')])]"--> -<!-- />--> -<!-- <field name="perm_read" eval="False" />--> -<!-- <field name="perm_write" eval="False" />--> -<!-- <field name="perm_create" eval="False" />--> -<!-- <field name="perm_unlink" eval="False" />--> -<!-- </record>--> + <!-- <record id="financial_contract_guarantee_multi_company_rule" model="ir.rule">--> + <!-- <field name="name">Garantie : Multi Company</field>--> + <!-- <field name="model_id" ref="model_financial_contract_guarantee" />--> + <!-- <field--> + <!-- name="domain_force"--> + <!-- >[('company_id', 'in', company_ids + [False]), ('state', '!=', 'init')]</field>--> + <!-- <field--> + <!-- name="groups"--> + <!-- eval="[(6, 0, [ref('financial_contract.group_financial_user')])]"--> + <!-- />--> + <!-- <field name="perm_read" eval="False" />--> + <!-- <field name="perm_write" eval="False" />--> + <!-- <field name="perm_create" eval="False" />--> + <!-- <field name="perm_unlink" eval="False" />--> + <!-- </record>--> <record id="financial_contract_guarantee_line_multi_company_rule" model="ir.rule"> <field name="name">Financial Contract Guarantee Line Multi Company</field> <field name="model_id" ref="model_financial_contract_guarantee_line" /> - <field - name="domain_force" - >[('company_id', 'in', company_ids + [False])]</field> + <field name="domain_force">[('company_id', 'in', company_ids + [False])]</field> <field name="groups" eval="[(6, 0, [ref('financial_contract.group_financial_user')])]" @@ -51,9 +47,7 @@ <record id="mutual_guarantee_fund_line_multi_company_rule" model="ir.rule"> <field name="name">FMG Line Multi Company</field> <field name="model_id" ref="model_mutual_guarantee_fund_line" /> - <field - name="domain_force" - >[('company_id', 'in', company_ids + [False])]</field> + <field name="domain_force">[('company_id', 'in', company_ids + [False])]</field> <field name="groups" eval="[(6, 0, [ref('financial_contract.group_financial_user')])]" @@ -63,5 +57,4 @@ <field name="perm_create" eval="True" /> <field name="perm_unlink" eval="True" /> </record> - </odoo> diff --git a/static/src/components/guarantee_summary.js b/static/src/components/guarantee_summary.js index b30daa31a0b91cc5f87e96c61981bf7c85a0a10f..e07d32208dc0014f08ce074c8d17b9322d681a52 100644 --- a/static/src/components/guarantee_summary.js +++ b/static/src/components/guarantee_summary.js @@ -1,7 +1,7 @@ import {Component} from "@odoo/owl"; import {registry} from "@web/core/registry"; -import { standardFieldProps } from "@web/views/fields/standard_field_props"; -import { formatMonetary } from "@web/views/fields/formatters"; +import {standardFieldProps} from "@web/views/fields/standard_field_props"; +import {formatMonetary} from "@web/views/fields/formatters"; export class FinancialGuaranteeSummary extends Component { static template = "financial_contract_guarantee.FinancialGuaranteeSummary"; @@ -12,12 +12,15 @@ export class FinancialGuaranteeSummary extends Component { setup() { super.setup(); this.data = this.props.record.data[this.props.name]; - this._formatMonetary = (num, currencyId) => formatMonetary(num,{ currencyId: currencyId}); + this._formatMonetary = (num, currencyId) => + formatMonetary(num, {currencyId: currencyId}); } } export const financialGuaranteeSummary = { component: FinancialGuaranteeSummary, -} +}; -registry.category("fields").add("financial_guarantee_summary", financialGuaranteeSummary); +registry + .category("fields") + .add("financial_guarantee_summary", financialGuaranteeSummary); diff --git a/static/src/components/guarantee_summary.xml b/static/src/components/guarantee_summary.xml index 5d1d4fe0c0c0fa6a57338d1903204205939efb3e..1c19582f73134a4e2139640433c11056fa8e8745 100644 --- a/static/src/components/guarantee_summary.xml +++ b/static/src/components/guarantee_summary.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> <template> - <t t-name="financial_contract_guarantee.FinancialGuaranteeSummary"> <t t-if="!this.data"> <p>Il n'y a pas de contrat de garantie en cours.</p> @@ -17,14 +16,22 @@ </thead> <tbody> <tr t-foreach="this.data" t-as="line" t-key="line_index"> - <td t-out="line.company_id[1]"/> - <td class="text-end" t-out="_formatMonetary(line.remaining_capital, line.currency_id)" /> - <td class="text-end" t-out="_formatMonetary(line.guarantee_amount, line.currency_id)" /> - <td class="text-end" t-out="_formatMonetary(line.final_risk_guarantee, line.currency_id)" /> + <td t-out="line.company_id[1]" /> + <td + class="text-end" + t-out="_formatMonetary(line.remaining_capital, line.currency_id)" + /> + <td + class="text-end" + t-out="_formatMonetary(line.guarantee_amount, line.currency_id)" + /> + <td + class="text-end" + t-out="_formatMonetary(line.final_risk_guarantee, line.currency_id)" + /> </tr> </tbody> </table> </t> </t> - </template> diff --git a/views/company_share_line.xml b/views/company_share_line.xml index e840f9ac5b61a8dc67b18b8f92f08ed90e84153a..fbbd5aeb21f294e8db35f549321489903afcc3e2 100644 --- a/views/company_share_line.xml +++ b/views/company_share_line.xml @@ -4,12 +4,11 @@ <record id="company_share_line_tree_inherit" model="ir.ui.view"> <field name="name">company.share.line.list</field> <field name="model">company.share.line</field> - <field name="inherit_id" ref="company_shares.company_share_line_tree"/> + <field name="inherit_id" ref="company_shares.company_share_line_tree" /> <field name="arch" type="xml"> <xpath expr="//list//field[@name='partner_id']" position="after"> - <field name="guarantee_id" optional="show"/> + <field name="guarantee_id" optional="show" /> </xpath> </field> </record> - </odoo> diff --git a/views/financial_contract_external.xml b/views/financial_contract_external.xml index 4138e164e84d7754ea7d5f86e84812157ac61320..58d7d2d4f90d8592d0e0c05a8f19b89ab8ea802f 100644 --- a/views/financial_contract_external.xml +++ b/views/financial_contract_external.xml @@ -2,16 +2,18 @@ <!-- Copyright 2024 Le Filament License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> <odoo> - <!-- Form --> <record model="ir.ui.view" id="financial_contract_external_form_view_inherit"> <field name="name">financial.contract.external.form.inherit</field> <field name="model">financial.contract.external</field> - <field name="inherit_id" ref="financial_contract_external.financial_contract_external_form_view"/> + <field + name="inherit_id" + ref="financial_contract_external.financial_contract_external_form_view" + /> <field name="arch" type="xml"> <xpath expr="//field[@name='comment']/.." position="after"> <group> - <field name="guarantee_ids"/> + <field name="guarantee_ids" /> </group> </xpath> </field> @@ -21,12 +23,14 @@ <record model="ir.ui.view" id="financial_contract_external_tree_view_inherit"> <field name="name">financial.contract.external.list.inherit</field> <field name="model">financial.contract.external</field> - <field name="inherit_id" ref="financial_contract_external.financial_contract_external_tree_view"/> + <field + name="inherit_id" + ref="financial_contract_external.financial_contract_external_tree_view" + /> <field name="arch" type="xml"> <xpath expr="//field[@name='number']" position="after"> - <field name="guarantee_count" optional="hide"/> + <field name="guarantee_count" optional="hide" /> </xpath> </field> </record> - </odoo> diff --git a/views/financial_contract_guarantee.xml b/views/financial_contract_guarantee.xml index 1c5a3a5af4299579bedc957e4eb791bc89595eee..4a62f71922273ef04e635c36aa46cc5178d07aca 100644 --- a/views/financial_contract_guarantee.xml +++ b/views/financial_contract_guarantee.xml @@ -16,7 +16,7 @@ <field name="state" /> <field name="expiration_date" /> <field name="amount_initial" /> - <field name="guarantee_rate" widget="percentage" optional="show"/> + <field name="guarantee_rate" widget="percentage" optional="show" /> <field name="amount_received" /> <field name="payment_date" optional="show" /> <field name="external_loan_id" /> @@ -37,7 +37,11 @@ <field name="arch" type="xml"> <form> <header> - <field name="state" widget="statusbar" options="{'clickable': '1'}" /> + <field + name="state" + widget="statusbar" + options="{'clickable': '1'}" + /> </header> <sheet> <group> @@ -49,19 +53,30 @@ <field name="is_old_associate" /> </group> <group name="contract" string="contrat"> - <field name="titular_number" readonly="1" widget="CopyClipboardChar" /> - <field name="number"/> + <field + name="titular_number" + readonly="1" + widget="CopyClipboardChar" + /> + <field name="number" /> <field name="product_id" /> <field name="amount_initial" /> <field name="guarantee_rate" widget="percentage" /> <field name="fmg_amount" /> - <field name="social_share_amount_computed" invisible="social_share_amount" /> - <button class="d-inline-block px-2 py-0 btn btn-link" name="action_set_social_share_amount" - type="object" invisible="social_share_amount == social_share_amount_computed"> - <i class="fa fa-gear" role="img"/> + <field + name="social_share_amount_computed" + invisible="social_share_amount" + /> + <button + class="d-inline-block px-2 py-0 btn btn-link" + name="action_set_social_share_amount" + type="object" + invisible="social_share_amount == social_share_amount_computed" + > + <i class="fa fa-gear" role="img" /> Appliquer le montant calculé </button> - <field name="social_share_amount" readonly="1"/> + <field name="social_share_amount" readonly="1" /> <field name="social_share_number" /> <field name="is_counter_guarantee" /> @@ -84,7 +99,10 @@ <field name="payment_date" /> <field name="amount_initial" /> <field name="expiration_date" /> - <field name="expiration_date_amended" invisible="not expiration_date_amended"/> + <field + name="expiration_date_amended" + invisible="not expiration_date_amended" + /> <field name="amount_received" /> <field name="remaining_capital" /> </group> @@ -106,7 +124,10 @@ /> </page> <!-- conditions suspensives --> - <page name="suspensive_condition" string="Conditions suspensives"> + <page + name="suspensive_condition" + string="Conditions suspensives" + > <field name="suspensive_condition_ids" context="{'default_contract_id': id}" @@ -141,8 +162,7 @@ name="Commissions" string="Commissions" invisible="state in ['init', 'offer', 'cancel']" - > - </page> + /> <!-- fmg --> <page name="fmg" @@ -174,7 +194,7 @@ </page> <!-- description --> <page name="comment" string="Description"> - <field name="comment"/> + <field name="comment" /> </page> </notebook> </sheet> @@ -194,7 +214,7 @@ <field name="mode">primary</field> <field name="arch" type="xml"> <xpath expr="//field[@name='partner_id']" position="after"> - <field name="titular_number"/> + <field name="titular_number" /> </xpath> <xpath expr="//filter[@name='group_state']" position="after"> <filter diff --git a/views/financial_contract_guarantee_commission.xml b/views/financial_contract_guarantee_commission.xml index 7b9e370fa55bcd940be265bb38c63f68fd16e5c3..5a827d118e0428a4d781c0f6d8760bc9cef1e284 100644 --- a/views/financial_contract_guarantee_commission.xml +++ b/views/financial_contract_guarantee_commission.xml @@ -14,14 +14,13 @@ <field name="model">financial.guarantee.commission.line</field> <field name="arch" type="xml"> <list> - <field name="guarantee_id" optional="hide"/> - <field name="partner_id" optional="hide"/> - <field name="company_id" optional="show"/> - <field name="currency_id" optional="hide"/> - <field name="prime_reversee" optional="show"/> - <field name="taux_commission" optional="show"/> + <field name="guarantee_id" optional="hide" /> + <field name="partner_id" optional="hide" /> + <field name="company_id" optional="show" /> + <field name="currency_id" optional="hide" /> + <field name="prime_reversee" optional="show" /> + <field name="taux_commission" optional="show" /> </list> </field> </record> - </odoo> diff --git a/views/financial_contract_guarantee_partner.xml b/views/financial_contract_guarantee_partner.xml index 97819dd7f71e101c5ef4051424ac902f9b6a970d..7fe31a44661430f46a3d539ebdfbab47fbbcd06a 100644 --- a/views/financial_contract_guarantee_partner.xml +++ b/views/financial_contract_guarantee_partner.xml @@ -22,7 +22,11 @@ <search> <field name="name" /> <filter name="active" string="Actif" domain="[('active', '=', True)]" /> - <filter name="inactive" string="Archivé" domain="[('active', '=', False)]" /> + <filter + name="inactive" + string="Archivé" + domain="[('active', '=', False)]" + /> </search> </field> </record> @@ -37,5 +41,4 @@ <field name="path">guarantee-partner</field> <field name="view_mode">list</field> </record> - </odoo> diff --git a/views/res_config_settings.xml b/views/res_config_settings.xml index 7841bf4e9bd1fa4668d55bcf8e029d68e55f6be5..f6d872abc1d4f6a7c2829be3f24eb68a31860f29 100644 --- a/views/res_config_settings.xml +++ b/views/res_config_settings.xml @@ -18,7 +18,9 @@ <block title="Configuration des garanties" name="guarantee"> <setting title="Numérotation"> <label for="contract_guarantee_sequence_id" /> - <p class="text-muted">Sélectionner la séquence des numéros de contrat pour la garantie</p> + <p + class="text-muted" + >Sélectionner la séquence des numéros de contrat pour la garantie</p> <field name="contract_guarantee_sequence_id" options="{'no_create': 1}" @@ -28,22 +30,23 @@ <div class="content-group"> <div class="row"> <label for="amount_guarantee_limit" /> - <p class="text-muted">Montant du plafond de garantie pour cette société. Laisser à 0 si pas de plafond</p> + <p + class="text-muted" + >Montant du plafond de garantie pour cette société. Laisser à 0 si pas de plafond</p> <field name="amount_guarantee_limit" /> </div> - <div class="row mt16"> - </div> + <div class="row mt16" /> </div> </setting> - <setting title="FMG" company_dependent="1"> + <setting title="FMG" company_dependent="1"> <div class="content-group"> <div class="row"> <label for="fmg_rate" /> - <field name="fmg_rate" widget="percentage"/> + <field name="fmg_rate" widget="percentage" /> </div> </div> </setting> - <setting title="Parts Sociales" company_dependent="1"> + <setting title="Parts Sociales" company_dependent="1"> <div class="content-group"> <div class="row"> <label for="social_share_rate" /> @@ -51,7 +54,10 @@ </div> <div class="row mt16"> <label for="social_share_amount_max" /> - <field name="social_share_amount_max" widget="monetary" /> + <field + name="social_share_amount_max" + widget="monetary" + /> </div> </div> </setting> diff --git a/views/res_partner.xml b/views/res_partner.xml index bada5ba7ae28d5161881972bbf90c68597ebb065..3f72691ad03457aa72734f40867751b67d09bbc8 100644 --- a/views/res_partner.xml +++ b/views/res_partner.xml @@ -28,13 +28,20 @@ <field name="guarantee_amount_ongoing" invisible="1" /> <field name="guarantee_amount_left" invisible="1" /> <separator string="En cours de garantie" /> - <field name="guarantee_by_company" class="w-100" widget="financial_guarantee_summary" /> + <field + name="guarantee_by_company" + class="w-100" + widget="financial_guarantee_summary" + /> <separator string="Contrats garantie" /> <field name="financial_contract_guarantee_ids" readonly="1" /> </page> </xpath> - <xpath expr="//group[@name='legal_info']//field[@name='siren']" position="after"> + <xpath + expr="//group[@name='legal_info']//field[@name='siren']" + position="after" + > <field name="person_number" readonly="1" widget="CopyClipboardChar" /> </xpath> </field>