1
##############################################################################
3
# Copyright (c) 2005 TINY SPRL. (http://tiny.be) All Rights Reserved.
5
# $Id: product_expiry.py 2103 2006-01-11 21:01:14Z pinky $
7
# WARNING: This program as such is intended to be used by professional
8
# programmers who take the whole responsability of assessing all potential
9
# consequences resulting from its eventual inadequacies and bugs
10
# End users who are looking for a ready-to-use solution with commercial
11
# garantees and support are strongly adviced to contract a Free Software
14
# This program is Free Software; you can redistribute it and/or
15
# modify it under the terms of the GNU General Public License
16
# as published by the Free Software Foundation; either version 2
17
# of the License, or (at your option) any later version.
19
# This program is distributed in the hope that it will be useful,
20
# but WITHOUT ANY WARRANTY; without even the implied warranty of
21
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
# GNU General Public License for more details.
24
# You should have received a copy of the GNU General Public License
25
# along with this program; if not, write to the Free Software
26
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28
##############################################################################
30
from osv import fields,osv
32
class product_product(osv.osv):
33
_inherit = 'product.product'
34
_name = 'product.product'
36
'manufacturer' : fields.many2one('res.partner', 'Manufacturer'),
37
'manufacturer_pname' : fields.char('Manufacturer product name', size=64),
38
'manufacturer_pref' : fields.char('Manufacturer product code', size=64),
39
'attribute_ids': fields.one2many('product.electronic.attribute', 'product_id', 'Attributes'),
43
class product_attribute(osv.osv):
44
_name = "product.electronic.attribute"
45
_description = "Product attributes"
47
'name' : fields.char('Attribute', size=64, required=True),
48
'value' : fields.char('Value', size=64),
49
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade'),