~credativ/openobject-addons/elico-6.1-fixes-gap-analysis-duplicate

« back to all changes in this revision

Viewing changes to oa_hr_timesheet_sheet/.svn/text-base/partner.py.svn-base

  • Committer:
  • Date: 2012-07-04 00:16:29 UTC
  • Revision ID: elicoidal@hotmail.com-20120704001629-r88842q20trbnayj
[ADD] OA suite and Windows Live Messenger module

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
##############################################################################
 
3
#
 
4
#    OpenERP, Open Source Management Solution
 
5
#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
 
6
#
 
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.
 
11
#
 
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.
 
16
#
 
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/>.
 
19
#
 
20
##############################################################################
 
21
from osv import fields,osv
 
22
 
 
23
class tf_res_partner_mktginfo(osv.osv):
 
24
    _name = "tf_res_partner_mktginfo"
 
25
 
 
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')]
 
29
 
 
30
    # Make name field translatable
 
31
    _columns = { 
 
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),
 
55
        }
 
56
 
 
57
 
 
58
tf_res_partner_mktginfo()
 
59
 
 
60
 
 
61
 
 
62
 
 
63
 
 
64
 
 
65
 
 
66
class tf_res_partner_sourcinginfo(osv.osv):
 
67
    _name = "tf_res_partner_sourcinginfo"
 
68
 
 
69
    # Make name field translatable
 
70
    _columns = { 
 
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),
 
75
        }
 
76
 
 
77
 
 
78
 
 
79
 
 
80
 
 
81
tf_res_partner_sourcinginfo()
 
82
 
 
83
class tf_res_partner(osv.osv):
 
84
 
 
85
    # Make name field translatable
 
86
    _name = "res.partner"
 
87
    _inherit = "res.partner"
 
88
    _columns = { 
 
89
        'name':                 fields.char('Name', size=96, required=True, select=True, translate=True),
 
90
 
 
91
        'mktginfo':             fields.one2many('tf_res_partner_mktginfo', 'partner_id', 'Marketing Validation Info'),
 
92
 
 
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),
 
100
        }
 
101
 
 
102
 
 
103
tf_res_partner()
 
104
 
 
105
 
 
106
 
 
107
 
 
108
class tf_res_partner_address(osv.osv):
 
109
    # make name, function fields translatable
 
110
    _name= "res.partner.address"
 
111
    _inherit= "res.partner.address"
 
112
    _columns = {
 
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),
 
118
   }  
 
119
 
 
120
tf_res_partner_address()   
 
121
 
 
122
 
 
123
 
 
124
 
 
125
 
 
126
class tf_CountryState(osv.osv):
 
127
    _name = 'res.country.state'
 
128
    _inherit = "res.country.state"
 
129
    _columns = {
 
130
        'name': fields.char('State Name', size=64, required=True, translate=True),  
 
131
    }
 
132
 
 
133
tf_CountryState()     
 
134