1
# -*- coding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
5
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
7
# This program is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU Affero General Public License as
9
# published by the Free Software Foundation, either version 3 of the
10
# License, or (at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU Affero General Public License for more details.
17
# You should have received a copy of the GNU Affero General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
##############################################################################
21
from osv import fields,osv
23
class tf_res_partner_mktginfo(osv.osv):
24
_name = "tf_res_partner_mktginfo"
26
_std_client_tao_selection = [('std','Standard'), ('design_client','Designed by client'), ('design_tao','Designed by TAO')]
27
_std_client_selection = [('std','Standard'), ('design_client','Designed by client')]
28
_no_firsttime_everytime_selection = [('no','Drop down menu, No validation required'), ('firsttime','Validation needed for new or updated materials'), ('everytime','Validation needed every time')]
30
# Make name field translatable
32
'partner_id': fields.many2one('res.partner', 'Partner', select=True),
33
'brand': fields.char('Brand', size=34),
34
'file_validation': fields.selection(_no_firsttime_everytime_selection, 'File Validation'),
35
'mockup_validation': fields.selection(_no_firsttime_everytime_selection, 'Mockup Validation'),
36
'mockup_qty': fields.integer('Mockup Qty'),
37
'tao_modification_rights': fields.boolean('Tao Modification Rights'),
38
'batch_use': fields.boolean('Batch Use'),
39
'batch_format': fields.char('Batch Format', size=13),
40
'batch_date': fields.selection([('received','Order received'), ('plannedproduction','Production Planned'), ('actualproduction','Actual Production'), ('ETD','ETD'), ('no_date','NoDate')], 'Batch Date'),
41
'batch_position': fields.selection([('RP','Rating Plate'), ('EAN','EAN Sticker'), ('colorbox','Colorbox'), ('innerbox','Inner Box'), ('outer','Outer Carton'), ('others','Others')], 'Batch Position'),
42
'padprinting': fields.selection(_std_client_tao_selection, 'Padprinting'),
43
'rating_plate': fields.selection(_std_client_tao_selection, 'Rating Plate'),
44
'instruction_sheet': fields.selection(_std_client_tao_selection, 'Instruction Sheet'),
45
'unit_packaging': fields.selection(_std_client_tao_selection, 'Unit Packaging'),
46
'inner_box': fields.selection(_std_client_selection, 'Inner Box'),
47
'shipping_mark_inn': fields.selection(_std_client_selection, 'Shipping Mark Inn'),
48
'shipping_mark_inn_position': fields.selection([('front','Front'), ('back','Back'), ('right','Right'), ('left','Left'), ('bottom','Bottom'), ('top','Top')], 'Shipping Mark Inn Position'),
49
'outer_carton': fields.selection(_std_client_selection, 'Outer Carton'),
50
'shipping_mark_out': fields.selection(_std_client_selection, 'Shipping Mark Out'),
51
'shipping_mark_out_pos':fields.selection([('front','Front'), ('back','Back'), ('right','Right'), ('left','Left'), ('bottom','Bottom'), ('top','Full')], 'Shipping Mark Out Pos'),
52
'display_box': fields.selection(_std_client_tao_selection, 'Display Box'),
53
'pallet': fields.selection(_std_client_selection, 'Pallet'),
54
'additional_comments': fields.text('Additional Comments', size=64),
58
tf_res_partner_mktginfo()
66
class tf_res_partner_sourcinginfo(osv.osv):
67
_name = "tf_res_partner_sourcinginfo"
69
# Make name field translatable
71
'partner_id': fields.many2one('res.partner', 'Partner', select=True),
72
'min_qty': fields.integer('Minimum Quantity'),
73
'max_qty': fields.integer('Maximum Quantity'),
74
'lead_time': fields.char('Lead Time in Days', size=12),
81
tf_res_partner_sourcinginfo()
83
class tf_res_partner(osv.osv):
85
# Make name field translatable
87
_inherit = "res.partner"
89
'name': fields.char('Name', size=96, required=True, select=True, translate=True),
91
'mktginfo': fields.one2many('tf_res_partner_mktginfo', 'partner_id', 'Marketing Validation Info'),
93
'sourcinginfo': fields.one2many('tf_res_partner_sourcinginfo', 'partner_id', 'Sourcing Info'),
94
'sourcing_area': fields.char('Area', size=12),
95
'sourcing_mc': fields.char('MC', size=96),
96
'sourcing_code_of_business': fields.char('Code Of Business', size=12),
97
'sourcing_main_products': fields.char('Main Products', size=96),
98
'sourcing_monthly_capacity': fields.char('Monthly Capacity', size=96),
99
'sourcing_comments': fields.text('Additional Sourcing Comments', size=96),
108
class tf_res_partner_address(osv.osv):
109
# make name, function fields translatable
110
_name= "res.partner.address"
111
_inherit= "res.partner.address"
113
'name': fields.char('Contact Name', size=64, select=1, translate=True),
114
'function': fields.char('Function', size=64, translate=True),
115
'street': fields.char('Street', size=128, translate=True),
116
'street2': fields.char('Street2', size=128, translate=True),
117
'city': fields.char('City', size=128, translate=True),
120
tf_res_partner_address()
126
class tf_CountryState(osv.osv):
127
_name = 'res.country.state'
128
_inherit = "res.country.state"
130
'name': fields.char('State Name', size=64, required=True, translate=True),