Skip to content
Snippets Groups Projects
Commit 1ba8d4109b0c authored by Etienne Ferriere's avatar Etienne Ferriere
Browse files

Added the possibility to search accounting entries function of the partner in

the account consultation wizard.
Updated the translations.
parent ded8edeec5a9
No related branches found
No related tags found
No related merge requests found
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_report
#
# * account_report
# Etienne Ferriere <etienne.ferriere@xcg-consulting.fr>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
......@@ -5,12 +5,12 @@
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-02 12:00+0200\n"
"PO-Revision-Date: 2019-08-02 12:02+0200\n"
"Last-Translator: Houzéfa Abbasbhay <houzefa.abba@xcg-consulting.fr>\n"
"Language-Team: \n"
"POT-Creation-Date: 2019-12-05 13:28+0000\n"
"PO-Revision-Date: 2019-12-05 14:29+0200\n"
"Last-Translator: Etienne Ferriere <etienne.ferriere@xcg-consulting.fr>\n"
"Language-Team: XCG Consulting\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
......@@ -13,9 +13,9 @@
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 1.8.7.1\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Virtaal 0.7.1\n"
#. module: account_report
#: model:ir.ui.view,arch_db:account_report.account_consultation_main
......@@ -19,11 +19,9 @@
#. module: account_report
#: model:ir.ui.view,arch_db:account_report.account_consultation_main
msgid ""
"<span>\n"
" <i class=\"fa fa-file-text-o\" aria-hidden=\"true"
"\"/>\n"
msgid "<span>\n"
" <i class=\"fa fa-file-text-o\" aria-hidden=\"true\"/>\n"
" Print the statement\n"
" </span>"
msgstr ""
"<span>\n"
......@@ -26,11 +24,11 @@
" Print the statement\n"
" </span>"
msgstr ""
"<span>\n"
" <i class=\"fa fa-file-text-o\" aria-hidden=\"true"
"\"/>\n"
" <i class=\"fa fa-file-text-o\" aria-hidden=\""
"true\"/>\n"
" Imprimer le relevé\n"
" </span>"
#. module: account_report
#: model:ir.ui.view,arch_db:account_report.account_consultation_main
......@@ -32,10 +30,9 @@
" Imprimer le relevé\n"
" </span>"
#. module: account_report
#: model:ir.ui.view,arch_db:account_report.account_consultation_main
msgid ""
"<span>\n"
msgid "<span>\n"
" <i class=\"fa fa-list\" aria-hidden=\"true\"/>\n"
" Open the analytic list\n"
" </span>"
......@@ -47,8 +44,7 @@
#. module: account_report
#: model:ir.ui.view,arch_db:account_report.account_consultation_main
msgid ""
"<span>\n"
msgid "<span>\n"
" <i class=\"fa fa-list\" aria-hidden=\"true\"/>\n"
" Open the general list\n"
" </span>"
......@@ -76,7 +72,7 @@
msgstr "Consultation compte"
#. module: account_report
#: code:addons/account_report/wizards/account_consultation.py:185
#: code:addons/account_report/wizards/account_consultation.py:194
#, python-format
msgid "Account consultation - %s"
msgstr "Consultation compte - %s"
......@@ -107,7 +103,7 @@
msgstr "Compte comptable"
#. module: account_report
#: code:addons/account_report/wizards/account_consultation.py:370
#: code:addons/account_report/wizards/account_consultation.py:406
#, python-format
msgid "Accounting entries found have no reference."
msgstr "Les écritures comptables trouvées n'ont pas de référence."
......@@ -118,7 +114,7 @@
msgstr "Tous"
#. module: account_report
#: code:addons/account_report/wizards/account_consultation.py:251
#: code:addons/account_report/wizards/account_consultation.py:263
#, python-format
msgid "Analytic list"
msgstr "Liste analytique"
......@@ -176,7 +172,7 @@
msgstr "Filtrer les transactions selon leur état."
#. module: account_report
#: code:addons/account_report/wizards/account_consultation.py:239
#: code:addons/account_report/wizards/account_consultation.py:251
#, python-format
msgid "General list"
msgstr "Liste générale"
......@@ -260,8 +256,8 @@
msgstr "Références trouvées"
#. module: account_report
#: code:addons/account_report/wizards/account_consultation.py:207
#: code:addons/account_report/wizards/account_consultation.py:268
#: code:addons/account_report/wizards/account_consultation.py:219
#: code:addons/account_report/wizards/account_consultation.py:280
#: model:ir.ui.view,arch_db:account_report.account_consultation_main
#, python-format
msgid "No accounting entry could be found with the specified parameters."
......@@ -274,6 +270,11 @@
msgstr "Montant payé"
#. module: account_report
#: model:ir.model.fields,field_description:account_report.field_account_consultation_partner_id
msgid "Partner"
msgstr "Partenaire"
#. module: account_report
#: model:ir.model.fields,field_description:account_report.field_account_consultation_period_closed_state
msgid "Period closed state (Utility)"
msgstr "Period closed state (Utility)"
......@@ -322,10 +323,7 @@
#. module: account_report
#: model:ir.model.fields,help:account_report.field_account_consultation_period_from_id
msgid ""
"The earliest accounting period to include transactions from. Both open and "
"closed accounting periods may be selected here when the \"Include closed "
"periods\" box is checked."
msgid "The earliest accounting period to include transactions from. Both open and closed accounting periods may be selected here when the \"Include closed periods\" box is checked."
msgstr ""
"La période comptable la plus ancienne à partir de laquelle les transactions "
"sont à inclure. Les périodes ouvertes comme fermées peuvent être "
......@@ -348,8 +346,7 @@
#. module: account_report
#: model:ir.model.fields,help:account_report.field_account_consultation_ref_to
msgid "The last reference to include transactions to."
msgstr ""
"La dernière référence jusqu'à laquelle les transactions sont à inclure."
msgstr "La dernière référence jusqu'à laquelle les transactions sont à inclure."
#. module: account_report
#: model:ir.model.fields,help:account_report.field_account_consultation_period_to_id
......@@ -353,10 +350,7 @@
#. module: account_report
#: model:ir.model.fields,help:account_report.field_account_consultation_period_to_id
msgid ""
"The latest accounting period to include transactions to. Both open and "
"closed accounting periods may be selected here when the \"Include closed "
"periods\" box is checked."
msgid "The latest accounting period to include transactions to. Both open and closed accounting periods may be selected here when the \"Include closed periods\" box is checked."
msgstr ""
"La période comptable la plus récente jusqu'à laquelle les transactions sont "
"à inclure. Les périodes ouvertes comme fermées peuvent être sélectionnées "
......@@ -370,6 +364,11 @@
"inclure."
#. module: account_report
#: model:ir.model.fields,help:account_report.field_account_consultation_partner_id
msgid "The partner to consult."
msgstr "Le partenaire à consulter."
#. module: account_report
#: model:ir.ui.view,arch_db:account_report.account_consultation_analytic_aml_list
#: model:ir.ui.view,arch_db:account_report.account_consultation_general_aml_list
msgid "Total"
......
......@@ -34,7 +34,6 @@
string="Accounting account",
ondelete="cascade",
help="The accounting account to consult.",
required=True,
)
account_type_id = fields.Many2one(
......@@ -74,6 +73,13 @@
readonly=True,
)
partner_id = fields.Many2one(
comodel_name="res.partner",
string="Partner",
ondelete="cascade",
help="The partner to consult.",
)
@api.depends("include_closed_periods")
@api.one
def _get_period_closed_state(self):
......@@ -178,8 +184,10 @@
def name_get(self):
"""Override to name this record as we display it inline."""
account = self.account_id
# 0 & 1 below: name_get returns a list of (ID, name) tuples.
return (
self.id,
(
_("Account consultation - %s")
......@@ -181,9 +189,13 @@
# 0 & 1 below: name_get returns a list of (ID, name) tuples.
return (
self.id,
(
_("Account consultation - %s")
% self.account_id.name_get()[0][1]
% (
account.name_get()[0][1]
if account
else self.partner_id.name_get()[0][1]
)
),
)
......@@ -302,7 +314,11 @@
accounting entries.
"""
aml_domain = [("account_id", "=", self.account_id.id)]
aml_domain = []
if self.partner_id:
aml_domain += self._build_aml_partner_domain()
if self.account_id:
aml_domain += [("account_id", "=", self.account_id.id)]
period_states = ["draft"]
if self.include_closed_periods:
......@@ -340,6 +356,26 @@
return aml_domain
@api.multi
def _build_aml_partner_domain(self):
partner = self.partner_id
partner_fields = self._get_aml_partner_fields()
accounts = self.env["account.account"]
for partner_field in partner_fields:
accounts |= getattr(partner, partner_field)
return [("account_id", "in", accounts.ids)]
@api.model
def _get_aml_partner_fields(self):
return [
"property_account_receivable_id",
"property_account_payable_id",
]
def _refresh_ref_preview(self):
"""Update the ref preview."""
......
......@@ -18,7 +18,11 @@
<field name="account_type_id" string="Type"
options="{'no_create': 1}" style="max-width: 200px;" />
<field name="account_id" options="{'no_create': True}"
style="max-width: 400px;" />
style="max-width: 400px;"
attrs="{'required': [('partner_id', '=', False)]}" />
<field name="partner_id" options="{'no_create': True}"
style="max-width: 400px;"
attrs="{'required': [('account_id', '=', False)]}" />
</group>
</group>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment