Compare commits

...

3 Commits

  1. 67
      beesdoo_account/i18n/fr.po
  2. 67
      beesdoo_account/i18n/fr_BE.po
  3. 67
      beesdoo_account/i18n/fr_CH.po
  4. 16
      beesdoo_account/models/account_invoice.py
  5. 3
      beesdoo_account/readme/DESCRIPTION.rst

67
beesdoo_account/i18n/fr.po

@ -0,0 +1,67 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * beesdoo_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 07:45+0000\n"
"PO-Revision-Date: 2020-09-28 07:45+0000\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: beesdoo_account
#: model:ir.model.fields,field_description:beesdoo_account.field_res_config_settings__group_validate_invoice_negative_total_amount
msgid "Allow validating an invoice with a negative total amount"
msgstr "Autoriser la validation d'une facture avec un montant total négatif"
#. module: beesdoo_account
#: model:ir.model.fields,help:beesdoo_account.field_res_config_settings__group_validate_invoice_negative_total_amount
msgid "Allows you to validate an invoice with a negative total amount"
msgstr "Permet de valider une facture avec un montant total négatif"
#. module: beesdoo_account
#: model:ir.model,name:beesdoo_account.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de configuration"
#. module: beesdoo_account
#: model:ir.model,name:beesdoo_account.model_account_invoice
msgid "Invoice"
msgstr "Facture"
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:28
#, python-format
msgid "Invoice must be in draft state in order to validate it."
msgstr "Pour pouvoir être validée, la facture doit être à l'état de brouillon."
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:32
#, python-format
msgid ""
"No account was found to create the invoice, be sure you have installed a "
"chart of account."
msgstr ""
"Aucun compte n'a été trouvé pour créer la facture, vérifiez que vous avez "
"bien installé un plan comptable."
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:22
#, python-format
msgid ""
"The field Vendor is required, please complete it to validate the Vendor "
"Bill."
msgstr ""
"Le champ Vendeur est requis, veuillez le compléter pour valider cette "
"facture d'achat."
#. module: beesdoo_account
#: model:res.groups,name:beesdoo_account.group_validate_invoice_negative_total_amount
msgid "Validate an invoice with a negative total amount"
msgstr "Valider une facture avec un montant total négatif"

67
beesdoo_account/i18n/fr_BE.po

@ -0,0 +1,67 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * beesdoo_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 07:45+0000\n"
"PO-Revision-Date: 2020-09-28 07:45+0000\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: beesdoo_account
#: model:ir.model.fields,field_description:beesdoo_account.field_res_config_settings__group_validate_invoice_negative_total_amount
msgid "Allow validating an invoice with a negative total amount"
msgstr "Autoriser la validation d'une facture avec un montant total négatif"
#. module: beesdoo_account
#: model:ir.model.fields,help:beesdoo_account.field_res_config_settings__group_validate_invoice_negative_total_amount
msgid "Allows you to validate an invoice with a negative total amount"
msgstr "Permet de valider une facture avec un montant total négatif"
#. module: beesdoo_account
#: model:ir.model,name:beesdoo_account.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de configuration"
#. module: beesdoo_account
#: model:ir.model,name:beesdoo_account.model_account_invoice
msgid "Invoice"
msgstr "Facture"
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:28
#, python-format
msgid "Invoice must be in draft state in order to validate it."
msgstr "Pour pouvoir être validée, la facture doit être à l'état de brouillon."
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:32
#, python-format
msgid ""
"No account was found to create the invoice, be sure you have installed a "
"chart of account."
msgstr ""
"Aucun compte n'a été trouvé pour créer la facture, vérifiez que vous avez "
"bien installé un plan comptable."
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:22
#, python-format
msgid ""
"The field Vendor is required, please complete it to validate the Vendor "
"Bill."
msgstr ""
"Le champ Vendeur est requis, veuillez le compléter pour valider cette "
"facture d'achat."
#. module: beesdoo_account
#: model:res.groups,name:beesdoo_account.group_validate_invoice_negative_total_amount
msgid "Validate an invoice with a negative total amount"
msgstr "Valider une facture avec un montant total négatif"

67
beesdoo_account/i18n/fr_CH.po

@ -0,0 +1,67 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * beesdoo_account
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-28 07:45+0000\n"
"PO-Revision-Date: 2020-09-28 07:45+0000\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: beesdoo_account
#: model:ir.model.fields,field_description:beesdoo_account.field_res_config_settings__group_validate_invoice_negative_total_amount
msgid "Allow validating an invoice with a negative total amount"
msgstr "Autoriser la validation d'une facture avec un montant total négatif"
#. module: beesdoo_account
#: model:ir.model.fields,help:beesdoo_account.field_res_config_settings__group_validate_invoice_negative_total_amount
msgid "Allows you to validate an invoice with a negative total amount"
msgstr "Permet de valider une facture avec un montant total négatif"
#. module: beesdoo_account
#: model:ir.model,name:beesdoo_account.model_res_config_settings
msgid "Config Settings"
msgstr "Paramètres de configuration"
#. module: beesdoo_account
#: model:ir.model,name:beesdoo_account.model_account_invoice
msgid "Invoice"
msgstr "Facture"
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:28
#, python-format
msgid "Invoice must be in draft state in order to validate it."
msgstr "Pour pouvoir être validée, la facture doit être à l'état de brouillon."
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:32
#, python-format
msgid ""
"No account was found to create the invoice, be sure you have installed a "
"chart of account."
msgstr ""
"Aucun compte n'a été trouvé pour créer la facture, vérifiez que vous avez "
"bien installé un plan comptable."
#. module: beesdoo_account
#: code:addons/beesdoo_account/models/account_invoice.py:22
#, python-format
msgid ""
"The field Vendor is required, please complete it to validate the Vendor "
"Bill."
msgstr ""
"Le champ Vendeur est requis, veuillez le compléter pour valider cette "
"facture d'achat."
#. module: beesdoo_account
#: model:res.groups,name:beesdoo_account.group_validate_invoice_negative_total_amount
msgid "Validate an invoice with a negative total amount"
msgstr "Valider une facture avec un montant total négatif"

16
beesdoo_account/models/account_invoice.py

@ -1,4 +1,5 @@
from odoo import api, fields, models, _
from odoo.tools import float_compare
from odoo.exceptions import UserError
@ -7,16 +8,23 @@ class AccountInvoice(models.Model):
@api.multi
def action_invoice_open(self):
to_open_invoices = self.filtered(lambda inv: inv.state != "open")
if self.user_has_groups(
"beesdoo_account." "group_validate_invoice_negative_total_amount"
) and to_open_invoices.filtered(
lambda inv: float_compare(
inv.amount_total,
0.0,
precision_rounding=inv.currency_id.rounding,
)
== -1
):
return self.action_invoice_negative_amount_open()
return self.action_invoice_negative_amount_open(to_open_invoices)
return super(AccountInvoice, self).action_invoice_open()
@api.multi
def action_invoice_negative_amount_open(self):
"""Identical to action_invoice_open without UserError on an invoice with a negative total amount"""
to_open_invoices = self.filtered(lambda inv: inv.state != "open")
def action_invoice_negative_amount_open(self, to_open_invoices):
"""Similar to action_invoice_open without UserError on an invoice with a negative total amount"""
if to_open_invoices.filtered(lambda inv: not inv.partner_id):
raise UserError(
_(

3
beesdoo_account/readme/DESCRIPTION.rst

@ -1 +1,2 @@
Module that customize account module for Beescoop.
- Makes date_invoice field required in account.invoice_form and account.invoice_supplier_form
- Allow validating an invoice with a negative total amount
Loading…
Cancel
Save