diff --git a/i18n/fr.po b/i18n/fr.po new file mode 100644 index 0000000000000000000000000000000000000000..25b596909ecd6245b09c40a405ba67eca83be337 --- /dev/null +++ b/i18n/fr.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-11-14 07:33+0000\n" +"PO-Revision-Date: 2018-08-24 09:14+0000\n" +"Last-Translator: Thomas Deleval <thd@odoo.com>, 2021\n" +"Language-Team: French (https://www.transifex.com/odoo/teams/41243/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account +#: model_terms:ir.ui.view,arch_db:account.account_journal_dashboard_kanban_view +msgid "Invoices to Validate" +msgstr "Factures à valider (HT)" diff --git a/models/__init__.py b/models/__init__.py index 74f1a87098afe9b64a209553cb56fdb80af03925..0acdefe9301960227e81143824c837e4d994683d 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -2,3 +2,4 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import account_invoice +from . import account_journal_dashboard diff --git a/models/account_journal_dashboard.py b/models/account_journal_dashboard.py new file mode 100644 index 0000000000000000000000000000000000000000..6564e78ffcffc9adfe19920b6c8ff8dd73713dcf --- /dev/null +++ b/models/account_journal_dashboard.py @@ -0,0 +1,28 @@ +# 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 models + + +class AccountJournal(models.Model): + _inherit = "account.journal" + + def _get_draft_bills_query(self): + """ + Surcharger pour prendre amount_untaxed_signed (Stored=True) et non + amount_untaxed_invoice_signed (pas Stored). + Ce qui permet d'afficher les sommes lors de la regroupement + """ + return ( + """ + SELECT + state, + amount_untaxed_signed AS amount_total, + inv.currency_id AS currency, + inv.type, + inv.date_invoice, + inv.company_id + FROM account_invoice inv + WHERE journal_id = %(journal_id)s AND state = 'draft';""", + {"journal_id": self.id}, + ) diff --git a/views/account_invoice_views.xml b/views/account_invoice_views.xml index c462f8683305aff8a0b079b9d5b41cdf6a92dded..72b6d20cf19cc8b028a4b2ddb2e64bd8e132f583 100644 --- a/views/account_invoice_views.xml +++ b/views/account_invoice_views.xml @@ -19,5 +19,30 @@ </xpath> </field> </record> + + <record id="legicoop_invoice_tree" model="ir.ui.view"> + <field name="name">legicoop.account.invoice.tree</field> + <field name="model">account.invoice</field> + <field name="inherit_id" ref="account.invoice_tree" /> + <field name="arch" type="xml"> + <xpath + expr="//field[@name='amount_untaxed_invoice_signed']" + position="attributes" + > + <attribute name="invisible">1</attribute> + </xpath> + <xpath + expr="//field[@name='amount_untaxed_invoice_signed']" + position="before" + > + <field + name="amount_untaxed_signed" + string="Total HT" + sum="Total HT" + /> + </xpath> + </field> + </record> + </data> </odoo>