2010-02-03 11:49:57 +01:00
|
|
|
#This file is part of Tryton. The COPYRIGHT file at the top level of
|
|
|
|
|
#this repository contains the full copyright notices and license terms.
|
|
|
|
|
from trytond.model import ModelView, ModelSQL, ModelSingleton, fields
|
2011-08-04 16:57:42 +02:00
|
|
|
from trytond.pyson import Eval, Get
|
2010-02-03 11:49:57 +01:00
|
|
|
|
2012-09-24 22:18:17 +02:00
|
|
|
__all__ = ['Configuration']
|
|
|
|
|
|
2010-02-03 11:49:57 +01:00
|
|
|
|
|
|
|
|
class Configuration(ModelSingleton, ModelSQL, ModelView):
|
2010-04-08 19:15:42 +02:00
|
|
|
'Stock Configuration'
|
2012-09-24 22:18:17 +02:00
|
|
|
__name__ = 'stock.configuration'
|
2010-03-11 16:54:32 +01:00
|
|
|
shipment_in_sequence = fields.Property(fields.Many2One('ir.sequence',
|
2011-08-04 16:57:42 +02:00
|
|
|
'Supplier Shipment Sequence', domain=[
|
|
|
|
|
('company', 'in',
|
2013-10-09 18:25:53 +02:00
|
|
|
[Eval('context', {}).get('company', -1), None]),
|
2011-08-04 16:57:42 +02:00
|
|
|
('code', '=', 'stock.shipment.in'),
|
|
|
|
|
], required=True))
|
2010-03-11 16:54:32 +01:00
|
|
|
shipment_in_return_sequence = fields.Property(fields.Many2One(
|
2011-08-04 16:57:42 +02:00
|
|
|
'ir.sequence', 'Supplier Return Shipment Sequence', domain=[
|
|
|
|
|
('company', 'in',
|
2013-10-09 18:25:53 +02:00
|
|
|
[Eval('context', {}).get('company', -1), None]),
|
2011-08-04 16:57:42 +02:00
|
|
|
('code', '=', 'stock.shipment.in.return'),
|
|
|
|
|
], required=True))
|
2012-04-03 20:07:43 +02:00
|
|
|
shipment_out_sequence = fields.Property(fields.Many2One('ir.sequence',
|
2011-08-04 16:57:42 +02:00
|
|
|
'Customer Shipment Sequence', domain=[
|
|
|
|
|
('company', 'in',
|
2013-10-09 18:25:53 +02:00
|
|
|
[Eval('context', {}).get('company', -1), None]),
|
2011-08-04 16:57:42 +02:00
|
|
|
('code', '=', 'stock.shipment.out'),
|
|
|
|
|
], required=True))
|
2010-03-11 16:54:32 +01:00
|
|
|
shipment_out_return_sequence = fields.Property(fields.Many2One(
|
2011-08-04 16:57:42 +02:00
|
|
|
'ir.sequence', 'Customer Return Shipment Sequence', domain=[
|
|
|
|
|
('company', 'in',
|
2013-10-09 18:25:53 +02:00
|
|
|
[Eval('context', {}).get('company', -1), None]),
|
2011-08-04 16:57:42 +02:00
|
|
|
('code', '=', 'stock.shipment.out.return'),
|
|
|
|
|
], required=True))
|
2010-03-11 16:54:32 +01:00
|
|
|
shipment_internal_sequence = fields.Property(fields.Many2One(
|
2011-08-04 16:57:42 +02:00
|
|
|
'ir.sequence', 'Internal Shipment Sequence', domain=[
|
|
|
|
|
('company', 'in',
|
2013-10-09 18:25:53 +02:00
|
|
|
[Eval('context', {}).get('company', -1), None]),
|
2011-08-04 16:57:42 +02:00
|
|
|
('code', '=', 'stock.shipment.internal'),
|
|
|
|
|
], required=True))
|