mirror of
https://gitlab.com/datalifeit/trytond-edocument_edifact
synced 2023-12-14 05:42:56 +01:00
Added error messages and fixed tryton cfg.
This commit is contained in:
parent
a970371c21
commit
b78f042da4
9 changed files with 27 additions and 19 deletions
|
@ -6,8 +6,6 @@ from trytond.pyson import Id
|
||||||
from trytond.modules.company.model import (
|
from trytond.modules.company.model import (
|
||||||
CompanyMultiValueMixin, CompanyValueMixin)
|
CompanyMultiValueMixin, CompanyValueMixin)
|
||||||
|
|
||||||
__all__ = ['Configuration', 'ConfigurationSequence']
|
|
||||||
|
|
||||||
|
|
||||||
class Configuration(
|
class Configuration(
|
||||||
ModelSingleton, ModelSQL, ModelView, CompanyMultiValueMixin):
|
ModelSingleton, ModelSQL, ModelView, CompanyMultiValueMixin):
|
||||||
|
|
|
@ -13,7 +13,6 @@ from io import open
|
||||||
import oyaml as yaml
|
import oyaml as yaml
|
||||||
import os
|
import os
|
||||||
|
|
||||||
__all__ = ['EdocumentMessage', 'EdocumentTemplate']
|
|
||||||
|
|
||||||
KNOWN_EXTENSIONS = ['.txt', '.edi', '.pla']
|
KNOWN_EXTENSIONS = ['.txt', '.edi', '.pla']
|
||||||
|
|
||||||
|
@ -285,7 +284,7 @@ class EdocumentExportMixin(object):
|
||||||
edifact_receiver = [x for x in party.identifiers
|
edifact_receiver = [x for x in party.identifiers
|
||||||
if x.type == 'EDI_receiver']
|
if x.type == 'EDI_receiver']
|
||||||
if not edifact_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))
|
party=party.name))
|
||||||
template, encoding = self._edi_template(message_type, party)
|
template, encoding = self._edi_template(message_type, party)
|
||||||
loader = TextTemplate(template)
|
loader = TextTemplate(template)
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
from trytond.model import fields
|
from trytond.model import fields
|
||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
|
|
||||||
__all__ = ['Rule']
|
|
||||||
|
|
||||||
|
|
||||||
class Rule(metaclass=PoolMeta):
|
class Rule(metaclass=PoolMeta):
|
||||||
__name__ = 'incoterm.rule'
|
__name__ = 'incoterm.rule'
|
||||||
|
|
14
locale/es.po
14
locale/es.po
|
@ -18,7 +18,7 @@ msgctxt "model:ir.message,text:msg_EDI_sequence"
|
||||||
msgid "EDI Sequence must be defined in Edocument Configuration."
|
msgid "EDI Sequence must be defined in Edocument Configuration."
|
||||||
msgstr "Secuencia EDI debe definirse en Configuración de Documentación Electrónica."
|
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."
|
msgid "Party \"%(party)s\" lacks EDI receiver identifier."
|
||||||
msgstr "El tercero \"%(party)s\" carece del identificador EDI de receptor"
|
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."
|
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."
|
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:"
|
msgctxt "field:edocument.configuration,create_date:"
|
||||||
msgid "Create Date"
|
msgid "Create Date"
|
||||||
msgstr "Fecha de creación"
|
msgstr "Fecha de creación"
|
||||||
|
|
15
message.xml
15
message.xml
|
@ -6,18 +6,27 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<record model="ir.message" id="msg_company_unique">
|
<record model="ir.message" id="msg_company_unique">
|
||||||
<field name="text">Cannot send invoices from more than 1 company.</field>
|
<field name="text">Cannot send invoices from more than 1 company.</field>
|
||||||
</record>
|
</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">
|
<record model="ir.message" id="msg_edi_party_message_type">
|
||||||
<field name="text">Combination of message type and party must be unique.</field>
|
<field name="text">Combination of message type and party must be unique.</field>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.message" id="msg_EDI_sender">
|
<record model="ir.message" id="msg_EDI_sender">
|
||||||
<field name="text">Company "%(company)s" lacks EDI sender identifier.</field>
|
<field name="text">Company "%(company)s" lacks EDI sender identifier.</field>
|
||||||
</record>
|
</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">
|
<record model="ir.message" id="msg_EDI_sequence">
|
||||||
<field name="text">EDI Sequence must be defined in Edocument Configuration.</field>
|
<field name="text">EDI Sequence must be defined in Edocument Configuration.</field>
|
||||||
</record>
|
</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">
|
<record model="ir.message" id="msg_EDI_export_path">
|
||||||
<field name="text">EDI export path is not defined in Edocument Configuration.</field>
|
<field name="text">EDI export path is not defined in Edocument Configuration.</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
2
party.py
2
party.py
|
@ -3,8 +3,6 @@
|
||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
from trytond.model import fields
|
from trytond.model import fields
|
||||||
|
|
||||||
__all__ = ['Party', 'PartyIdentifier']
|
|
||||||
|
|
||||||
|
|
||||||
class Party(metaclass=PoolMeta):
|
class Party(metaclass=PoolMeta):
|
||||||
__name__ = 'party.party'
|
__name__ = 'party.party'
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
from trytond.model import fields
|
from trytond.model import fields
|
||||||
|
|
||||||
__all__ = ['Template', 'Product', 'Reference']
|
|
||||||
|
|
||||||
|
|
||||||
class Template(metaclass=PoolMeta):
|
class Template(metaclass=PoolMeta):
|
||||||
__name__ = 'product.template'
|
__name__ = 'product.template'
|
||||||
|
|
4
stock.py
4
stock.py
|
@ -5,10 +5,6 @@ from trytond.pool import PoolMeta, Pool
|
||||||
from trytond.pyson import Id
|
from trytond.pyson import Id
|
||||||
from trytond.tools.multivalue import migrate_property
|
from trytond.tools.multivalue import migrate_property
|
||||||
from trytond.modules.company.model import CompanyValueMixin
|
from trytond.modules.company.model import CompanyValueMixin
|
||||||
from trytond import backend
|
|
||||||
|
|
||||||
__all__ = ['Configuration', 'ConfigurationSequence', 'UnitLoad',
|
|
||||||
'ConfigurationEDIOutputPath']
|
|
||||||
|
|
||||||
|
|
||||||
class Configuration(metaclass=PoolMeta):
|
class Configuration(metaclass=PoolMeta):
|
||||||
|
|
|
@ -8,7 +8,7 @@ depends:
|
||||||
product
|
product
|
||||||
party_edi
|
party_edi
|
||||||
|
|
||||||
extras_depends:
|
extras_depend:
|
||||||
incoterm
|
incoterm
|
||||||
product_cross_reference
|
product_cross_reference
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue