[FIX+IMP] intrastat_*: Several things:

* Add readonly on some fields when state of declaration is done
* Division by zero in computation of accessory costs
* Add FR translation
* Fix strings
* Minor code updates
This commit is contained in:
Alexis de Lattre
2018-12-10 15:07:40 +01:00
parent ede9eb6277
commit 9d52c384e3
2 changed files with 232 additions and 6 deletions

227
intrastat_base/i18n/fr.po Normal file
View File

@@ -0,0 +1,227 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * intrastat_base
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-29 09:52+0000\n"
"PO-Revision-Date: 2018-12-29 09:52+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: intrastat_base
#: model:ir.model.fields,help:intrastat_base.field_product_product_is_accessory_cost
#: model:ir.model.fields,help:intrastat_base.field_product_template_is_accessory_cost
msgid "Activate this option for shipping costs, packaging costs and all services related to the sale of products. This option is used for Intrastat reports."
msgstr "Activer cette option pour les frais de port, les frais d'emballage et tous les services associés à la vente de produits. Cette option est utilisée pour la DEB et la DES."
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:150
#, python-format
msgid "Cannot delete the declaration %s because it is in Done state"
msgstr "Impossible de supprimer la déclaration %s parce qu'elle est à l'état 'Terminé'."
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_intrastat_common
msgid "Common functions for intrastat reports for products "
msgstr "Common functions for intrastat reports for products "
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_res_company
msgid "Companies"
msgstr "Sociétés"
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:35
#, python-format
msgid "Company not yet set on intrastat report."
msgstr "Société non configurée sur le rapport DEB/DES."
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_res_country
msgid "Country"
msgstr "Pays"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_create_uid
msgid "Created by"
msgstr "Créé par"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_create_date
msgid "Created on"
msgstr "Créé le"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common_display_name
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_display_name
msgid "Display Name"
msgstr "Afficher le nom"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_res_country_intrastat
#: model:ir.ui.view,arch_db:intrastat_base.res_country_view_search
msgid "EU Country"
msgstr "Membre de l'UE"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_account_tax_exclude_from_intrastat_if_present
#: model:ir.model.fields,field_description:intrastat_base.field_account_tax_template_exclude_from_intrastat_if_present
msgid "Exclude invoice line from intrastat if this tax is present"
msgstr "Ligne de facture exclue de la DEB et de la DES si cette taxe est présente"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common_id
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_id
msgid "ID"
msgstr "ID"
#. module: intrastat_base
#: model:ir.model.fields,help:intrastat_base.field_account_tax_exclude_from_intrastat_if_present
#: model:ir.model.fields,help:intrastat_base.field_account_tax_template_exclude_from_intrastat_if_present
msgid "If this tax is present on an invoice line, this invoice line will be skipped when generating Intrastat Product or Service lines from invoices."
msgstr "Si cette taxe est présente sur une ligne de facture, cette ligne de facture sera sautée lors de la génération de la DEB et de la DES à partir des factures."
#. module: intrastat_base
#: model:ir.ui.menu,name:intrastat_base.menu_intrastat_base_root
#: model:ir.ui.menu,name:intrastat_base.menu_intrastat_config_root
#: model:ir.ui.view,arch_db:intrastat_base.view_intrastat_res_config_settings
msgid "Intrastat"
msgstr "DEB/DES"
#. module: intrastat_base
#: model:ir.ui.view,arch_db:intrastat_base.product_template_form_view
msgid "Intrastat Properties"
msgstr "Propriétés DEB/DES"
#. module: intrastat_base
#: model:ir.ui.view,arch_db:intrastat_base.intrastat_result_view_form
msgid "Intrastat Result View"
msgstr "Résultat DEB"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_product_product_is_accessory_cost
#: model:ir.model.fields,field_description:intrastat_base.field_product_template_is_accessory_cost
msgid "Is accessory cost"
msgstr "Est un frais accessoire"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_common___last_update
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view___last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_write_uid
msgid "Last Updated by"
msgstr "Dernière modification par"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_write_date
msgid "Last Updated on"
msgstr "Dernière modification le"
#. module: intrastat_base
#: model:ir.model.fields,help:intrastat_base.field_res_company_intrastat_remind_user_ids
#: model:ir.model.fields,help:intrastat_base.field_res_config_settings_intrastat_remind_user_ids
msgid "List of Odoo users who will receive a notification to remind them about the Intrastat declaration."
msgstr "Liste d'utilisateurs Odoo qui recevront un rappel pour la DEB/DES."
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_res_company_intrastat_email_list
msgid "List of emails of Users Receiving the Intrastat Reminder"
msgstr "Liste des emails des utilisateurs qui reçoivent le rappel DEB/DES"
#. module: intrastat_base
#: code:addons/intrastat_base/models/res_company.py:38
#, python-format
msgid "Missing e-mail address on user '%s'."
msgstr "Adresse e-mail manquante pour l'utilisateur '%s'."
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_intrastat_result_view_note
msgid "Notes"
msgstr "Notes"
#. module: intrastat_base
#: model:ir.ui.view,arch_db:intrastat_base.intrastat_result_view_form
msgid "Ok"
msgstr "Ok"
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_product_template
msgid "Product Template"
msgstr "Modèle d'article"
#. module: intrastat_base
#: model:ir.ui.view,arch_db:intrastat_base.res_country_view_search
msgid "Search Countries"
msgstr "Recherche pays"
#. module: intrastat_base
#: model:ir.model.fields,help:intrastat_base.field_res_country_intrastat
msgid "Set to True for all European Union countries."
msgstr "Cocher la case pour tous les pays de l'Union Européenne."
#. module: intrastat_base
#: model:product.product,name:intrastat_base.shipping_costs_exclude
#: model:product.template,name:intrastat_base.shipping_costs_exclude_product_template
msgid "Shipping costs"
msgstr "Frais de port"
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_account_tax
msgid "Tax"
msgstr "Taxe"
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_account_tax_template
msgid "Templates for Taxes"
msgstr "Modèles pour les taxes"
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:48
#, python-format
msgid "The VAT number is not set for the partner '%s'."
msgstr "Numéro de TVA non renseigné sur le partenaire '%s'."
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:39
#, python-format
msgid "The country is not set on the company '%s'."
msgstr "Pays non renseigné sur la société '%s'."
#. module: intrastat_base
#: code:addons/intrastat_base/models/intrastat_common.py:70
#, python-format
msgid "The generated XML file is not valid against the official XML Schema Definition. The generated XML file and the full error have been written in the server logs. Here is the error, which may give you an idea on the cause of the problem : %s."
msgstr "Le fichier XML n'est pas valide au regard du schéma de définition XML. Le fichier XML généré et l'erreur complète ont été écrits dans les logs du serveur Odoo. Voici l'erreur, qui pourrait vous aiguiller sur la cause du problème : %s."
#. module: intrastat_base
#: code:addons/intrastat_base/models/product_template.py:23
#, python-format
msgid "The option 'Is accessory cost?' should only be activated on 'Service' products. You have activated this option for the product '%s' which is of type '%s'"
msgstr "L'option 'Est un frais accessoire' ne doit être activée que sur des articles de service. Vous avez activé cette option pour l'article '%s' qui est de type '%s'"
#. module: intrastat_base
#: model:ir.model.fields,field_description:intrastat_base.field_res_company_intrastat_remind_user_ids
#: model:ir.model.fields,field_description:intrastat_base.field_res_config_settings_intrastat_remind_user_ids
msgid "Users Receiving the Intrastat Reminder"
msgstr "Utilisateurs qui reçoivent le rappel DEB/DES"
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_intrastat_result_view
msgid "intrastat.result.view"
msgstr "intrastat.result.view"
#. module: intrastat_base
#: model:ir.model,name:intrastat_base.model_res_config_settings
msgid "res.config.settings"
msgstr "res.config.settings"

View File

@@ -19,9 +19,8 @@ class ProductTemplate(models.Model):
def _check_accessory_cost(self):
for this in self:
if this.is_accessory_cost and this.type != 'service':
raise ValidationError(
_("The option 'Is accessory cost?' should only be "
"activated on 'Service' products. You have activated "
"this option for the product '%s' which is of type "
"'%s'") %
(this.name, this.type))
raise ValidationError(_(
"The option 'Is accessory cost' should only be "
"activated on 'Service' products. You have activated "
"this option for the product '%s' which is of type "
"'%s'") % (this.name, this.type))