1
1
# -*- encoding: utf-8 -*-
2
##############################################################################
2
#################################################################################
4
# OpenERP, Open Source Management Solution
5
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
4
# Copyright (C) 2010 Renato Lima - Akretion
8
6
# This program is free software: you can redistribute it and/or modify
9
7
# it under the terms of the GNU General Public License as published by
18
16
# You should have received a copy of the GNU General Public License
19
17
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
19
#################################################################################
23
21
from osv import fields, osv
28
26
'name': fields.char('Name', size=64, required=True),
29
27
'description': fields.char('Description', size=128),
30
'from_country': fields.many2one('res.country','Country Form'),
31
'from_state': fields.many2one('res.country.state', 'State To', domain="[('country_id','=',from_country)]"),
32
'to_country': fields.many2one('res.country', 'Country To'),
33
'to_state': fields.many2one('res.country.state', 'State To', domain="[('country_id','=',to_country)]"),
28
'from_country': fields.many2one('res.country','Form Country'),
29
'from_state': fields.many2one('res.country.state', 'From State', domain="[('country_id','=',from_country)]"),
30
'to_country': fields.many2one('res.country', 'To Country'),
31
'to_state': fields.many2one('res.country.state', 'To State', domain="[('country_id','=',to_country)]"),
34
32
'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
35
33
'fiscal_position_id': fields.many2one('account.fiscal.position', 'Fiscal Position', domain="[('company_id','=',company_id)]", required=True, select=True),
36
'use_sale' : fields.boolean('Use in sales order'),
34
'use_sale' : fields.boolean('Use in sales Orders'),
37
35
'use_invoice' : fields.boolean('Use in Invoices'),
38
36
'use_purchase' : fields.boolean('Use in Purchases'),
39
37
'use_picking' : fields.boolean('Use in Picking'),
46
44
'name': fields.char('Name', size=64, required=True),
47
45
'description': fields.char('Description', size=128),
48
'from_country': fields.many2one('res.country','Country Form'),
49
'from_state': fields.many2one('res.country.state', 'State From', domain="[('country_id','=',from_country)]"),
50
'to_country': fields.many2one('res.country', 'Country To'),
51
'to_state': fields.many2one('res.country.state', 'State To', domain="[('country_id','=',to_country)]"),
46
'from_country': fields.many2one('res.country','Form Country'),
47
'from_state': fields.many2one('res.country.state', 'From State', domain="[('country_id','=',from_country)]"),
48
'to_country': fields.many2one('res.country', 'To Country'),
49
'to_state': fields.many2one('res.country.state', 'To State', domain="[('country_id','=',to_country)]"),
52
50
'fiscal_position_id': fields.many2one('account.fiscal.position.template', 'Fiscal Position', required=True),
53
'use_sale' : fields.boolean('Use in sales order'),
51
'use_sale' : fields.boolean('Use in sales Orders'),
54
52
'use_invoice' : fields.boolean('Use in Invoices'),
55
53
'use_purchase' : fields.boolean('Use in Purchases'),
56
54
'use_picking' : fields.boolean('Use in Picking'),