diff --git a/account_factoring_receivable_balance/i18n/account_factoring_receivable_balance.pot b/account_factoring_receivable_balance/i18n/account_factoring_receivable_balance.pot index 121b97d..0e4d936 100644 --- a/account_factoring_receivable_balance/i18n/account_factoring_receivable_balance.pot +++ b/account_factoring_receivable_balance/i18n/account_factoring_receivable_balance.pot @@ -552,7 +552,21 @@ msgid "" msgstr "" #. module: account_factoring_receivable_balance +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.view_account_move_line_filter +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.view_move_line_tree +msgid "Subrogation" +msgstr "" + +#. module: account_factoring_receivable_balance +#: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move_line__subro_id +msgid "Subrogation Group" +msgstr "" + +#. module: account_factoring_receivable_balance +#: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_bank_statement_line__subrogation_id +#: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move__subrogation_id #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move_line__subrogation_id +#: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_payment__subrogation_id msgid "Subrogation Receipt" msgstr "" @@ -623,6 +637,15 @@ msgstr "" msgid "Use to configure account and journal" msgstr "" +#. module: account_factoring_receivable_balance +#: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_bank_statement_line__subrogation_id +#: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_move__subrogation_id +#: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_payment__subrogation_id +msgid "" +"Used if you want to create from journal entries from a posted Subrogation " +"Receipt" +msgstr "" + #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__warn msgid "Warn" diff --git a/account_factoring_receivable_balance/i18n/fr.po b/account_factoring_receivable_balance/i18n/fr.po index dd2b474..d5ee01e 100644 --- a/account_factoring_receivable_balance/i18n/fr.po +++ b/account_factoring_receivable_balance/i18n/fr.po @@ -4,17 +4,17 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0+e\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: \n" -"PO-Revision-Date: 2024-10-08 12:28+0200\n" +"PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" -"Language: fr_FR\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.0.1\n" #. module: account_factoring_receivable_balance @@ -51,7 +51,6 @@ msgstr "" #: model:ir.model.fields,help:account_factoring_receivable_balance.field_subrogation_receipt__target_date msgid "All account moves line dates are lower or equal to this date" msgstr "" -"Toutes les écritures comptables sont antérieures ou égales à cette date" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__assigned_attachment_ids @@ -71,7 +70,7 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__balance msgid "Balance" -msgstr "Balance" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_move_line__bank_id @@ -91,37 +90,37 @@ msgstr "" #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__comment #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Comment" -msgstr "Commentaire" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model,name:account_factoring_receivable_balance.model_res_company msgid "Companies" -msgstr "Sociétés" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__company_id msgid "Company" -msgstr "Société" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Compute" -msgstr "Calculer" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Confirm" -msgstr "Confirmer" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields.selection,name:account_factoring_receivable_balance.selection__subrogation_receipt__state__confirmed msgid "Confirmed" -msgstr "Confirmé" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__date msgid "Confirmed Date" -msgstr "Date de confirmation" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model,name:account_factoring_receivable_balance.model_res_partner @@ -131,7 +130,7 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.actions.act_window,name:account_factoring_receivable_balance.subrogation_receipt_action_redirection msgid "Created Subrogation Receipts" -msgstr "Quittances subrogatives" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__create_uid @@ -146,22 +145,22 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__currency_id msgid "Currency" -msgstr "Devise" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__factoring_current_account_id msgid "Current Account" -msgstr "Compte courant" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model,name:account_factoring_receivable_balance.model_subrogation_receipt msgid "Customer balance data for factoring" -msgstr "Données de la balance client pour le factor" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_subrogation_receipt__statement_date msgid "Date of the last bank statement taken account in accounting" -msgstr "Date du dernier relevé bancaire pris en compte en comptabilité" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_bank_statement_line__use_factor @@ -169,8 +168,6 @@ msgstr "Date du dernier relevé bancaire pris en compte en comptabilité" #: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_payment__use_factor msgid "Depending on partner factor settings and skip factor field" msgstr "" -"Dépends de la configuration sur le partenaire et du champ 'Echapper le " -"factor'" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__display_name @@ -180,39 +177,37 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.actions.server,name:account_factoring_receivable_balance.update_expected_cost msgid "Display domain" -msgstr "Afficher le domain" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields.selection,name:account_factoring_receivable_balance.selection__subrogation_receipt__state__draft msgid "Draft" -msgstr "Brouillon" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__factoring_expense_account_id msgid "Expense Account" -msgstr "Compte de dépense" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__expense_tax_amount msgid "Expense Tax Amount" -msgstr "Montant de taxe de dépense" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__expense_untaxed_amount msgid "Expense Untaxed Amount" -msgstr "Montant non taxé de dépense" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Expenses" -msgstr "Dépenses" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_res_company__factor_config_currency_id -#, fuzzy -#| msgid "Currency" msgid "Facto Currency" -msgstr "Devise" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__factor_type @@ -221,14 +216,12 @@ msgstr "Devise" #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.view_account_journal_search #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.view_move_form msgid "Factor" -msgstr "Type de factor" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__factor_code -#, fuzzy -#| msgid "Factor" msgid "Factor Code" -msgstr "Type de factor" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_bank_statement_line__factor_journal_id @@ -237,10 +230,8 @@ msgstr "Type de factor" #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_res_brand__factor_journal_id #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_res_partner__factor_journal_id #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_res_users__factor_journal_id -#, fuzzy -#| msgid "Journal" msgid "Factor Journal" -msgstr "Journal" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__factor_start_date @@ -250,16 +241,13 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.ui.menu,name:account_factoring_receivable_balance.factoring_menu #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.view_partner_property_form -#, fuzzy -#| msgid "Factor" msgid "Factoring" -msgstr "Type de factor" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.constraint,message:account_factoring_receivable_balance.constraint_account_journal_currency_factor_curr_type_cpny_unique msgid "Field Factor type must be unique by Currency, Journal type, and Company" msgstr "" -"Le champ factor doit être unique par Devise, Type de journal, et Société" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__message_follower_ids @@ -284,12 +272,12 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__factoring_holdback_account_id msgid "Holdback Account" -msgstr "Compte de retenue" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__holdback_amount msgid "Holdback Amount" -msgstr "Montant retenue" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__id @@ -320,7 +308,7 @@ msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "In currency" -msgstr "En devise" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__instruction @@ -340,25 +328,23 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__item_ids msgid "Item" -msgstr "Ecritures" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model,name:account_factoring_receivable_balance.model_account_journal #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__factor_journal_id msgid "Journal" -msgstr "Journal" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model,name:account_factoring_receivable_balance.model_account_move -#, fuzzy -#| msgid "Journal Item" msgid "Journal Entry" -msgstr "Écriture comptable" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model,name:account_factoring_receivable_balance.model_account_move_line msgid "Journal Item" -msgstr "Écriture comptable" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_journal__factor_invoice_journal_ids @@ -388,14 +374,12 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__line_ids msgid "Line" -msgstr "Ligne" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form -#, fuzzy -#| msgid "Line" msgid "Lines" -msgstr "Ligne" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__message_main_attachment_id @@ -446,11 +430,8 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_journal__factor_start_date -#, fuzzy -#| msgid "All account moves line dates are lower or equal to this date" msgid "No account move will be selected before this date" msgstr "" -"Toutes les écritures comptables sont antérieures ou égales à cette date" #. module: account_factoring_receivable_balance #. odoo-python @@ -482,22 +463,22 @@ msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Original Currency" -msgstr "Devise d'origine" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__factoring_pending_recharging_account_id msgid "Pending Recharging Account" -msgstr "Compte d'attente de rechargement" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Post" -msgstr "Comptabiliser" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields.selection,name:account_factoring_receivable_balance.selection__subrogation_receipt__state__posted msgid "Posted" -msgstr "Comptabilisé" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_bank_statement_line__skip_factor @@ -510,19 +491,17 @@ msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_journal__factoring_receivable_account_id msgid "Receivable Account" -msgstr "Compte à recevoir" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.view_account_journal_form -#, fuzzy -#| msgid "Receiveable Balance" msgid "Receivable Balance" -msgstr "Balance à recevoir" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move_line__bank_id msgid "Recipient Bank" -msgstr "Banque" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__activity_user_id @@ -537,7 +516,7 @@ msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "See account moves" -msgstr "Voir les écritures comptables" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_bank_statement_line__factor_journal_id @@ -554,17 +533,17 @@ msgstr "" #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move__skip_factor #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_payment__skip_factor msgid "Skip Factor" -msgstr "Echapper le factor" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__state msgid "State" -msgstr "Etat" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__statement_date msgid "Statement Date" -msgstr "Date relevé" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_subrogation_receipt__activity_state @@ -576,56 +555,68 @@ msgid "" msgstr "" #. module: account_factoring_receivable_balance +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.view_account_move_line_filter +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.view_move_line_tree +msgid "Subrogation" +msgstr "Quittance" + +#. module: account_factoring_receivable_balance +#: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move_line__subro_id +msgid "Subrogation Group" +msgstr "Quittance" + +#. module: account_factoring_receivable_balance +#: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_bank_statement_line__subrogation_id +#: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move__subrogation_id #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move_line__subrogation_id +#: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_payment__subrogation_id msgid "Subrogation Receipt" -msgstr "Quittance subrogative" +msgstr "" #. module: account_factoring_receivable_balance #. odoo-python #: code:addons/account_factoring_receivable_balance/models/subrogation_receipt.py:0 #, python-format msgid "Subrogation Receipt %s" -msgstr "Quittance subrogative %s" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.actions.act_window,name:account_factoring_receivable_balance.subrogation_receipt_action #: model:ir.ui.menu,name:account_factoring_receivable_balance.subrogation_receipt_menu msgid "Subrogation Receipts" -msgstr "Quittances subrogatives" +msgstr "" #. module: account_factoring_receivable_balance #. odoo-python #: code:addons/account_factoring_receivable_balance/models/subrogation_receipt.py:0 #, python-format msgid "Subrogations in Posted state can't be deleted" -msgstr "Les quittances comptabilisées ne peuvent etre effacées" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__target_date -#, fuzzy -#| msgid "Statement Date" msgid "Target Date" -msgstr "Date cible" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Tax Amount" -msgstr "Montant de la taxe" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_subrogation_receipt__currency_id msgid "The currency used to enter statement" -msgstr "La devise utilisé pour le relevé" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Total Credit" -msgstr "Total Credit" +msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Total Debit" -msgstr "Total Debit" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_subrogation_receipt__activity_exception_decoration @@ -635,19 +626,28 @@ msgstr "" #. module: account_factoring_receivable_balance #: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance.subrogation_receipt_form msgid "Untaxed Amount" -msgstr "Montant non taxé" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_bank_statement_line__use_factor #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_move__use_factor #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_account_payment__use_factor msgid "Use Factor" -msgstr "Utiliser le factor" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,help:account_factoring_receivable_balance.field_res_company__factor_config_currency_id msgid "Use to configure account and journal" -msgstr "Utiliser pour configurer les comptes et journaux" +msgstr "" + +#. module: account_factoring_receivable_balance +#: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_bank_statement_line__subrogation_id +#: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_move__subrogation_id +#: model:ir.model.fields,help:account_factoring_receivable_balance.field_account_payment__subrogation_id +msgid "" +"Used if you want to create from journal entries from a posted Subrogation " +"Receipt" +msgstr "" #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__warn @@ -675,12 +675,8 @@ msgstr "" #, python-format msgid "You already have a Draft Subrogation with this journal and company." msgstr "" -"Vous avez déjà une quittance en brouillon avec ce journal et cette société." #. module: account_factoring_receivable_balance #: model:ir.model.fields,field_description:account_factoring_receivable_balance.field_subrogation_receipt__activity_team_user_ids msgid "test field" msgstr "" - -#~ msgid "Partn." -#~ msgstr "Client" diff --git a/account_factoring_receivable_balance/models/account_move_line.py b/account_factoring_receivable_balance/models/account_move_line.py index 041ae1f..67cfd81 100644 --- a/account_factoring_receivable_balance/models/account_move_line.py +++ b/account_factoring_receivable_balance/models/account_move_line.py @@ -13,6 +13,12 @@ class AccountMoveLine(models.Model): string="Subrogation Receipt", check_company=True, ) + subro_id = fields.Many2one( + comodel_name="subrogation.receipt", + string="Subrogation Group", + help="Duplicate of the technical field 'Subrogation Receipt' to be able " + "to group journal items according to Subrogations", + ) bank_id = fields.Many2one( comodel_name="res.bank", related="move_id.partner_bank_id.bank_id", diff --git a/account_factoring_receivable_balance/models/subrogation_receipt.py b/account_factoring_receivable_balance/models/subrogation_receipt.py index 780283d..be7d290 100644 --- a/account_factoring_receivable_balance/models/subrogation_receipt.py +++ b/account_factoring_receivable_balance/models/subrogation_receipt.py @@ -161,7 +161,7 @@ def _get_factor_lines(self): def action_compute_lines(self): self.ensure_one() self.warn = False - self.line_ids.write({"subrogation_id": False}) + self.line_ids.write({"subrogation_id": False, "subro_id": False}) lines = self._get_factor_lines() lines.write({"subrogation_id": self.id}) if not lines: @@ -229,6 +229,8 @@ def action_confirm(self): attach_list.append(datum) self.env["ir.attachment"].create(attach_list) rec.date = fields.Date.today() + # subrogation_id duplicate + rec.line_ids.write({"subro_id": rec.id}) if data: rec.state = "confirmed" @@ -240,20 +242,26 @@ def action_post(self): # expense_untaxed_amount fields should be > 0 # useless ): - vals_list = self._prepare_journal_entry_vals_list() - res = rec.env["account.move"].create(vals_list) + vals_list = rec._prepare_journal_entry_vals_list() + items = rec.env["account.move"].create(vals_list).action_post() + items.action_post() rec.state = "posted" - if len(self) == 1 and res: + for line in rec.line_ids: + if not line.subro_id: + line.subro_id = rec.id + line.factor = line.move_id.name + if len(self) == 1 and items: action = self.env.ref( "account.action_move_journal_line" )._get_action_dict() action["name"] = _(f"Journal Entries from {rec.display_name}") - action["domain"] = f"[('id', 'in', {res.ids})]" + action["domain"] = f"[('id', 'in', {items.ids})]" action["context"] = { "default_move_type": "entry", "view_no_maturity": True, } return action + return items else: raise UserError( _( diff --git a/account_factoring_receivable_balance/views/account_move_line.xml b/account_factoring_receivable_balance/views/account_move_line.xml index 9f941de..7b8ffdd 100644 --- a/account_factoring_receivable_balance/views/account_move_line.xml +++ b/account_factoring_receivable_balance/views/account_move_line.xml @@ -6,7 +6,7 @@ - + @@ -18,17 +18,17 @@ diff --git a/account_factoring_receivable_balance_eurofactor/i18n/account_factoring_receivable_balance_eurofactor.pot b/account_factoring_receivable_balance_eurofactor/i18n/account_factoring_receivable_balance_eurofactor.pot new file mode 100644 index 0000000..d860089 --- /dev/null +++ b/account_factoring_receivable_balance_eurofactor/i18n/account_factoring_receivable_balance_eurofactor.pot @@ -0,0 +1,234 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_factoring_receivable_balance_eurofactor +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/company.py:0 +#, python-format +msgid " Configuration aborted" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.actions.report,print_report_name:account_factoring_receivable_balance_eurofactor.subrogation_report_meta +msgid "'Eurofactor - %s - %s' % (object.id, object.company_id.name)" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,help:account_factoring_receivable_balance_eurofactor.field_account_journal__factor_data +msgid "A saisir dans ce champ des clés / valeurs séparées par des =" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_move__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_move_line__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_company__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner_id_number__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_subrogation_receipt__assigned_attachment_ids +msgid "Assigned Attachments" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_res_partner +msgid "Contact" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factoring_current_acc_exp_id +msgid "Current Account export" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_subrogation_receipt +msgid "Customer balance data for factoring" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner_id_number__dummy +msgid "Dummy" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_move_line__eurofactor_ref +msgid "Eurof" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields.selection,name:account_factoring_receivable_balance_eurofactor.selection__account_journal__factor_type__eurof +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_move_line_tree +msgid "Eurofactor" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.res_partner_view_search +msgid "Eurofactor Id" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.res_partner_view_search +msgid "Eurofactor Journal" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.res_partner_view_search +msgid "Eurofactor OK" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_brand__eurofactor_ref +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner__eurofactor_ref +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_users__eurofactor_ref +msgid "Eurofactor Ref" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factor_type +msgid "Factor" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Factor 411 lettré" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Factor 411 à lettrer" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Factor 4671 lettré" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Factor 4671 à lettrer" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_brand__factor_bank_id +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner__factor_bank_id +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_users__factor_bank_id +msgid "Factor Bank" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factor_data +msgid "Factor Data" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factor_settings +msgid "Factor Settings" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.res_partner_view_search +msgid "Factor bank" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:res.partner.id_category,name:account_factoring_receivable_balance_eurofactor.eurofactor_id_category +msgid "FactorCA" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/company.py:0 +#, python-format +msgid "Go to accounting chart configuration" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factoring_holdback_acc_exp_id +msgid "Holdback Account export" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_account_journal +msgid "Journal" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_move_line__factor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Match" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py:0 +#, python-format +msgid "Missing export account on factor journal" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/company.py:0 +#, python-format +msgid "Not yet implemented" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_res_partner_id_number +msgid "Partner ID Number" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factoring_pending_recharging_acc_exp_id +msgid "Pending Recharging Account export" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.actions.report,name:account_factoring_receivable_balance_eurofactor.subrogation_report_meta +msgid "Quittance subrogative" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Subrogation" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/company.py:0 +#, python-format +msgid "" +"The accounting chart installed in this company is not the french one. " +"Install it first" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,help:account_factoring_receivable_balance_eurofactor.field_account_move_line__factor +msgid "Utilisé pour faciliter le lettrage" +msgstr "" diff --git a/account_factoring_receivable_balance_eurofactor/i18n/fr.po b/account_factoring_receivable_balance_eurofactor/i18n/fr.po new file mode 100644 index 0000000..26aac2c --- /dev/null +++ b/account_factoring_receivable_balance_eurofactor/i18n/fr.po @@ -0,0 +1,240 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_factoring_receivable_balance_eurofactor +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: Poedit 3.0.1\n" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/company.py:0 +#, python-format +msgid " Configuration aborted" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.actions.report,print_report_name:account_factoring_receivable_balance_eurofactor.subrogation_report_meta +msgid "'Eurofactor - %s - %s' % (object.id, object.company_id.name)" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,help:account_factoring_receivable_balance_eurofactor.field_account_journal__factor_data +msgid "A saisir dans ce champ des clés / valeurs séparées par des =" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_move__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_move_line__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_company__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner_id_number__assigned_attachment_ids +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_subrogation_receipt__assigned_attachment_ids +msgid "Assigned Attachments" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_res_partner +msgid "Contact" +msgstr "Contact" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factoring_current_acc_exp_id +msgid "Current Account export" +msgstr "Compte courant export" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_subrogation_receipt +msgid "Customer balance data for factoring" +msgstr "Données de la balance client pour le factor" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner_id_number__dummy +msgid "Dummy" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_move_line__eurofactor_ref +msgid "Eurof" +msgstr "Eurof" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields.selection,name:account_factoring_receivable_balance_eurofactor.selection__account_journal__factor_type__eurof +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_move_line_tree +msgid "Eurofactor" +msgstr "Eurofactor" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.res_partner_view_search +msgid "Eurofactor Id" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.res_partner_view_search +msgid "Eurofactor Journal" +msgstr "Eurofactor Journal" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.res_partner_view_search +msgid "Eurofactor OK" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_brand__eurofactor_ref +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner__eurofactor_ref +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_users__eurofactor_ref +msgid "Eurofactor Ref" +msgstr "Eurofactor Ref" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factor_type +msgid "Factor" +msgstr "Factor" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Factor 411 lettré" +msgstr "Factor 411 lettré" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Factor 411 à lettrer" +msgstr "Factor 411 à lettrer" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Factor 4671 lettré" +msgstr "Factor 4671 lettré" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Factor 4671 à lettrer" +msgstr "Factor 4671 à lettrer" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_brand__factor_bank_id +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_partner__factor_bank_id +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_res_users__factor_bank_id +msgid "Factor Bank" +msgstr "Factor banque" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factor_data +msgid "Factor Data" +msgstr "Factor Data" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factor_settings +msgid "Factor Settings" +msgstr "Factor Settings" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.res_partner_view_search +msgid "Factor bank" +msgstr "Factor bank" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:res.partner.id_category,name:account_factoring_receivable_balance_eurofactor.eurofactor_id_category +msgid "FactorCA" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/company.py:0 +#, python-format +msgid "Go to accounting chart configuration" +msgstr "Aller à la configuration du plan comptable" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factoring_holdback_acc_exp_id +msgid "Holdback Account export" +msgstr "Compte de retenue export" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_account_journal +msgid "Journal" +msgstr "Journal" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_account_move +msgid "Journal Entry" +msgstr "Pièce comptable" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_account_move_line +msgid "Journal Item" +msgstr "Écriture comptable" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_move_line__factor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Match" +msgstr "Match" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py:0 +#, python-format +msgid "Missing export account on factor journal" +msgstr "Missing export account on factor journal" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/company.py:0 +#, python-format +msgid "Not yet implemented" +msgstr "" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model,name:account_factoring_receivable_balance_eurofactor.model_res_partner_id_number +msgid "Partner ID Number" +msgstr "Partner ID Number" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,field_description:account_factoring_receivable_balance_eurofactor.field_account_journal__factoring_pending_recharging_acc_exp_id +msgid "Pending Recharging Account export" +msgstr "Compte d'attente de rechargement export" + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.actions.report,name:account_factoring_receivable_balance_eurofactor.subrogation_report_meta +msgid "Quittance subrogative" +msgstr "Quittance" + +#. module: account_factoring_receivable_balance_eurofactor +#: model_terms:ir.ui.view,arch_db:account_factoring_receivable_balance_eurofactor.view_account_move_line_filter +msgid "Subrogation" +msgstr "Quittance" + +#. module: account_factoring_receivable_balance_eurofactor +#. odoo-python +#: code:addons/account_factoring_receivable_balance_eurofactor/models/company.py:0 +#, python-format +msgid "" +"The accounting chart installed in this company is not the french one. " +"Install it first" +msgstr "" +"Le plan comptable installé dans cette société n'est pas celui de la " +"France. Installez le d'abord." + +#. module: account_factoring_receivable_balance_eurofactor +#: model:ir.model.fields,help:account_factoring_receivable_balance_eurofactor.field_account_move_line__factor +msgid "Utilisé pour faciliter le lettrage" +msgstr "" diff --git a/account_factoring_receivable_balance_eurofactor/models/account_move.py b/account_factoring_receivable_balance_eurofactor/models/account_move.py index 3939607..c8b1ebb 100644 --- a/account_factoring_receivable_balance_eurofactor/models/account_move.py +++ b/account_factoring_receivable_balance_eurofactor/models/account_move.py @@ -20,6 +20,7 @@ class AccountMoveLine(models.Model): _inherit = "account.move.line" eurofactor_ref = fields.Char(related="partner_id.eurofactor_ref", string="Eurof") + factor = fields.Char(string="Match", help="Utilisé pour faciliter le lettrage") def _eurof_fields_rpt(self): partner = self.partner_id.commercial_partner_id diff --git a/account_factoring_receivable_balance_eurofactor/models/company.py b/account_factoring_receivable_balance_eurofactor/models/company.py index 8985b70..ccbf697 100644 --- a/account_factoring_receivable_balance_eurofactor/models/company.py +++ b/account_factoring_receivable_balance_eurofactor/models/company.py @@ -126,13 +126,13 @@ def _configure_eurof_factoring(self): acc = {} suffix = self._get_factor_shortname() for acco in ( - ["4115", "Factoring Receivable", "income", suffix], - ["4671", "Factoring Current", "income", suffix], - ["4672", "Factoring Holdback", "income", suffix], - ["4673", "Factoring Recharging", "income", suffix], - ["4671", "Factoring Current exp", "income", "CE"], - ["4672", "Factoring Holdback exp", "income", "CE"], - ["4673", "Factoring Recharging exp", "income", "CE"], + ["4115", "Factoring Receivable", "liability_current", suffix], + ["4671", "Factoring Current", "liability_current", suffix], + ["4672", "Factoring Holdback", "liability_current", suffix], + ["4673", "Factoring Recharging", "liability_current", suffix], + ["4671", "Factoring Current exp", "liability_current", "CE"], + ["4672", "Factoring Holdback exp", "liability_current", "CE"], + ["4673", "Factoring Recharging exp", "liability_current", "CE"], ): code = f"{acco[0]}{acco[3]}" values = {"code": code, "name": acco[1], "account_type": acco[2]} diff --git a/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py b/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py index 659446e..6e4be65 100644 --- a/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py +++ b/account_factoring_receivable_balance_eurofactor/models/subrogation_receipt.py @@ -35,12 +35,15 @@ def get_current_account_lines(move_lines, account_field): return [ Command.create( { - "date": fields.date.today(), + # 4671 account "account_id": fact_journal[account_field].id, + "date": fields.date.today(), "name": x.name, "debit": x.credit, "credit": x.debit, - "subrogation_id": self.id, + "subro_id": self.id, + "factor": x.move_id.name, + "partner_id": x.move_id.partner_id.commercial_partner_id.id, } ) for x in move_lines @@ -57,33 +60,30 @@ def get_current_account_lines(move_lines, account_field): ) ) name = f"{self.display_name} N° {self.id}" - fr_lines.append( - Command.create( - { - "date": fields.date.today(), - "account_id": fact_journal.factoring_holdback_account_id.id, - "name": f"total {name} france", - "debit": sum(self.line_ids._eurof_market().mapped("debit")), - "credit": sum(self.line_ids._eurof_market().mapped("credit")), - "subrogation_id": self.id, - } - ) - ) - export_lines.append( - Command.create( + + def get_holdback_account_lines(account_field, export=False): + where = "france" + if export: + where = "export" + return Command.create( { + # 4672 account + "account_id": fact_journal[account_field]["id"], "date": fields.date.today(), - "account_id": fact_journal.factoring_holdback_acc_exp_id.id, - "name": f"total {name} export", + "name": f"total {name} {where}", "debit": sum( - self.line_ids._eurof_market(export=True).mapped("debit") + self.line_ids._eurof_market(export=export).mapped("debit") ), "credit": sum( - self.line_ids._eurof_market(export=True).mapped("credit") + self.line_ids._eurof_market(export=export).mapped("credit") ), "subrogation_id": self.id, } ) + + fr_lines.append(get_holdback_account_lines("factoring_holdback_account_id")) + export_lines.append( + get_holdback_account_lines("factoring_holdback_acc_exp_id", export=True) ) fr_vals = { "journal_id": fact_journal.id, diff --git a/account_factoring_receivable_balance_eurofactor/views/account_move_line.xml b/account_factoring_receivable_balance_eurofactor/views/account_move_line.xml index 6494e9b..cc93918 100644 --- a/account_factoring_receivable_balance_eurofactor/views/account_move_line.xml +++ b/account_factoring_receivable_balance_eurofactor/views/account_move_line.xml @@ -7,6 +7,7 @@ + @@ -18,15 +19,43 @@ ref="account_factoring_receivable_balance.view_account_move_line_filter" /> - + + + + + + + + + -