Added error messages and fixed tryton cfg.

This commit is contained in:
José Miguel Pardo Salar 2022-06-28 09:34:21 +02:00
parent a970371c21
commit b78f042da4
9 changed files with 27 additions and 19 deletions

View File

@ -6,8 +6,6 @@ from trytond.pyson import Id
from trytond.modules.company.model import (
CompanyMultiValueMixin, CompanyValueMixin)
__all__ = ['Configuration', 'ConfigurationSequence']
class Configuration(
ModelSingleton, ModelSQL, ModelView, CompanyMultiValueMixin):

View File

@ -13,7 +13,6 @@ from io import open
import oyaml as yaml
import os
__all__ = ['EdocumentMessage', 'EdocumentTemplate']
KNOWN_EXTENSIONS = ['.txt', '.edi', '.pla']
@ -285,7 +284,7 @@ class EdocumentExportMixin(object):
edifact_receiver = [x for x in party.identifiers
if x.type == 'EDI_receiver']
if not edifact_receiver:
raise UserError(gettext('edocument_edifact.msg_EDI_receiver',
raise UserError(gettext('edocument_edifact.msg_party_EDI_receiver',
party=party.name))
template, encoding = self._edi_template(message_type, party)
loader = TextTemplate(template)

View File

@ -3,8 +3,6 @@
from trytond.model import fields
from trytond.pool import PoolMeta
__all__ = ['Rule']
class Rule(metaclass=PoolMeta):
__name__ = 'incoterm.rule'

View File

@ -18,7 +18,7 @@ msgctxt "model:ir.message,text:msg_EDI_sequence"
msgid "EDI Sequence must be defined in Edocument Configuration."
msgstr "Secuencia EDI debe definirse en Configuración de Documentación Electrónica."
msgctxt "model:ir.message,text:msg_EDI_receiver"
msgctxt "model:ir.message,text:msg_party_EDI_receiver"
msgid "Party \"%(party)s\" lacks EDI receiver identifier."
msgstr "El tercero \"%(party)s\" carece del identificador EDI de receptor"
@ -26,6 +26,18 @@ msgctxt "model:ir.message,text:msg_EDI_export_path"
msgid "EDI export path is not defined in Edocument Configuration."
msgstr "Ruta de exportación EDI no está definida en Configuración de Documentación Electrónica."
msgctxt "model:ir.message,text:msg_customer_unique"
msgid "Cannot send invoices for more than 1 customer"
msgstr "No se pueden enviar facturas a más de 1 cliente."
msgctxt "model:ir.message,text:msg_shipment_customer_unique"
msgid "Cannot send shipments for more than 1 customer"
msgstr ""No se pueden enviar albaranes a más de 1 cliente.""
msgctxt "model:ir.message,text:msg_customer_EDI_receiver"
msgid "Customer \"%(customer)s\" lacks EDI receiver identifier"
msgstr "El cliente \"%(customer)s\" no tiene identificador de receptor EDI."
msgctxt "field:edocument.configuration,create_date:"
msgid "Create Date"
msgstr "Fecha de creación"

View File

@ -6,18 +6,27 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.message" id="msg_company_unique">
<field name="text">Cannot send invoices from more than 1 company.</field>
</record>
<record model="ir.message" id="msg_customer_unique">
<field name="text">Cannot send invoices for more than 1 customer.</field>
</record>
<record model="ir.message" id="msg_shipment_customer_unique">
<field name="text">Cannot send shipments for more than 1 customer.</field>
</record>
<record model="ir.message" id="msg_edi_party_message_type">
<field name="text">Combination of message type and party must be unique.</field>
</record>
<record model="ir.message" id="msg_EDI_sender">
<field name="text">Company "%(company)s" lacks EDI sender identifier.</field>
</record>
<record model="ir.message" id="msg_party_EDI_receiver">
<field name="text">Party "%(party)s" lacks EDI receiver identifier.</field>
</record>
<record model="ir.message" id="msg_customer_EDI_receiver">
<field name="text">Customer "%(customer)s" lacks EDI receiver identifier.</field>
</record>
<record model="ir.message" id="msg_EDI_sequence">
<field name="text">EDI Sequence must be defined in Edocument Configuration.</field>
</record>
<record model="ir.message" id="msg_EDI_receiver">
<field name="text">Party "%(party)s" lacks EDI receiver identifier.</field>
</record>
<record model="ir.message" id="msg_EDI_export_path">
<field name="text">EDI export path is not defined in Edocument Configuration.</field>
</record>

View File

@ -3,8 +3,6 @@
from trytond.pool import PoolMeta
from trytond.model import fields
__all__ = ['Party', 'PartyIdentifier']
class Party(metaclass=PoolMeta):
__name__ = 'party.party'

View File

@ -3,8 +3,6 @@
from trytond.pool import PoolMeta
from trytond.model import fields
__all__ = ['Template', 'Product', 'Reference']
class Template(metaclass=PoolMeta):
__name__ = 'product.template'

View File

@ -5,10 +5,6 @@ from trytond.pool import PoolMeta, Pool
from trytond.pyson import Id
from trytond.tools.multivalue import migrate_property
from trytond.modules.company.model import CompanyValueMixin
from trytond import backend
__all__ = ['Configuration', 'ConfigurationSequence', 'UnitLoad',
'ConfigurationEDIOutputPath']
class Configuration(metaclass=PoolMeta):

View File

@ -8,7 +8,7 @@ depends:
product
party_edi
extras_depends:
extras_depend:
incoterm
product_cross_reference