trytond-edocument_edifact/party.py

50 lines
1.3 KiB
Python
Raw Normal View History

2018-05-02 13:50:39 +02:00
# The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import PoolMeta
from trytond.model import fields
2019-08-16 09:24:39 +02:00
__all__ = ['Party', 'PartyIdentifier', 'Address']
class Party(metaclass=PoolMeta):
__name__ = 'party.party'
edi_template_path = fields.Char('Template Path')
edi_add_header = fields.Boolean('Add Header')
edi_release_number = fields.Selection([
2019-08-20 17:36:03 +02:00
(None, ' '),
2019-08-16 09:24:39 +02:00
('96A', '96A'),
('01B', '01B'),
], 'Release Number')
edi_assigned_code = fields.Selection([
2019-08-20 17:36:03 +02:00
(None, ' '),
2019-08-16 09:24:39 +02:00
('EAN001', 'EAN001'),
('EAN002', 'EAN002'),
('EAN003', 'EAN003'),
('EAN004', 'EAN004'),
('EAN005', 'EAN005'),
('EAN006', 'EAN006'),
('EAN007', 'EAN007'),
('EAN008', 'EAN008'),
('EAN009', 'EAN009'),
('EAN010', 'EAN010'),
], 'Assigned Code')
2018-05-02 13:50:39 +02:00
2019-02-28 13:56:45 +01:00
class PartyIdentifier(metaclass=PoolMeta):
2018-05-02 13:50:39 +02:00
__name__ = 'party.identifier'
@classmethod
2019-03-21 12:33:05 +01:00
def __setup__(cls):
super(PartyIdentifier, cls).__setup__()
cls.type.selection.extend(
[('EDI_sender', 'EDI Sender'),
2018-05-02 13:50:39 +02:00
('EDI_receiver', 'EDI Receiver'),
2019-08-16 09:24:39 +02:00
('EDI_supplier', 'EDI Supplier')])
2018-05-02 13:50:39 +02:00
2019-02-28 13:56:45 +01:00
class Address(metaclass=PoolMeta):
2018-05-02 13:50:39 +02:00
__name__ = 'party.address'
EDI_code = fields.Char('EDI Code')