parent
d90ccd1037
commit
9ad8a3559f
14
__init__.py
14
__init__.py
|
@ -1,13 +1,15 @@
|
|||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
from trytond.pool import Pool
|
||||
from . import shipment
|
||||
|
||||
from . import edi_shipment
|
||||
|
||||
def register():
|
||||
Pool.register(
|
||||
shipment.Cron,
|
||||
shipment.Move,
|
||||
shipment.ShipmentIn,
|
||||
shipment.StockConfiguration,
|
||||
edi_shipment.Cron,
|
||||
edi_shipment.SupplierEdi,
|
||||
edi_shipment.EdiShipmentReference,
|
||||
edi_shipment.EdiShipmentInLine,
|
||||
edi_shipment.EdiShipmentIn,
|
||||
edi_shipment.EdiShipmentInLineQty,
|
||||
edi_shipment.StockConfiguration,
|
||||
module='stock_shipment_in_edi', type_='model')
|
||||
|
|
|
@ -0,0 +1,672 @@
|
|||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
from trytond.model import fields, ModelSQL, ModelView
|
||||
from trytond.pool import Pool, PoolMeta
|
||||
from trytond.transaction import Transaction
|
||||
import os
|
||||
from trytond.modules.account_invoice_edi.invoice import (SupplierEdiMixin,
|
||||
SUPPLIER_TYPE)
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from trytond.i18n import gettext
|
||||
from trytond.exceptions import UserError
|
||||
|
||||
DEFAULT_FILES_LOCATION = '/tmp/'
|
||||
MODULE_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
KNOWN_EXTENSIONS = ['.txt', '.edi', '.pla']
|
||||
DATE_FORMAT = '%Y%m%d'
|
||||
|
||||
def to_date(value):
|
||||
if value is None or value == '':
|
||||
return None
|
||||
if len(value) > 8:
|
||||
value = value[0:8]
|
||||
if value == '00000000':
|
||||
return
|
||||
return datetime.strptime(value, DATE_FORMAT)
|
||||
|
||||
def to_decimal(value, digits=2):
|
||||
if value is None or value == '':
|
||||
return None
|
||||
return Decimal(value).quantize(Decimal('10')**-digits)
|
||||
|
||||
|
||||
class Cron(metaclass=PoolMeta):
|
||||
__name__ = 'ir.cron'
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Cron, cls).__setup__()
|
||||
cls.method.selection.extend([
|
||||
('edi.shipment.in|import_shipment_in',
|
||||
'Import EDI Shipment In Orders')])
|
||||
|
||||
|
||||
class StockConfiguration(metaclass=PoolMeta):
|
||||
__name__ = 'stock.configuration'
|
||||
|
||||
inbox_path_edi = fields.Char('Inbox Path EDI')
|
||||
|
||||
|
||||
class SupplierEdi(SupplierEdiMixin, ModelSQL, ModelView):
|
||||
'Supplier Edi'
|
||||
__name__ = 'edi.shipment.supplier'
|
||||
|
||||
edi_shipment = fields.Many2One('edi.shipment.in', 'Edi Shipment')
|
||||
|
||||
|
||||
class EdiShipmentReference(ModelSQL, ModelView):
|
||||
'Shipment In Reference'
|
||||
__name__ = 'edi.shipment.in.reference'
|
||||
|
||||
# RFF, RFFLIN
|
||||
type_ = fields.Selection([
|
||||
(None, ''),
|
||||
('DQ', 'Shipment'),
|
||||
('ON', 'Purchase'),
|
||||
('LI', 'Line Number'),
|
||||
('VN', 'VN')],
|
||||
'Reference Code')
|
||||
reference = fields.Char('Reference')
|
||||
reference_date = fields.Date('Reference Date', readonly=True)
|
||||
origin = fields.Reference('Reference', selection='get_resource')
|
||||
edi_shipment_in_line = fields.Many2One('edi.shipment.in.line',
|
||||
'Line', readonly=True)
|
||||
edi_shipment = fields.Many2One('edi.shipment.in',
|
||||
'Shipment', readonly=True)
|
||||
|
||||
@classmethod
|
||||
def get_resource(cls):
|
||||
'Return list of Model names for resource Reference'
|
||||
return [(None, ''),
|
||||
('stock.shipment.in', 'Shipment'),
|
||||
('purchase.purchase', 'Purchase'),
|
||||
('purchase.line', 'Line'),
|
||||
('stock.move', 'Move')]
|
||||
|
||||
def read_message(self, message):
|
||||
message.pop(0)
|
||||
type_ = message.pop(0)
|
||||
value = message.pop(0)
|
||||
self.type_ = type_
|
||||
self.value = value
|
||||
|
||||
def search_reference(self):
|
||||
model = None
|
||||
if self.type_ == 'DQ':
|
||||
model = 'stock.shipment.in'
|
||||
elif self.type_ == 'ON':
|
||||
model = 'purchase.purchase'
|
||||
if not model:
|
||||
return
|
||||
|
||||
Model = Pool().get(model)
|
||||
res = Model.search([('number', '=', self.reference)], limit=1)
|
||||
self.origin = res[0] if res else None
|
||||
|
||||
|
||||
# class EdiShipmentInTransport(ModelSQL, ModelView):
|
||||
# 'Edi Shipment in Transport'
|
||||
# __name__ = 'edi.shipment.in.transport'
|
||||
# # TDT
|
||||
# mode = fields.Selection([('10', 'Maritime'), ('20', 'Train'),
|
||||
# ('30', 'Road'), ('40', 'airplaine'), ('60', 'Multimode')],
|
||||
# 'Transport Mode', readonly=True)
|
||||
# qualifier = fields.Selection([('20', 'Principal Transport')],
|
||||
# 'Qualifier for Transort', readonly=True)
|
||||
# name = fields.char('Name', readonly=True)
|
||||
#
|
||||
# class EdiShipmentInPackageSequence(ModelSQL, ModelView):
|
||||
# 'Edi Shipment in Package Sequence'
|
||||
# __name__ = 'edi.shipment.in.package_sequence'
|
||||
# # CPS
|
||||
# number = fields.Integer('Number', readonly=True)
|
||||
# predecessor = fields.Integer('Preedcessor', readonly=True)
|
||||
#
|
||||
# class EdiShipmentInPackage(ModelSQL, ModelView):
|
||||
# 'Edi Shipment in Package'
|
||||
# __name__ = 'edi.shipment.in.package'
|
||||
# # PAC
|
||||
# quantity = fields.Integer('Number', readonly=True)
|
||||
# type_ = fields.selection([('08', 'Non-returnable pallet'),
|
||||
# ('09', 'returnable pallet'), ('200', 'ISO half pallet 0'),
|
||||
# ('201', 'ISO pallet 1'), ('BE', 'Package'), ('BX', 'Box'),
|
||||
# ('CT', 'Cardboard box'), ('CS', 'Rigid box'),
|
||||
# ('DH', 'CHEP plastic box'), ('PC', 'Package / Piece'),
|
||||
# ('PK', 'Package / Packaging'), ('RO', 'Roll'),
|
||||
# ('SL', 'Plastic plate'), ('SW', 'Shrink')], 'Package Type',
|
||||
# readonly=True)
|
||||
#
|
||||
# class EdiShipmentInManipulation(ModelSQL, ModelView):
|
||||
# 'Edi Shipment in Manipulation'
|
||||
# __name__ = 'edi.shipment.in.manipulation'
|
||||
# # HAN
|
||||
# code = fields.Char('Code', readonly=True)
|
||||
# description = fields.Char('Description', readonly=True)
|
||||
#
|
||||
# class EdiShipmentInPackageIdentification(ModelSQL, ModelView):
|
||||
# 'Edi Shipment in Package Identification'
|
||||
# __name__ = 'edi.shipment.in.package_identification'
|
||||
# # PCI
|
||||
# marking = fields.Char('Marking', readonly=True)
|
||||
# qualifier = fields.Char('Qualifier', readonly=True)
|
||||
# identity = fields.Char('Identity', readonly=True)
|
||||
|
||||
class EdiShipmentInLine(ModelSQL, ModelView):
|
||||
'Edi Shipment in Line'
|
||||
__name__ = 'edi.shipment.in.line'
|
||||
# LIN, PIALIN, IMDLIN, MEALIN, PCILIN
|
||||
code = fields.Char('Code', readonly=True)
|
||||
code_type = fields.Selection([
|
||||
(None, ''),
|
||||
('EAN8', 'EAN8'),
|
||||
('EAN13', 'EAN13'),
|
||||
('EAN14', 'EAN14'),
|
||||
('DUN14', 'DUN14'),
|
||||
('EN', 'EN')],
|
||||
'Code Type')
|
||||
line_number = fields.Integer('Line Number', readonly=True)
|
||||
purchaser_code = fields.Char('Purchaser Code', readonly=True)
|
||||
supplier_code = fields.Char('Supplier Code', readonly=True)
|
||||
serial_number = fields.Char('Serial Number', readonly=True)
|
||||
lot_number = fields.Char('Lot Number', readonly=True)
|
||||
description_type = fields.Selection([
|
||||
(None, ''),
|
||||
('F', 'Free Description'),
|
||||
('C', 'Codificated Description')],
|
||||
'Type of Description', readonly=True)
|
||||
description = fields.Char('Description', readonly=True)
|
||||
desccod = fields.Selection([
|
||||
(None, ''),
|
||||
('CU', 'Consumption Unit'),
|
||||
('DU', 'Dispatch Unit')],
|
||||
'Codification description', readonly=True)
|
||||
dimension = fields.Selection([
|
||||
(None, ''),
|
||||
('TC', 'Temperature')],
|
||||
'Dimension', readonly=True)
|
||||
dimension_unit = fields.Selection([
|
||||
(None, ''),
|
||||
('CEL', 'Celsius Degrees')],
|
||||
'Dimension Unit', readonly=True)
|
||||
dimension_qualifier = fields.Selection([
|
||||
(None, ''),
|
||||
('SO', 'Storage Limit')],
|
||||
'Storage Limit', readonly=True)
|
||||
dimension_min = fields.Numeric('Min', readonly=True)
|
||||
dimension_max = fields.Numeric('Max', readonly=True)
|
||||
marking_instructions = fields.Selection([
|
||||
(None, ''),
|
||||
('36E', 'Supplier Instructions')],
|
||||
'Marking Instructions', readonly=True)
|
||||
expiration_date = fields.Date('Expiration Date', readonly=True)
|
||||
packing_date = fields.Date('Packing Date', readonly=True)
|
||||
quantities = fields.One2Many('edi.shipment.in.line.qty',
|
||||
'edi_shipment_line', 'Quantities')
|
||||
references = fields.One2Many('edi.shipment.in.reference',
|
||||
'edi_shipment_in_line', 'References')
|
||||
edi_shipment = fields.Many2One('edi.shipment.in', 'Shipment', readonly=True)
|
||||
product = fields.Many2One('product.product', 'Product')
|
||||
|
||||
def read_LIN(self, message):
|
||||
self.code = message.pop(0)
|
||||
self.code_type = message.pop(0)
|
||||
self.line_number = message.pop(0)
|
||||
|
||||
def read_PIALIN(self, message):
|
||||
self.purchaser_code = message.pop(0)
|
||||
if message:
|
||||
self.supplier_code = message.pop(0)
|
||||
if message:
|
||||
self.serial_number = message.pop(0)
|
||||
if message:
|
||||
self.lot_number = message.pop(0)
|
||||
|
||||
def read_IMDLIN(self, message):
|
||||
self.description_type = message.pop(0)
|
||||
self.description = message.pop(0)
|
||||
if message:
|
||||
self.desccod = message.pop(0)
|
||||
|
||||
def read_MEALIN(self, message):
|
||||
self.dimension = message.pop(0)
|
||||
if message:
|
||||
self.dimension_unit = message.pop(0)
|
||||
if message:
|
||||
self.dimension_qualifier = message.pop(0)
|
||||
if message:
|
||||
self.dimension_min = message.pop(0)
|
||||
if message:
|
||||
self.dimension_max = message.pop(0)
|
||||
|
||||
def read_QTYLIN(self, message):
|
||||
pool = Pool()
|
||||
QTY = pool.get('edi.shipment.in.line.qty')
|
||||
|
||||
qty = QTY()
|
||||
qty.type_ = message.pop(0)
|
||||
qty.quantity = to_decimal(message.pop(0), 4)
|
||||
if message:
|
||||
qty.unit = message.pop(0)
|
||||
|
||||
if not getattr(self, 'quantities', False):
|
||||
self.quantities = []
|
||||
self.quantities += (qty, )
|
||||
|
||||
def read_RFFLIN(self, message):
|
||||
pool = Pool()
|
||||
REF = pool.get('edi.shipment.in.reference')
|
||||
|
||||
ref = REF()
|
||||
ref.type_ = message.pop(0)
|
||||
ref.reference = message.pop(0)
|
||||
ref.search_reference()
|
||||
if not getattr(self, 'references', False):
|
||||
self.references = []
|
||||
self.references += (ref,)
|
||||
|
||||
def read_PCILIN(self, message):
|
||||
self.marking_instructions = message.pop(0)
|
||||
if message:
|
||||
self.expiration_date = to_date(message.pop(0))
|
||||
if message:
|
||||
self.packing_date = to_date(message.pop(0))
|
||||
if message:
|
||||
self.lot_number = message.pop(0)
|
||||
|
||||
def read_QVRLIN(self, message):
|
||||
pool = Pool()
|
||||
QTY = pool.get('edi.shipment.in.line.qty')
|
||||
|
||||
qty = QTY()
|
||||
qty.type_ = message.pop(0)
|
||||
qty.quantity = to_decimal(message.pop(0), 4)
|
||||
qty.difference = message.pop(0)
|
||||
if not getattr(self, 'quantities', False):
|
||||
self.quantities = []
|
||||
self.quantities += (qty, )
|
||||
|
||||
def read_MOALIN(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_FTXLIN(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_LOCLIN(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def search_related(self, edi_shipment):
|
||||
pool = Pool()
|
||||
Barcode = pool.get('product.code')
|
||||
REF = pool.get('edi.shipment.in.reference')
|
||||
|
||||
domain = [('number', '=', self.code)]
|
||||
barcode = Barcode.search(domain, limit=1)
|
||||
if not barcode:
|
||||
return
|
||||
product = barcode[0].product
|
||||
self.product = product
|
||||
|
||||
purchases = [x.origin for x in edi_shipment.references if
|
||||
x.type_ == 'ON' and x.origin
|
||||
and x.origin.__name__ == 'purchase.purchase']
|
||||
|
||||
self.references = []
|
||||
for purchase in purchases:
|
||||
for move in purchase.moves:
|
||||
if move.product == product:
|
||||
ref = REF()
|
||||
ref.type_ = 'ON'
|
||||
ref.origin = 'stock.move,%s ' % move.id
|
||||
self.references += (ref,)
|
||||
|
||||
|
||||
class EdiShipmentInLineQty(ModelSQL, ModelView):
|
||||
'Edi Shipment in Line Qty'
|
||||
__name__ = 'edi.shipment.in.line.qty'
|
||||
# QTYLIN, QVRLIN
|
||||
type_ = fields.Selection([
|
||||
(None, ''),
|
||||
('12', 'Quantity Sended'),
|
||||
('59', 'Quantity on package'),
|
||||
('192', 'Free Quantity'),
|
||||
('21', '21'),
|
||||
('45E', '45E')],
|
||||
'Quantity Type', readonly=True)
|
||||
quantity = fields.Numeric('Quantity', readonly=True)
|
||||
unit = fields.Selection([
|
||||
(None, ''),
|
||||
('KGM', 'Kilogramo'),
|
||||
('GRM', 'Gramo'),
|
||||
('LTR', 'Litro'),
|
||||
('PCE', 'Pieza'),
|
||||
('EA', 'EA')],
|
||||
'Unit', readonly=True)
|
||||
difference = fields.Selection([
|
||||
(None, ''),
|
||||
('BP', 'Partial Shipment'),
|
||||
('CP', 'Partial Shipment but Complete')],
|
||||
'Difference', readonly=True)
|
||||
edi_shipment_line = fields.Many2One('edi.shipment.in.line', 'Shipment Line',
|
||||
readonly=True)
|
||||
|
||||
|
||||
class EdiShipmentIn(ModelSQL, ModelView):
|
||||
'Edi shipment In'
|
||||
__name__ = 'edi.shipment.in'
|
||||
|
||||
company = fields.Many2One('company.company', 'Company', readonly=True)
|
||||
number = fields.Char('Number')
|
||||
type_ = fields.Selection([
|
||||
('351', 'Expedition Warning')],
|
||||
'Document Type')
|
||||
function_ = fields.Selection([
|
||||
('9', 'Original'),
|
||||
('31', 'Copy')],
|
||||
'Function Type')
|
||||
expedition_date = fields.Date('Expedition Date', readonly=True)
|
||||
estimated_date = fields.Date('Estimated Date', readonly=True)
|
||||
lines = fields.One2Many('edi.shipment.in.line', 'edi_shipment', 'Shipment')
|
||||
references = fields.One2Many('edi.shipment.in.reference',
|
||||
'edi_shipment', 'References')
|
||||
suppliers = fields.One2Many('edi.shipment.supplier', 'edi_shipment',
|
||||
'Supplier', readonly=True)
|
||||
manual_party = fields.Many2One('party.party', 'Manual Party')
|
||||
shipment = fields.Many2One('stock.shipment.in', 'Shipment')
|
||||
party = fields.Function(fields.Many2One('party.party', 'Shipment Party'),
|
||||
'get_party', searcher='search_party')
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super().__setup__()
|
||||
cls._buttons.update({
|
||||
'create_shipment': {},
|
||||
'search_references': {}
|
||||
})
|
||||
|
||||
@staticmethod
|
||||
def default_company():
|
||||
return Transaction().context.get('company')
|
||||
|
||||
@classmethod
|
||||
def search_party(cls, name, clause):
|
||||
return ['OR', ('manual_party', ) + tuple(clause[1:]),
|
||||
[('suppliers.type_', '=', 'NADSU'),
|
||||
('suppliers.party', ) + tuple(clause[1:])]]
|
||||
|
||||
def get_party(self, name):
|
||||
if self.manual_party:
|
||||
return self.manual_party.id
|
||||
for s in self.suppliers:
|
||||
if s.type_ == 'NADSU':
|
||||
return s.party and s.party.id
|
||||
|
||||
def read_BGM(self, message):
|
||||
self.number = message.pop(0)
|
||||
self.type_ = message.pop(0)
|
||||
self.function_ = message.pop(0)
|
||||
|
||||
def read_DTM(self, message):
|
||||
if message:
|
||||
self.expedition_date = to_date(message.pop(0))
|
||||
if message:
|
||||
self.estimated_date = to_date(message.pop(0))
|
||||
|
||||
def read_RFF(self, message):
|
||||
pool = Pool()
|
||||
REF = pool.get('edi.shipment.in.reference')
|
||||
|
||||
ref = REF()
|
||||
ref.type_ = message.pop(0)
|
||||
if message:
|
||||
ref.reference = message.pop(0)
|
||||
if message:
|
||||
ref.reference_date = to_date(message.pop(0))
|
||||
ref.search_reference()
|
||||
if not getattr(self, 'references', False):
|
||||
self.references = []
|
||||
self.references += (ref,)
|
||||
|
||||
def read_TOD(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_TDT(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_CPS(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_PAC(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_HAN(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_PCI(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_ALI(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_CNTRES(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_MOA(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def read_MEA(self, message):
|
||||
# Not implemented
|
||||
pass
|
||||
|
||||
def get_quantity(line):
|
||||
for qty in line.quantities:
|
||||
if qty.type_ == '12':
|
||||
return float(qty.quantity)
|
||||
|
||||
@classmethod
|
||||
def import_edi_file(cls, shipments, data):
|
||||
pool = Pool()
|
||||
ShipmentEdi = pool.get('edi.shipment.in')
|
||||
ShipmentEdiLine = pool.get('edi.shipment.in.line')
|
||||
SupplierEdi = pool.get('edi.shipment.supplier')
|
||||
# Configuration = pool.get('stock.configuration')
|
||||
|
||||
# config = Configuration(1)
|
||||
separator = '|' # TODO config.separator
|
||||
|
||||
shipment_edi = None
|
||||
document_type = data.pop(0).replace('\n', '').replace('\r', '')
|
||||
if document_type != 'DESADV_D_96A_UN_EAN005':
|
||||
return
|
||||
for line in data:
|
||||
line = line.replace('\n', '').replace('\r', '')
|
||||
line = line.split(separator)
|
||||
msg_id = line.pop(0)
|
||||
if msg_id == 'BGM':
|
||||
shipment_edi = ShipmentEdi()
|
||||
shipment_edi.read_BGM(line)
|
||||
elif msg_id == 'LIN':
|
||||
# if shipment_line:
|
||||
# shipment_line.search_related(shipment)
|
||||
shipment_edi_line = ShipmentEdiLine()
|
||||
shipment_edi_line.read_LIN(line)
|
||||
if not getattr(shipment_edi, 'lines', False):
|
||||
shipment_edi.lines = []
|
||||
shipment_edi.lines += (shipment_edi_line,)
|
||||
elif 'LIN' in msg_id:
|
||||
getattr(shipment_edi_line, 'read_%s' % msg_id)(line)
|
||||
elif msg_id in [x[0] for x in SUPPLIER_TYPE]:
|
||||
supplier = SupplierEdi()
|
||||
getattr(supplier, 'read_%s' % msg_id)(line)
|
||||
supplier.search_party()
|
||||
if not getattr(shipment_edi, 'suppliers', False):
|
||||
shipment_edi.suppliers = []
|
||||
shipment_edi.suppliers += (supplier,)
|
||||
elif 'NAD' in msg_id:
|
||||
continue
|
||||
else:
|
||||
getattr(shipment_edi, 'read_%s' % msg_id)(line)
|
||||
|
||||
# invoice_line.search_related(shipment)
|
||||
return shipment_edi
|
||||
|
||||
def add_attachment(self, attachment, filename=None):
|
||||
pool = Pool()
|
||||
Attachment = pool.get('ir.attachment')
|
||||
|
||||
if not filename:
|
||||
filename = datetime.now().strftime("%y/%m/%d %H:%M:%S")
|
||||
attach = Attachment(
|
||||
name=filename,
|
||||
type='data',
|
||||
data=attachment.decode('utf8'),
|
||||
resource=self)
|
||||
attach.save()
|
||||
|
||||
@classmethod
|
||||
def import_shipment_in(cls, edi_shipments=None):
|
||||
pool = Pool()
|
||||
Configuration = pool.get('stock.configuration')
|
||||
|
||||
configuration = Configuration(1)
|
||||
source_path = os.path.abspath(configuration.inbox_path_edi or
|
||||
DEFAULT_FILES_LOCATION)
|
||||
|
||||
files = [os.path.join(source_path, fp) for fp in
|
||||
os.listdir(source_path) if os.path.isfile(os.path.join(
|
||||
source_path, fp))]
|
||||
files_to_delete = []
|
||||
to_save = []
|
||||
attachments = dict()
|
||||
for fname in files:
|
||||
if fname[-4:].lower() not in KNOWN_EXTENSIONS:
|
||||
continue
|
||||
with open(fname, 'r', encoding='latin-1') as fp:
|
||||
data = fp.readlines()
|
||||
shipment = cls.import_edi_file([], data)
|
||||
|
||||
basename = os.path.basename(fname)
|
||||
if shipment:
|
||||
attachments[shipment] = ("\n".join(data), basename)
|
||||
to_save.append(shipment)
|
||||
files_to_delete.append(fname)
|
||||
|
||||
if to_save:
|
||||
cls.save(to_save)
|
||||
|
||||
# with Transaction().set_user(0, set_context=True):
|
||||
# for shipment, (data, basename) in attachments.items():
|
||||
# shipment.add_attachment(data, basename)
|
||||
|
||||
if files_to_delete:
|
||||
for file in files_to_delete:
|
||||
os.remove(file)
|
||||
|
||||
cls.search_references(to_save)
|
||||
|
||||
def _get_new_lot(self, line, quantity):
|
||||
pool = Pool()
|
||||
Lot = pool.get('stock.lot')
|
||||
|
||||
if line.expiration_date:
|
||||
lot = Lot()
|
||||
lot.product = line.product
|
||||
lot.expiration_date = line.expiration_date
|
||||
lot.on_change_product()
|
||||
return lot
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
def search_references(cls, edi_shipments):
|
||||
pool = Pool()
|
||||
Line = pool.get('edi.shipment.in.line')
|
||||
|
||||
to_save = []
|
||||
for edi_shipment in edi_shipments:
|
||||
if edi_shipment.shipment:
|
||||
continue
|
||||
for eline in edi_shipment.lines:
|
||||
eline.search_related(edi_shipment)
|
||||
to_save.append(eline)
|
||||
Line.save(to_save)
|
||||
|
||||
@classmethod
|
||||
@ModelView.button
|
||||
def create_shipment(cls, edi_shipments):
|
||||
pool = Pool()
|
||||
ShipmentIn = pool.get('stock.shipment.in')
|
||||
Move = pool.get('stock.move')
|
||||
Purchase = pool.get('purchase.purchase')
|
||||
|
||||
default_values = ShipmentIn.default_get(ShipmentIn._fields.keys(),
|
||||
with_rec_name=False)
|
||||
|
||||
to_save = []
|
||||
move_to_save = []
|
||||
for edi_shipment in edi_shipments:
|
||||
if edi_shipment.shipment:
|
||||
continue
|
||||
|
||||
shipment = ShipmentIn(**default_values)
|
||||
for reference in edi_shipment.references:
|
||||
if reference.type_ == 'ON' and reference.origin:
|
||||
if isinstance(reference.origin, Purchase):
|
||||
shipment.warehouse = reference.origin.warehouse
|
||||
break
|
||||
|
||||
if reference.type_ == 'ON' and not reference.origin:
|
||||
raise UserError(gettext(
|
||||
'stock_shipment_in_edi.msg_no_purchase_ref'))
|
||||
|
||||
shipment.reference = edi_shipment.number
|
||||
shipment.supplier = edi_shipment.party
|
||||
shipment.on_change_supplier()
|
||||
edi_shipment.shipment = shipment
|
||||
|
||||
for line in edi_shipment.lines:
|
||||
if not line.product:
|
||||
raise UserError(gettext(
|
||||
'stock_shipment_in_edi.msg_no_product',
|
||||
number=line.line_number))
|
||||
|
||||
if not line.references:
|
||||
raise UserError(gettext(
|
||||
'stock_shipment_in_edi.msg_no_move_ref',
|
||||
number=line.line_number))
|
||||
|
||||
for ref in line.references:
|
||||
if ref.origin not in move_to_save:
|
||||
quantity = cls.get_quantity(line)
|
||||
move = ref.origin
|
||||
move.shipment = shipment
|
||||
move.quantity = quantity
|
||||
move.lot = cls._get_new_lot(cls, line, quantity)
|
||||
move_to_save.append(move)
|
||||
else:
|
||||
quantity = cls.get_quantity(line)
|
||||
move, = ref.origin.copy([ref.origin])
|
||||
move.shipment = shipment
|
||||
move.quantity = quantity
|
||||
move.lot = cls._get_new_lot(cls, line, quantity)
|
||||
move_to_save.append(move)
|
||||
|
||||
edi_shipment.save()
|
||||
to_save.append(shipment)
|
||||
|
||||
if to_save:
|
||||
ShipmentIn.save(to_save)
|
||||
|
||||
if move_to_save:
|
||||
Move.save(move_to_save)
|
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="edi_shipment_in_view_form">
|
||||
<field name="model">edi.shipment.in</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">edi_shipment_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="edi_shipment_in_view_tree">
|
||||
<field name="model">edi.shipment.in</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">edi_shipment_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="edi_shipment_line_view_form">
|
||||
<field name="model">edi.shipment.in.line</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">edi_shipment_line_form</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="edi_shipment_line_view_tree">
|
||||
<field name="model">edi.shipment.in.line</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">edi_shipment_line_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="supplier_edi_view_form">
|
||||
<field name="model">edi.shipment.supplier</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">supplier_edi_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="supplier_edi_view_tree">
|
||||
<field name="model">edi.shipment.supplier</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">supplier_edi_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="invoice_edi_reference_view_form">
|
||||
<field name="model">edi.shipment.in.reference</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">edi_shipment_in_reference_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="invoice_edi_reference_view_tree">
|
||||
<field name="model">edi.shipment.in.reference</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="name">edi_shipment_in_reference_tree</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window" id="act_edi_shipment_in_form">
|
||||
<field name="name">Edi Shipment</field>
|
||||
<field name="res_model">edi.shipment.in</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window.view" id="act_edi_shipment_in_form_view1">
|
||||
<field name="sequence" eval="10"/>
|
||||
<field name="view" ref="edi_shipment_in_view_tree"/>
|
||||
<field name="act_window" ref="act_edi_shipment_in_form"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.action.act_window.view" id="act_edi_shipment_in_form_view2">
|
||||
<field name="sequence" eval="20"/>
|
||||
<field name="view" ref="edi_shipment_in_view_form"/>
|
||||
<field name="act_window" ref="act_edi_shipment_in_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Edi Shipment" parent="stock.menu_stock"
|
||||
id="menu_edi_shipment" sequence="40"/>
|
||||
|
||||
<menuitem parent="menu_edi_shipment"
|
||||
action="act_edi_shipment_in_form"
|
||||
id="menuitem_edi_shipment"
|
||||
sequence="0" icon="tryton-list"/>
|
||||
|
||||
|
||||
<record model="ir.ui.menu-res.group" id="menu_edi_shipment_in_group_account">
|
||||
<field name="menu" ref="menu_edi_shipment"/>
|
||||
<field name="group" ref="stock.group_stock_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="create_shipment_button">
|
||||
<field name="name">create_shipment</field>
|
||||
<field name="string">Create Shipment</field>
|
||||
<field name="model" search="[('model', '=', 'edi.shipment.in')]"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button-res.group"
|
||||
id="create_invoice_button_group_account">
|
||||
<field name="button" ref="create_shipment_button"/>
|
||||
<field name="group" ref="stock.group_stock_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.model.button" id="search_related_button">
|
||||
<field name="name">search_references</field>
|
||||
<field name="string">Search References</field>
|
||||
<field name="model" search="[('model', '=', 'edi.shipment.in')]"/>
|
||||
</record>
|
||||
<record model="ir.model.button-res.group"
|
||||
id="search_related_button_group_account">
|
||||
<field name="button" ref="search_related_button"/>
|
||||
<field name="group" ref="stock.group_stock_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.cron" id="cron_edi_shipment_in">
|
||||
<field name="active" eval="True"/>
|
||||
<field name="interval_number" eval="1"/>
|
||||
<field name="interval_type">hours</field>
|
||||
<field name="method">edi.shipment.in|import_shipment_in</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="stock_configuration_view_form">
|
||||
<field name="model">stock.configuration</field>
|
||||
<field name="inherit" ref="stock.stock_configuration_view_form"/>
|
||||
<field name="name">stock_configuration_form</field>
|
||||
</record>
|
||||
<!-- EDI Shipments User -->
|
||||
<record model="res.user" id="user_edi_shipment_in">
|
||||
<field name="login">user_edi_shipments</field>
|
||||
<field name="name">Cron EDI Shipments</field>
|
||||
<field name="signature"></field>
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
<record model="res.user-res.group"
|
||||
id="user_edi_shipment_in_group_admin">
|
||||
<field name="user" ref="user_edi_shipment_in"/>
|
||||
<field name="group" ref="res.group_admin"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
496
locale/ca.po
496
locale/ca.po
|
@ -2,33 +2,497 @@
|
|||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:stock.configuration,errors_path_edi:"
|
||||
msgid "Errors Path"
|
||||
msgstr "Path d'errors"
|
||||
msgctxt "field:edi.shipment.in,company:"
|
||||
msgid "Company"
|
||||
msgstr "Empresa"
|
||||
|
||||
msgctxt "field:edi.shipment.in,estimated_date:"
|
||||
msgid "Estimated Date"
|
||||
msgstr "Data estimada"
|
||||
|
||||
msgctxt "field:edi.shipment.in,expedition_date:"
|
||||
msgid "Expedition Date"
|
||||
msgstr "Data d'expedició"
|
||||
|
||||
msgctxt "field:edi.shipment.in,function_:"
|
||||
msgid "Function Type"
|
||||
msgstr "Tipus de funció"
|
||||
|
||||
msgctxt "field:edi.shipment.in,lines:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarà"
|
||||
|
||||
msgctxt "field:edi.shipment.in,manual_party:"
|
||||
msgid "Manual Party"
|
||||
msgstr "Tercer manual"
|
||||
|
||||
msgctxt "field:edi.shipment.in,number:"
|
||||
msgid "Number"
|
||||
msgstr "Número"
|
||||
|
||||
msgctxt "field:edi.shipment.in,party:"
|
||||
msgid "Shipment Party"
|
||||
msgstr "Tercer de l'enviament"
|
||||
|
||||
msgctxt "field:edi.shipment.in,references:"
|
||||
msgid "References"
|
||||
msgstr "Referències"
|
||||
|
||||
msgctxt "field:edi.shipment.in,shipment:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarà"
|
||||
|
||||
msgctxt "field:edi.shipment.in,suppliers:"
|
||||
msgid "Supplier"
|
||||
msgstr "Proveïdor"
|
||||
|
||||
msgctxt "field:edi.shipment.in,type_:"
|
||||
msgid "Document Type"
|
||||
msgstr "Tipus de document"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,code:"
|
||||
msgid "Code"
|
||||
msgstr "Codi"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,code_type:"
|
||||
msgid "Code Type"
|
||||
msgstr "Tipus de codi"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,desccod:"
|
||||
msgid "Codification description"
|
||||
msgstr "Descripció codificada"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,description:"
|
||||
msgid "Description"
|
||||
msgstr "Descripció"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,description_type:"
|
||||
msgid "Type of Description"
|
||||
msgstr "Tipus de descripció"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension:"
|
||||
msgid "Dimension"
|
||||
msgstr "Dimensió"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension_max:"
|
||||
msgid "Max"
|
||||
msgstr "Max"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension_min:"
|
||||
msgid "Min"
|
||||
msgstr "Min"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension_qualifier:"
|
||||
msgid "Storage Limit"
|
||||
msgstr "Límit d'emmagatzematge"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension_unit:"
|
||||
msgid "Dimension Unit"
|
||||
msgstr "Unitat de dimensió"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,edi_shipment:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarà"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,expiration_date:"
|
||||
msgid "Expiration Date"
|
||||
msgstr "Data de caducitat"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,line_number:"
|
||||
msgid "Line Number"
|
||||
msgstr "Número de línia"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,lot_number:"
|
||||
msgid "Lot Number"
|
||||
msgstr "Número de lot"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,marking_instructions:"
|
||||
msgid "Marking Instructions"
|
||||
msgstr "Instruccions de marcatge"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,packing_date:"
|
||||
msgid "Packing Date"
|
||||
msgstr "Data d’embalatge"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,product:"
|
||||
msgid "Product"
|
||||
msgstr "Producte"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,purchaser_code:"
|
||||
msgid "Purchaser Code"
|
||||
msgstr "Codi del comprador"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,quantities:"
|
||||
msgid "Quantities"
|
||||
msgstr "Quantitats"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,references:"
|
||||
msgid "References"
|
||||
msgstr "Referències"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,serial_number:"
|
||||
msgid "Serial Number"
|
||||
msgstr "Número de serie"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,supplier_code:"
|
||||
msgid "Supplier Code"
|
||||
msgstr "Codi de proveïdor"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,difference:"
|
||||
msgid "Difference"
|
||||
msgstr "Diferència"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,edi_shipment_line:"
|
||||
msgid "Shipment Line"
|
||||
msgstr "Línia d'albarà"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,quantity:"
|
||||
msgid "Quantity"
|
||||
msgstr "Quantitat"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,type_:"
|
||||
msgid "Quantity Type"
|
||||
msgstr "Tipus de quantitat"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Unit"
|
||||
msgstr "Unitat"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,edi_shipment:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarà"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,edi_shipment_in_line:"
|
||||
msgid "Line"
|
||||
msgstr "Línia"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,origin:"
|
||||
msgid "Reference"
|
||||
msgstr "Orígen"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,reference:"
|
||||
msgid "Reference"
|
||||
msgstr "Referència"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,reference_date:"
|
||||
msgid "Reference Date"
|
||||
msgstr "Data de referència"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,type_:"
|
||||
msgid "Reference Code"
|
||||
msgstr "Codi de referència"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,account_bank:"
|
||||
msgid "Account Bank"
|
||||
msgstr "Compte bancari"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,city:"
|
||||
msgid "City"
|
||||
msgstr "Ciutat"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,commercial_register:"
|
||||
msgid "Comercial Register"
|
||||
msgstr "Registre comercial"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,edi_code:"
|
||||
msgid "Edi Code"
|
||||
msgstr "Codi Edi"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,edi_shipment:"
|
||||
msgid "Edi Shipment"
|
||||
msgstr "Albarà Edi"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,name:"
|
||||
msgid "Name"
|
||||
msgstr "Nom"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,party:"
|
||||
msgid "Party"
|
||||
msgstr "Tercer"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,street:"
|
||||
msgid "Street"
|
||||
msgstr "Carrer"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,type_:"
|
||||
msgid "Type"
|
||||
msgstr "Tipus"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,vat:"
|
||||
msgid "Vat"
|
||||
msgstr "NIF"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,zip:"
|
||||
msgid "zip"
|
||||
msgstr "zip"
|
||||
|
||||
msgctxt "field:stock.configuration,inbox_path_edi:"
|
||||
msgid "Inbox Path EDI"
|
||||
msgstr "Path d'entrada EDI"
|
||||
|
||||
msgctxt "field:stock.configuration,template_order_response_edi:"
|
||||
msgid "Template EDI Used for Response"
|
||||
msgstr "Plantilla EDI de Resposta"
|
||||
msgctxt "model:edi.shipment.in,name:"
|
||||
msgid "Edi shipment In"
|
||||
msgstr "Albarà Edi de proveïdor"
|
||||
|
||||
msgctxt "field:stock.move,edi_description:"
|
||||
msgid "EDI Description"
|
||||
msgstr "Descripció EDI"
|
||||
msgctxt "model:edi.shipment.in.line,name:"
|
||||
msgid "Edi Shipment in Line"
|
||||
msgstr "Línia d'albarà Edi de proveïdor"
|
||||
|
||||
msgctxt "field:stock.move,edi_quantity:"
|
||||
msgid "EDI Quantity"
|
||||
msgstr "Quantitat EDI"
|
||||
msgctxt "model:edi.shipment.in.line.qty,name:"
|
||||
msgid "Edi Shipment in Line Qty"
|
||||
msgstr "Quantitat línia d'albarà Edi de proveïdor"
|
||||
|
||||
msgctxt "model:ir.cron,name:cron_import_edi_shipment_in"
|
||||
msgctxt "model:edi.shipment.in.reference,name:"
|
||||
msgid "Shipment In Reference"
|
||||
msgstr "Referència albará de proveïdor"
|
||||
|
||||
msgctxt "model:edi.shipment.supplier,name:"
|
||||
msgid "Supplier Edi"
|
||||
msgstr "Proveïdor Edi"
|
||||
|
||||
msgctxt "model:ir.action,name:act_edi_shipment_in_form"
|
||||
msgid "Edi Shipment"
|
||||
msgstr "Albarà Edi"
|
||||
|
||||
msgctxt "model:ir.cron,name:"
|
||||
msgid "Import EDI Supplier Shipments"
|
||||
msgstr "Importar Albarans de Proveïdor EDI"
|
||||
|
||||
msgctxt "model:res.user,name:user_edi_shipment_in"
|
||||
msgid "Cron EDI Shipments"
|
||||
msgstr "Cron Albarans EDI"
|
||||
msgctxt "model:ir.message,text:msg_no_move_ref"
|
||||
msgid "There is not move reference in line number %(number)s."
|
||||
msgstr "No hi ha referència de moviment a la línia número %(number)s."
|
||||
|
||||
msgctxt "model:ir.message,text:msg_no_product"
|
||||
msgid "There is not product in line number %(number)s."
|
||||
msgstr "No hi ha producte a la línia número %(number)s."
|
||||
|
||||
msgctxt "model:ir.message,text:msg_no_purchase_ref"
|
||||
msgid "There is not purchase origin in edi shipment references."
|
||||
msgstr "No hi ha origen de compra a les referències de l'albarà edi."
|
||||
|
||||
msgctxt "model:ir.model.button,string:create_shipment_button"
|
||||
msgid "Create Shipment"
|
||||
msgstr "Crear albarà"
|
||||
|
||||
msgctxt "model:ir.model.button,string:search_related_button"
|
||||
msgid "Search References"
|
||||
msgstr "Cerca referències"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_edi_shipment"
|
||||
msgid "Edi Shipment"
|
||||
msgstr "Albarà Edi"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menuitem_edi_shipment"
|
||||
msgid "Edi Shipment"
|
||||
msgstr "Albarà Edi"
|
||||
|
||||
msgctxt "selection:edi.shipment.in,function_:"
|
||||
msgid "Copy"
|
||||
msgstr "Copiar"
|
||||
|
||||
msgctxt "selection:edi.shipment.in,function_:"
|
||||
msgid "Original"
|
||||
msgstr "Original"
|
||||
|
||||
msgctxt "selection:edi.shipment.in,type_:"
|
||||
msgid "Expedition Warning"
|
||||
msgstr "Avís d'expedició"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "DUN14"
|
||||
msgstr "DUN14"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "EAN13"
|
||||
msgstr "EAN13"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "EAN14"
|
||||
msgstr "EAN14"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "EAN8"
|
||||
msgstr "EAN8"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "EN"
|
||||
msgstr "EN"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,desccod:"
|
||||
msgid "Consumption Unit"
|
||||
msgstr "Unitat de consum"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,desccod:"
|
||||
msgid "Dispatch Unit"
|
||||
msgstr "Unitat d'enviament"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,description_type:"
|
||||
msgid "Codificated Description"
|
||||
msgstr "Descripció codificada"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,description_type:"
|
||||
msgid "Free Description"
|
||||
msgstr "Descripció lliure"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,dimension:"
|
||||
msgid "Temperature"
|
||||
msgstr "Temperatura"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,dimension_qualifier:"
|
||||
msgid "Storage Limit"
|
||||
msgstr "Límit d'emmagatzematge"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,dimension_unit:"
|
||||
msgid "Celsius Degrees"
|
||||
msgstr "Graus centígrads"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,marking_instructions:"
|
||||
msgid "Supplier Instructions"
|
||||
msgstr "Instruccions del proveïdor"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,difference:"
|
||||
msgid "Partial Shipment"
|
||||
msgstr "Albarà parcial"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,difference:"
|
||||
msgid "Partial Shipment but Complete"
|
||||
msgstr "Albará parcial però complet"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "21"
|
||||
msgstr "21"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "45E"
|
||||
msgstr "45E"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "Free Quantity"
|
||||
msgstr "Quantitat lliure"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "Quantity Sended"
|
||||
msgstr "Quantitat enviada"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "Quantity on package"
|
||||
msgstr "Quantitat al paquet"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "EA"
|
||||
msgstr "EA"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Gramo"
|
||||
msgstr "Gram"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Kilogramo"
|
||||
msgstr "Kilogram"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Litro"
|
||||
msgstr "Litre"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Pieza"
|
||||
msgstr "Peça"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.reference,type_:"
|
||||
msgid "Line Number"
|
||||
msgstr "Número de línia"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.reference,type_:"
|
||||
msgid "Purchase"
|
||||
msgstr "Compra"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.reference,type_:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarà"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.reference,type_:"
|
||||
msgid "VN"
|
||||
msgstr "VN"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Endorser"
|
||||
msgstr "Provador"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Final Receiver"
|
||||
msgstr "Receptor final"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Invoice Issuer"
|
||||
msgstr "Emissor de factures"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Invoice Receiver"
|
||||
msgstr "Receptor de factures"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Legal Purchaser"
|
||||
msgstr "Comprador legal"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Legal Supplier"
|
||||
msgstr "Proveïdor legal"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "NAD"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "NADMR"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "NADPE"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "NADPW"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Payment Issuer"
|
||||
msgstr "Emissor de pagaments"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Purchaser"
|
||||
msgstr "Comprador"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Sender"
|
||||
msgstr "Remitent"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Stock Receiver"
|
||||
msgstr "Receptor d’estoc"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Supplier"
|
||||
msgstr "Proveïdor"
|
||||
|
||||
msgctxt "selection:ir.cron,method:"
|
||||
msgid "Import EDI Shipment In Orders"
|
||||
msgstr "Importar comandes albará de proveïdor EDI"
|
||||
|
||||
msgctxt "view:edi.shipment.in:"
|
||||
msgid "Create Shipment"
|
||||
msgstr "Crear albarà"
|
||||
|
||||
msgctxt "view:edi.shipment.in:"
|
||||
msgid "Lines"
|
||||
msgstr "Línies"
|
||||
|
||||
msgctxt "view:edi.shipment.in:"
|
||||
msgid "Parties"
|
||||
msgstr "Tercers"
|
||||
|
||||
msgctxt "view:edi.shipment.in:"
|
||||
msgid "Search References"
|
||||
msgstr "Cerca referències"
|
||||
|
||||
msgctxt "view:stock.configuration:"
|
||||
msgid "EDI"
|
||||
|
|
496
locale/es.po
496
locale/es.po
|
@ -2,33 +2,497 @@
|
|||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=utf-8\n"
|
||||
|
||||
msgctxt "field:stock.configuration,errors_path_edi:"
|
||||
msgid "Errors Path"
|
||||
msgstr "Path de errores"
|
||||
msgctxt "field:edi.shipment.in,company:"
|
||||
msgid "Company"
|
||||
msgstr "Empresa"
|
||||
|
||||
msgctxt "field:edi.shipment.in,estimated_date:"
|
||||
msgid "Estimated Date"
|
||||
msgstr "Fecha estimada"
|
||||
|
||||
msgctxt "field:edi.shipment.in,expedition_date:"
|
||||
msgid "Expedition Date"
|
||||
msgstr "Fecha de expedición"
|
||||
|
||||
msgctxt "field:edi.shipment.in,function_:"
|
||||
msgid "Function Type"
|
||||
msgstr "Tipo de función"
|
||||
|
||||
msgctxt "field:edi.shipment.in,lines:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarán"
|
||||
|
||||
msgctxt "field:edi.shipment.in,manual_party:"
|
||||
msgid "Manual Party"
|
||||
msgstr "Tercero manual"
|
||||
|
||||
msgctxt "field:edi.shipment.in,number:"
|
||||
msgid "Number"
|
||||
msgstr "Número"
|
||||
|
||||
msgctxt "field:edi.shipment.in,party:"
|
||||
msgid "Shipment Party"
|
||||
msgstr "Tercero del envío"
|
||||
|
||||
msgctxt "field:edi.shipment.in,references:"
|
||||
msgid "References"
|
||||
msgstr "Referencias"
|
||||
|
||||
msgctxt "field:edi.shipment.in,shipment:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarán"
|
||||
|
||||
msgctxt "field:edi.shipment.in,suppliers:"
|
||||
msgid "Supplier"
|
||||
msgstr "Proveedor"
|
||||
|
||||
msgctxt "field:edi.shipment.in,type_:"
|
||||
msgid "Document Type"
|
||||
msgstr "Tipo de documento"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,code:"
|
||||
msgid "Code"
|
||||
msgstr "Código"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,code_type:"
|
||||
msgid "Code Type"
|
||||
msgstr "Tipo de código"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,desccod:"
|
||||
msgid "Codification description"
|
||||
msgstr "Descripción codificada"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,description:"
|
||||
msgid "Description"
|
||||
msgstr "Descripción"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,description_type:"
|
||||
msgid "Type of Description"
|
||||
msgstr "Tipo de descripción"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension:"
|
||||
msgid "Dimension"
|
||||
msgstr "Dimensión"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension_max:"
|
||||
msgid "Max"
|
||||
msgstr "Max"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension_min:"
|
||||
msgid "Min"
|
||||
msgstr "Min"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension_qualifier:"
|
||||
msgid "Storage Limit"
|
||||
msgstr "Límite de almacenamiento"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,dimension_unit:"
|
||||
msgid "Dimension Unit"
|
||||
msgstr "Unidad de dimensión"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,edi_shipment:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarán"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,expiration_date:"
|
||||
msgid "Expiration Date"
|
||||
msgstr "Fecha de caducidad"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,line_number:"
|
||||
msgid "Line Number"
|
||||
msgstr "Número de línea"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,lot_number:"
|
||||
msgid "Lot Number"
|
||||
msgstr "Número de lote"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,marking_instructions:"
|
||||
msgid "Marking Instructions"
|
||||
msgstr "Instrucciones de marcado"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,packing_date:"
|
||||
msgid "Packing Date"
|
||||
msgstr "Fecha de embalaje"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,product:"
|
||||
msgid "Product"
|
||||
msgstr "Producto"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,purchaser_code:"
|
||||
msgid "Purchaser Code"
|
||||
msgstr "Código del comprador"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,quantities:"
|
||||
msgid "Quantities"
|
||||
msgstr "Cantidades"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,references:"
|
||||
msgid "References"
|
||||
msgstr "Referencias"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,serial_number:"
|
||||
msgid "Serial Number"
|
||||
msgstr "Número de serie"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line,supplier_code:"
|
||||
msgid "Supplier Code"
|
||||
msgstr "Código de proveedor"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,difference:"
|
||||
msgid "Difference"
|
||||
msgstr "Diferencia"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,edi_shipment_line:"
|
||||
msgid "Shipment Line"
|
||||
msgstr "Línea de albarán"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,quantity:"
|
||||
msgid "Quantity"
|
||||
msgstr "Cantidad"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,type_:"
|
||||
msgid "Quantity Type"
|
||||
msgstr "Tipo de cantidad"
|
||||
|
||||
msgctxt "field:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Unit"
|
||||
msgstr "Unidad"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,edi_shipment:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarán"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,edi_shipment_in_line:"
|
||||
msgid "Line"
|
||||
msgstr "Línea"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,origin:"
|
||||
msgid "Reference"
|
||||
msgstr "Orígen"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,reference:"
|
||||
msgid "Reference"
|
||||
msgstr "Referencia"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,reference_date:"
|
||||
msgid "Reference Date"
|
||||
msgstr "Fecha de referencia"
|
||||
|
||||
msgctxt "field:edi.shipment.in.reference,type_:"
|
||||
msgid "Reference Code"
|
||||
msgstr "Código de referencia"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,account_bank:"
|
||||
msgid "Account Bank"
|
||||
msgstr "Cuenta bancaria"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,city:"
|
||||
msgid "City"
|
||||
msgstr "Ciudad"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,commercial_register:"
|
||||
msgid "Comercial Register"
|
||||
msgstr "Registro comercial"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,edi_code:"
|
||||
msgid "Edi Code"
|
||||
msgstr "Código Edi"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,edi_shipment:"
|
||||
msgid "Edi Shipment"
|
||||
msgstr "Albarán Edi"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,name:"
|
||||
msgid "Name"
|
||||
msgstr "Nombre"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,party:"
|
||||
msgid "Party"
|
||||
msgstr "Tercero"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,street:"
|
||||
msgid "Street"
|
||||
msgstr "Calle"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,type_:"
|
||||
msgid "Type"
|
||||
msgstr "Tipo"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,vat:"
|
||||
msgid "Vat"
|
||||
msgstr "NIF"
|
||||
|
||||
msgctxt "field:edi.shipment.supplier,zip:"
|
||||
msgid "zip"
|
||||
msgstr "zip"
|
||||
|
||||
msgctxt "field:stock.configuration,inbox_path_edi:"
|
||||
msgid "Inbox Path EDI"
|
||||
msgstr "Path de entrada EDI"
|
||||
|
||||
msgctxt "field:stock.configuration,template_order_response_edi:"
|
||||
msgid "Template EDI Used for Response"
|
||||
msgstr "Plantilla EDI usada para la Respuesta"
|
||||
msgctxt "model:edi.shipment.in,name:"
|
||||
msgid "Edi shipment In"
|
||||
msgstr "Albarán Edi de proveedor"
|
||||
|
||||
msgctxt "field:stock.move,edi_description:"
|
||||
msgid "EDI Description"
|
||||
msgstr "Descripción EDI"
|
||||
msgctxt "model:edi.shipment.in.line,name:"
|
||||
msgid "Edi Shipment in Line"
|
||||
msgstr "Línea de albarán Edi de proveedor"
|
||||
|
||||
msgctxt "field:stock.move,edi_quantity:"
|
||||
msgid "EDI Quantity"
|
||||
msgstr "Cantidad EDI"
|
||||
msgctxt "model:edi.shipment.in.line.qty,name:"
|
||||
msgid "Edi Shipment in Line Qty"
|
||||
msgstr "Cantidad línea de albarán Edi de proveedor"
|
||||
|
||||
msgctxt "model:ir.cron,name:cron_import_edi_shipment_in"
|
||||
msgctxt "model:edi.shipment.in.reference,name:"
|
||||
msgid "Shipment In Reference"
|
||||
msgstr "Referencia albarán de proveedor"
|
||||
|
||||
msgctxt "model:edi.shipment.supplier,name:"
|
||||
msgid "Supplier Edi"
|
||||
msgstr "Proveedor Edi"
|
||||
|
||||
msgctxt "model:ir.action,name:act_edi_shipment_in_form"
|
||||
msgid "Edi Shipment"
|
||||
msgstr "Albarán Edi"
|
||||
|
||||
msgctxt "model:ir.cron,name:"
|
||||
msgid "Import EDI Supplier Shipments"
|
||||
msgstr "Importar Albaranes de Proveedor EDI"
|
||||
|
||||
msgctxt "model:res.user,name:user_edi_shipment_in"
|
||||
msgid "Cron EDI Shipments"
|
||||
msgstr "Cron Albaranes EDI"
|
||||
msgctxt "model:ir.message,text:msg_no_move_ref"
|
||||
msgid "There is not move reference in line number %(number)s."
|
||||
msgstr "No hay referencia de movimiento en la línia número %(number)s."
|
||||
|
||||
msgctxt "model:ir.message,text:msg_no_product"
|
||||
msgid "There is not product in line number %(number)s."
|
||||
msgstr "No hay producto en la línea número %(number)s."
|
||||
|
||||
msgctxt "model:ir.message,text:msg_no_purchase_ref"
|
||||
msgid "There is not purchase origin in edi shipment references."
|
||||
msgstr "No hay origen de compra en las referencias del albarán edi."
|
||||
|
||||
msgctxt "model:ir.model.button,string:create_shipment_button"
|
||||
msgid "Create Shipment"
|
||||
msgstr "Crear albarán"
|
||||
|
||||
msgctxt "model:ir.model.button,string:search_related_button"
|
||||
msgid "Search References"
|
||||
msgstr "Buscar referencias"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menu_edi_shipment"
|
||||
msgid "Edi Shipment"
|
||||
msgstr "Albarán Edi"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:menuitem_edi_shipment"
|
||||
msgid "Edi Shipment"
|
||||
msgstr "Albarán Edi"
|
||||
|
||||
msgctxt "selection:edi.shipment.in,function_:"
|
||||
msgid "Copy"
|
||||
msgstr "Copiar"
|
||||
|
||||
msgctxt "selection:edi.shipment.in,function_:"
|
||||
msgid "Original"
|
||||
msgstr "Original"
|
||||
|
||||
msgctxt "selection:edi.shipment.in,type_:"
|
||||
msgid "Expedition Warning"
|
||||
msgstr "Aviso de expedición"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "DUN14"
|
||||
msgstr "DUN14"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "EAN13"
|
||||
msgstr "EAN13"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "EAN14"
|
||||
msgstr "EAN14"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "EAN8"
|
||||
msgstr "EAN8"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,code_type:"
|
||||
msgid "EN"
|
||||
msgstr "EN"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,desccod:"
|
||||
msgid "Consumption Unit"
|
||||
msgstr "Unidad de consumo"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,desccod:"
|
||||
msgid "Dispatch Unit"
|
||||
msgstr "Unidad de envío"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,description_type:"
|
||||
msgid "Codificated Description"
|
||||
msgstr "Descripción codificada"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,description_type:"
|
||||
msgid "Free Description"
|
||||
msgstr "Descripción libre"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,dimension:"
|
||||
msgid "Temperature"
|
||||
msgstr "Temperatura"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,dimension_qualifier:"
|
||||
msgid "Storage Limit"
|
||||
msgstr "Límite de almacenamiento"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,dimension_unit:"
|
||||
msgid "Celsius Degrees"
|
||||
msgstr "Grados centígrados"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line,marking_instructions:"
|
||||
msgid "Supplier Instructions"
|
||||
msgstr "Instrucciones del proveedor"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,difference:"
|
||||
msgid "Partial Shipment"
|
||||
msgstr "Albarán parcial"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,difference:"
|
||||
msgid "Partial Shipment but Complete"
|
||||
msgstr "Albarán parcial pero completo"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "21"
|
||||
msgstr "21"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "45E"
|
||||
msgstr "45E"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "Free Quantity"
|
||||
msgstr "Cantidad libre"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "Quantity Sended"
|
||||
msgstr "Cantidad enviada"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,type_:"
|
||||
msgid "Quantity on package"
|
||||
msgstr "Cantidad en el paquete"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "EA"
|
||||
msgstr "EA"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Gramo"
|
||||
msgstr "Gramo"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Kilogramo"
|
||||
msgstr "Kilogramo"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Litro"
|
||||
msgstr "Litro"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.line.qty,unit:"
|
||||
msgid "Pieza"
|
||||
msgstr "Pieza"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.reference,type_:"
|
||||
msgid "Line Number"
|
||||
msgstr "Número de línea"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.reference,type_:"
|
||||
msgid "Purchase"
|
||||
msgstr "Compra"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.reference,type_:"
|
||||
msgid "Shipment"
|
||||
msgstr "Albarán"
|
||||
|
||||
msgctxt "selection:edi.shipment.in.reference,type_:"
|
||||
msgid "VN"
|
||||
msgstr "VN"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Endorser"
|
||||
msgstr "Probador"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Final Receiver"
|
||||
msgstr "Receptor final"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Invoice Issuer"
|
||||
msgstr "Emisor de facturas"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Invoice Receiver"
|
||||
msgstr "Receptor de facturas"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Legal Purchaser"
|
||||
msgstr "Comprador legal"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Legal Supplier"
|
||||
msgstr "Proveedor legal"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "NAD"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "NADMR"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "NADPE"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "NADPW"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Payment Issuer"
|
||||
msgstr "Emisor de pago"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Purchaser"
|
||||
msgstr "Comprador"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Sender"
|
||||
msgstr "Remitente"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Stock Receiver"
|
||||
msgstr "Receptor de stock"
|
||||
|
||||
msgctxt "selection:edi.shipment.supplier,type_:"
|
||||
msgid "Supplier"
|
||||
msgstr "Proveedor"
|
||||
|
||||
msgctxt "selection:ir.cron,method:"
|
||||
msgid "Import EDI Shipment In Orders"
|
||||
msgstr "Importar pedidos albarán de proveedor EDI"
|
||||
|
||||
msgctxt "view:edi.shipment.in:"
|
||||
msgid "Create Shipment"
|
||||
msgstr "Crear albarán"
|
||||
|
||||
msgctxt "view:edi.shipment.in:"
|
||||
msgid "Lines"
|
||||
msgstr "Líneas"
|
||||
|
||||
msgctxt "view:edi.shipment.in:"
|
||||
msgid "Parties"
|
||||
msgstr "Terceros"
|
||||
|
||||
msgctxt "view:edi.shipment.in:"
|
||||
msgid "Search References"
|
||||
msgstr "Buscar referencias"
|
||||
|
||||
msgctxt "view:stock.configuration:"
|
||||
msgid "EDI"
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data grouped="1">
|
||||
<record model="ir.message" id="msg_no_move_ref">
|
||||
<field name="text">There is not move reference in line number %(number)s.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_no_purchase_ref">
|
||||
<field name="text">There is not purchase origin in edi shipment references.</field>
|
||||
</record>
|
||||
<record model="ir.message" id="msg_no_product">
|
||||
<field name="text">There is not product in line number %(number)s.</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
385
shipment.py
385
shipment.py
|
@ -1,385 +0,0 @@
|
|||
# encoding: utf-8
|
||||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pool import PoolMeta, Pool
|
||||
from trytond.pyson import Eval
|
||||
import os
|
||||
from trytond.modules.stock.move import STATES as MOVE_STATES
|
||||
from trytond.modules.edocument_unedifact.edocument import (EdifactMixin,
|
||||
UOMS_EDI_TO_TRYTON, EdiTemplate)
|
||||
from edifact.message import Message
|
||||
from edifact.serializer import Serializer
|
||||
from edifact.utils import (with_segment_check, validate_segment,
|
||||
separate_section, RewindIterator, DO_NOTHING, NO_ERRORS)
|
||||
from datetime import datetime
|
||||
from trytond.exceptions import UserError
|
||||
import logging
|
||||
|
||||
|
||||
__all__ = ['Move', 'StockConfiguration', 'ShipmentIn', 'Cron']
|
||||
|
||||
|
||||
logger = logging.getLogger('stock_shipment_in_edi')
|
||||
|
||||
DEFAULT_FILES_LOCATION = '/tmp/'
|
||||
MODULE_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
DEFAULT_TEMPLATE = 'DESADV_ediversa.yml'
|
||||
KNOWN_EXTENSIONS = ['.txt', '.edi', '.pla']
|
||||
|
||||
|
||||
class Cron(metaclass=PoolMeta):
|
||||
__name__ = 'ir.cron'
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(Cron, cls).__setup__()
|
||||
cls.method.selection.extend([
|
||||
('stock.shipment.in|get_edi_shipments_cron',
|
||||
'Import EDI Shipment In Orders')])
|
||||
|
||||
|
||||
class Move(metaclass=PoolMeta):
|
||||
__name__ = 'stock.move'
|
||||
edi_quantity = fields.Float('EDI Quantity',
|
||||
digits=(16, Eval('unit_digits', 2)),
|
||||
states=MOVE_STATES, depends=['state', 'unit_digits'])
|
||||
edi_description = fields.Text('EDI Description', size=None)
|
||||
|
||||
@classmethod
|
||||
def copy(cls, records, default=None):
|
||||
default = default.copy() if default else {}
|
||||
default.setdefault('edi_quantity')
|
||||
default.setdefault('edi_description')
|
||||
return super(Move, cls).copy(records, default=default)
|
||||
|
||||
def _get_new_lot(self, values, expiration):
|
||||
pool = Pool()
|
||||
Lot = pool.get('stock.lot')
|
||||
|
||||
today = datetime.today().date()
|
||||
lot = Lot()
|
||||
lot.number = values.get('lot') or today.isoformat()
|
||||
lot.product = self.product
|
||||
if ((not expiration or expiration != 'none')
|
||||
and values.get('expiration_date', False)):
|
||||
lot.expiration_date = values.get('expiration_date')
|
||||
else:
|
||||
lot.on_change_product()
|
||||
return lot
|
||||
|
||||
|
||||
class ShipmentIn(EdifactMixin, metaclass=PoolMeta):
|
||||
__name__ = 'stock.shipment.in'
|
||||
|
||||
@classmethod
|
||||
def import_edi_input(cls, response, template):
|
||||
pool = Pool()
|
||||
ProductCode = pool.get('product.code')
|
||||
Template = pool.get('product.template')
|
||||
Move = pool.get('stock.move')
|
||||
Lot = pool.get('stock.lot')
|
||||
|
||||
default_values = cls.default_get(cls._fields.keys(),
|
||||
with_rec_name=False)
|
||||
move_default_values = Move.default_get(Move._fields.keys(),
|
||||
with_rec_name=False)
|
||||
|
||||
def get_new_move():
|
||||
if product:
|
||||
move = Move(**move_default_values)
|
||||
move.product = product
|
||||
move.on_change_product()
|
||||
move.quantity = quantity
|
||||
if values.get('unit'):
|
||||
move.uom = values.get('unit')
|
||||
move.state = 'draft'
|
||||
move.currency = purchase.currency
|
||||
move.planned_date = shipment.planned_date
|
||||
move.unit_price = product.list_price
|
||||
move.edi_description = values.get('description')
|
||||
move.shipment = shipment
|
||||
if (quantity or 0) >= 0:
|
||||
move.from_location = purchase.party.supplier_location.id
|
||||
elif purchase.return_from_location:
|
||||
move.from_location = purchase.return_from_location.id
|
||||
|
||||
if (quantity or 0) >= 0:
|
||||
if purchase.warehouse:
|
||||
move.to_location = purchase.warehouse.input_location.id
|
||||
else:
|
||||
move.to_location = purchase.party.supplier_location.id
|
||||
return move
|
||||
|
||||
total_errors = []
|
||||
control_chars = cls.set_control_chars(
|
||||
template.get('control_chars', {}))
|
||||
message = Message.from_str(response.upper().replace('\r', ''),
|
||||
characters=control_chars)
|
||||
segments_iterator = RewindIterator(message.segments)
|
||||
template_header = template.get('header', {})
|
||||
template_detail = template.get('detail', {})
|
||||
detail = [x for x in separate_section(segments_iterator, start='CPS')]
|
||||
del(segments_iterator)
|
||||
|
||||
# If there isn't a segment DESADV_D_96A_UN_EAN005
|
||||
# means the file readed it's not a order response.
|
||||
if not message.get_segment('DESADV_D_96A_UN_EAN005'):
|
||||
logger.error("File %s processed is not shipment with header: "
|
||||
"DESADV_D_96A_UN_EAN005")
|
||||
return DO_NOTHING, NO_ERRORS
|
||||
|
||||
rffs = message.get_segments('RFF')
|
||||
rff, = [x for x in rffs if x.elements[0] == 'ON'] or [None]
|
||||
template_rff = template_header.get('RFF')
|
||||
purchase, errors = cls._process_RFF(rff, template_rff, control_chars)
|
||||
if errors:
|
||||
total_errors += errors
|
||||
if not purchase:
|
||||
return None, total_errors
|
||||
|
||||
if purchase and purchase.shipments:
|
||||
logger.error("Purchase has a shipment, do not search for reference"
|
||||
"on shipment")
|
||||
return DO_NOTHING, NO_ERRORS
|
||||
|
||||
shipment = cls(**default_values)
|
||||
shipment.supplier = purchase.party
|
||||
shipment.on_change_supplier()
|
||||
shipment.warehouse = purchase.warehouse
|
||||
shipment.moves = purchase.pending_moves
|
||||
|
||||
dtm = message.get_segment('DTM')
|
||||
template_dtm = template_header.get('DTM')
|
||||
effective_date, planned_date, errors = cls._process_DTM(dtm,
|
||||
template_dtm, control_chars)
|
||||
if errors:
|
||||
total_errors += errors
|
||||
shipment.effective_date = effective_date
|
||||
shipment.planned_date = planned_date
|
||||
|
||||
bgm = message.get_segment('BGM')
|
||||
template_bgm = template_header.get('BGM')
|
||||
reference, errors = cls._process_BGM(bgm, template_bgm,
|
||||
control_chars)
|
||||
if errors:
|
||||
total_errors += errors
|
||||
shipment.reference = reference
|
||||
|
||||
del(template_header)
|
||||
|
||||
shipment.save()
|
||||
|
||||
scannable_codes = ProductCode.search([
|
||||
('product', 'in', shipment.scannable_products)
|
||||
])
|
||||
scannable_products = {pc.number: pc.product for pc in scannable_codes}
|
||||
to_save = []
|
||||
for cps_group in detail:
|
||||
segments_iterator = RewindIterator(cps_group)
|
||||
linegroups = [x for x in separate_section(segments_iterator,
|
||||
start='LIN')]
|
||||
for linegroup in linegroups:
|
||||
values = {}
|
||||
for segment in linegroup:
|
||||
if segment.tag not in list(template_detail.keys()):
|
||||
continue
|
||||
template_segment = template_detail.get(segment.tag)
|
||||
tag = (segment.tag if segment.tag.endswith('LIN') else
|
||||
'{}LIN'.format(segment.tag))
|
||||
process = eval('cls._process_{}'.format(tag))
|
||||
to_update, errors = process(segment, template_segment)
|
||||
if errors:
|
||||
# If there are errors the linegroup isn't processed
|
||||
break
|
||||
if to_update:
|
||||
values.update(to_update)
|
||||
|
||||
if errors:
|
||||
total_errors += errors
|
||||
continue
|
||||
|
||||
product = scannable_products.get(values.get('product'))
|
||||
quantity = values.get('quantity')
|
||||
if not quantity:
|
||||
continue
|
||||
matching_moves = None
|
||||
if product:
|
||||
matching_moves = [m for m in shipment.pending_moves if
|
||||
(m.product == product) and (m.pending_quantity > 0)]
|
||||
if matching_moves:
|
||||
move = matching_moves[0]
|
||||
else:
|
||||
move = get_new_move()
|
||||
else:
|
||||
product_code, = ProductCode.search([
|
||||
('number', '=', values.get('product'))
|
||||
], limit=1) or [None]
|
||||
if not product_code:
|
||||
continue
|
||||
product = product_code.product
|
||||
move = get_new_move()
|
||||
|
||||
if not move:
|
||||
continue
|
||||
|
||||
move.edi_quantity = quantity
|
||||
move.edi_description = values.get('description')
|
||||
if hasattr(Template, 'lot_required') and product.lot_required:
|
||||
expiration = None
|
||||
if hasattr(Template, 'expiration_state'):
|
||||
expiration = product.expiration_state
|
||||
lots = Lot.search([
|
||||
('number', '=', values.get('lot')),
|
||||
('product', '=', move.product)
|
||||
], limit=1)
|
||||
if lots:
|
||||
lot, = lots
|
||||
if ((not expiration or expiration != 'none')
|
||||
and values.get('expiration_date', False)):
|
||||
expiration_date = values.get('expiration_date')
|
||||
if expiration_date and lot.expiration_date:
|
||||
if expiration_date < lot.expiration_date:
|
||||
lot.expiration_date = expiration_date
|
||||
else:
|
||||
lot = move._get_new_lot(values, expiration)
|
||||
if lot:
|
||||
lot.save()
|
||||
move.lot = lot
|
||||
to_save.append(move)
|
||||
|
||||
if to_save:
|
||||
Move.save(to_save)
|
||||
|
||||
return shipment, total_errors
|
||||
|
||||
@classmethod
|
||||
@with_segment_check
|
||||
def _process_RFF(cls, segment, template_segment, control_chars=None):
|
||||
pool = Pool()
|
||||
Purchase = pool.get('purchase.purchase')
|
||||
Config = pool.get('purchase.configuration')
|
||||
purchase_num = segment.elements[1]
|
||||
|
||||
padding = (Config(1).purchase_sequence and
|
||||
Config(1).purchase_sequence.padding - len(purchase_num))
|
||||
|
||||
if padding:
|
||||
purchase_num = "0"*padding + purchase_num
|
||||
|
||||
purchase, = Purchase.search([
|
||||
('number', '=', purchase_num),
|
||||
('state', 'in', ('processing', 'done'))
|
||||
], limit=1) or [None]
|
||||
|
||||
if not purchase:
|
||||
purchases = Purchase.search([
|
||||
('reference', '=', purchase_num),
|
||||
('state', 'in', ('processing', 'done'))
|
||||
])
|
||||
if len(purchases) == 1:
|
||||
purchase = purchases[0]
|
||||
|
||||
if not purchase:
|
||||
purchases = Purchase.search([
|
||||
('reference', '=', purchase_num),
|
||||
('state', 'in', ('processing', 'done'))
|
||||
])
|
||||
if len(purchases) == 1:
|
||||
purchase = purchases[0]
|
||||
if not purchase:
|
||||
error_msg = 'Purchase number {} not found'.format(purchase_num)
|
||||
serialized_segment = Serializer(control_chars).serialize([segment])
|
||||
return DO_NOTHING, ['{}: {}'.format(error_msg, serialized_segment)]
|
||||
return purchase, NO_ERRORS
|
||||
|
||||
@classmethod
|
||||
@with_segment_check
|
||||
def _process_DTM(cls, segment, template, control_chars=None):
|
||||
effective_date = cls.get_datetime_obj_from_edi_date(
|
||||
segment.elements[0])
|
||||
planned_date = (cls.get_datetime_obj_from_edi_date(
|
||||
segment.elements[1]) if len(segment.elements) > 1 else None)
|
||||
return effective_date, planned_date, NO_ERRORS
|
||||
|
||||
@classmethod
|
||||
@with_segment_check
|
||||
def _process_BGM(cls, segment, template, control_chars=None):
|
||||
return segment.elements[0], NO_ERRORS
|
||||
|
||||
@classmethod
|
||||
@with_segment_check
|
||||
def _process_LIN(cls, segment, template):
|
||||
return {'product': segment.elements[0]}, NO_ERRORS
|
||||
|
||||
@classmethod
|
||||
@with_segment_check
|
||||
def _process_QTYLIN(cls, segment, template):
|
||||
pool = Pool()
|
||||
Uom = pool.get('product.uom')
|
||||
result = {}
|
||||
qualifier = segment.elements[0]
|
||||
if qualifier != '12':
|
||||
return DO_NOTHING, NO_ERRORS
|
||||
if len(segment.elements) > 2:
|
||||
uom_value = UOMS_EDI_TO_TRYTON.get(segment.elements[2], 'u')
|
||||
else:
|
||||
uom_value = 'u'
|
||||
uom, = Uom.search([('symbol', '=', uom_value)], limit=1)
|
||||
result['unit'] = uom
|
||||
quantity = float(segment.elements[1])
|
||||
result['quantity'] = quantity
|
||||
return result, NO_ERRORS
|
||||
|
||||
@classmethod
|
||||
@with_segment_check
|
||||
def _process_IMDLIN(cls, segment, template):
|
||||
description = segment.elements[1] or None
|
||||
return {'description': description}, NO_ERRORS
|
||||
|
||||
@classmethod
|
||||
@with_segment_check
|
||||
def _process_PCILIN(cls, segment, template):
|
||||
elements_lenght = len(segment.elements)
|
||||
expiration_date = (cls.get_datetime_obj_from_edi_date(
|
||||
segment.elements[1]) if elements_lenght > 1 else None)
|
||||
lot = segment.elements[7] if elements_lenght > 6 else None
|
||||
result = {
|
||||
'expiration_date': (expiration_date.date() if expiration_date
|
||||
else None),
|
||||
'lot': lot
|
||||
}
|
||||
return result, NO_ERRORS
|
||||
|
||||
@classmethod
|
||||
def _process_CPSLIN(cls, segment, template):
|
||||
return DO_NOTHING, NO_ERRORS
|
||||
|
||||
@classmethod
|
||||
def create_edi_shipments(cls):
|
||||
pool = Pool()
|
||||
Configuration = pool.get('stock.configuration')
|
||||
configuration = Configuration(1)
|
||||
source_path = os.path.abspath(configuration.inbox_path_edi or
|
||||
DEFAULT_FILES_LOCATION)
|
||||
errors_path = os.path.abspath(configuration.errors_path_edi
|
||||
or DEFAULT_FILES_LOCATION)
|
||||
template_name = (configuration.template_order_response_edi
|
||||
or DEFAULT_TEMPLATE)
|
||||
template_path = os.path.join(os.path.join(MODULE_PATH, 'templates'),
|
||||
template_name)
|
||||
template = EdiTemplate(template_name, template_path)
|
||||
return cls.process_edi_inputs(source_path, errors_path, template)
|
||||
|
||||
@classmethod
|
||||
def get_edi_shipments_cron(cls):
|
||||
cls.create_edi_shipments()
|
||||
return True
|
||||
|
||||
|
||||
class StockConfiguration(metaclass=PoolMeta):
|
||||
__name__ = 'stock.configuration'
|
||||
|
||||
inbox_path_edi = fields.Char('Inbox Path EDI')
|
||||
errors_path_edi = fields.Char('Errors Path')
|
||||
template_order_response_edi = fields.Char('Template EDI Used for Response')
|
41
shipment.xml
41
shipment.xml
|
@ -1,41 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data>
|
||||
<record model="ir.ui.view" id="move_view_form_pending">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit" ref="stock_scanner.move_view_form_pending"/>
|
||||
<field name="name">move_form_pending</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="move_view_tree_pending">
|
||||
<field name="model">stock.move</field>
|
||||
<field name="inherit" ref="stock_scanner.move_view_tree_pending"/>
|
||||
<field name="name">move_tree_pending</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="stock_configuration_view_form">
|
||||
<field name="model">stock.configuration</field>
|
||||
<field name="inherit" ref="stock.stock_configuration_view_form"/>
|
||||
<field name="name">stock_configuration_form</field>
|
||||
</record>
|
||||
<!-- EDI Shipments User -->
|
||||
<record model="res.user" id="user_edi_shipment_in">
|
||||
<field name="login">user_edi_shipments</field>
|
||||
<field name="name">Cron EDI Shipments</field>
|
||||
<field name="signature"></field>
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
<record model="res.user-res.group"
|
||||
id="user_edi_shipment_in_group_admin">
|
||||
<field name="user" ref="user_edi_shipment_in"/>
|
||||
<field name="group" ref="res.group_admin"/>
|
||||
</record>
|
||||
<!-- Edi Shipments cron -->
|
||||
<record model="ir.cron" id="cron_import_edi_shipment_in">
|
||||
<field name="active" eval="False"/>
|
||||
<field name="interval_number" eval="1"/>
|
||||
<field name="interval_type">days</field>
|
||||
<field name="method">stock.shipment.in|get_edi_shipments_cron</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
|
@ -9,4 +9,5 @@ extras_depend:
|
|||
stock_lot
|
||||
stock_lot_sled
|
||||
xml:
|
||||
shipment.xml
|
||||
edi_shipment.xml
|
||||
message.xml
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<form col="8">
|
||||
<label name="company"/>
|
||||
<field name="company"/>
|
||||
<label name="shipment"/>
|
||||
<field name="shipment"/>
|
||||
<label name="party"/>
|
||||
<field name="party"/>
|
||||
<label name="manual_party"/>
|
||||
<field name="manual_party"/>
|
||||
<newline/>
|
||||
<label name="number"/>
|
||||
<field name="number"/>
|
||||
<label name="type_"/>
|
||||
<field name="type_"/>
|
||||
<label name="function_"/>
|
||||
<field name="function_"/>
|
||||
<newline/>
|
||||
<label name="expedition_date"/>
|
||||
<field name="expedition_date"/>
|
||||
<label name="estimated_date"/>
|
||||
<field name="estimated_date"/>
|
||||
<notebook colspan="8">
|
||||
<page id="references" string="Parties">
|
||||
<field name="references" colspan="2"/>
|
||||
<field name="suppliers" colspan="2"/>
|
||||
</page>
|
||||
<page id="lines" string="Lines">
|
||||
<field name="lines" colspan="6"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<button name="create_shipment"/>
|
||||
<button name="search_references"/>
|
||||
</form>
|
|
@ -0,0 +1,10 @@
|
|||
<form>
|
||||
<label name="type_"/>
|
||||
<field name="type_"/>
|
||||
<label name="reference"/>
|
||||
<field name="reference"/>
|
||||
<label name="reference_date"/>
|
||||
<field name="reference_date"/>
|
||||
<label name="origin"/>
|
||||
<field name="origin"/>
|
||||
</form>
|
|
@ -0,0 +1,5 @@
|
|||
<tree>
|
||||
<field name="type_"/>
|
||||
<field name="reference"/>
|
||||
<field name="origin"/>
|
||||
</tree>
|
|
@ -0,0 +1,26 @@
|
|||
<form col="8">
|
||||
<label name="code"/>
|
||||
<field name="code"/>
|
||||
<label name="code_type"/>
|
||||
<field name="code_type"/>
|
||||
<label name="product"/>
|
||||
<field name="product"/>
|
||||
<label name="line_number"/>
|
||||
<field name="line_number"/>
|
||||
<label name="purchaser_code"/>
|
||||
<field name="purchaser_code"/>
|
||||
<label name="supplier_code"/>
|
||||
<field name="supplier_code"/>
|
||||
<label name="serial_number"/>
|
||||
<field name="serial_number"/>
|
||||
<label name="lot_number"/>
|
||||
<field name="lot_number"/>
|
||||
<label name="description_type"/>
|
||||
<field name="description_type"/>
|
||||
<label name="expiration_date"/>
|
||||
<field name="expiration_date"/>
|
||||
<label name="packing_date"/>
|
||||
<field name="packing_date"/>
|
||||
<field name="references" colspan="2"/>
|
||||
<field name="quantities" colspan="2"/>
|
||||
</form>
|
|
@ -0,0 +1,10 @@
|
|||
<tree>
|
||||
<field name="line_number"/>
|
||||
<field name="code"/>
|
||||
<field name="code_type"/>
|
||||
<field name="product"/>
|
||||
<field name="lot_number"/>
|
||||
<field name="description_type"/>
|
||||
<field name="description"/>
|
||||
<field name="expiration_date"/>
|
||||
</tree>
|
|
@ -0,0 +1,11 @@
|
|||
<tree>
|
||||
<field name="company"/>
|
||||
<field name="number"/>
|
||||
<field name="type_"/>
|
||||
<field name="function_"/>
|
||||
<!-- <field name="party"/> -->
|
||||
<field name="shipment"/>
|
||||
<field name="expedition_date"/>
|
||||
<field name="estimated_date"/>
|
||||
<field name="manual_party"/>
|
||||
</tree>
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/field[@name='pending_quantity']" position="after">
|
||||
<label name="edi_quantity"/>
|
||||
<field name="edi_quantity"/>
|
||||
<newline/>
|
||||
<label name="edi_description"/>
|
||||
<newline/>
|
||||
<field name="edi_description" colspan="4"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/tree/field[@name='pending_quantity']" position="after">
|
||||
<field name="edi_quantity"/>
|
||||
<field name="edi_description"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -8,11 +8,5 @@
|
|||
<label name="inbox_path_edi"/>
|
||||
<field name="inbox_path_edi" colspan="3"/>
|
||||
<newline/>
|
||||
<label name="errors_path_edi"/>
|
||||
<field name="errors_path_edi" colspan="3"/>
|
||||
<newline/>
|
||||
<label name="template_order_response_edi"/>
|
||||
<field name="template_order_response_edi" colspan="3"/>
|
||||
<newline/>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<form col="4">
|
||||
<label name="edi_code"/>
|
||||
<field name="edi_code"/>
|
||||
<label name="vat"/>
|
||||
<field name="vat"/>
|
||||
<label name="name"/>
|
||||
<field name="name"/>
|
||||
<label name="commercial_register"/>
|
||||
<field name="commercial_register"/>
|
||||
<label name="street"/>
|
||||
<field name="street"/>
|
||||
<label name="city"/>
|
||||
<field name="city"/>
|
||||
<label name="zip"/>
|
||||
<field name="zip"/>
|
||||
<label name="vat"/>
|
||||
<field name="vat"/>
|
||||
<label name="country_code"/>
|
||||
<field name="country_code"/>
|
||||
<label name="account_bank"/>
|
||||
<field name="account_bank"/>
|
||||
</form>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of
|
||||
this repository contains the full copyright notices and license terms. -->
|
||||
<tree>
|
||||
<field name="party"/>
|
||||
<field name="edi_code"/>
|
||||
<field name="vat"/>
|
||||
<field name="name"/>
|
||||
<field name="commercial_register"/>
|
||||
<field name="city"/>
|
||||
<field name="zip"/>
|
||||
<field name="vat"/>
|
||||
<field name="country_code"/>
|
||||
<field name="account_bank"/>
|
||||
</tree>
|
Loading…
Reference in New Issue