1 ##############################################################################
3 # OpenERP, Open Source Management Solution
4 # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as
8 # published by the Free Software Foundation, either version 3 of the
9 # License, or (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Affero General Public License for more details.
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 ##############################################################################
21 from openerp.osv import fields, osv
23 class product_product(osv.osv):
24 _inherit = 'product.product'
26 'manufacturer' : fields.many2one('res.partner', 'Manufacturer'),
27 'manufacturer_pname' : fields.char('Manufacturer Product Name', size=64),
28 'manufacturer_pref' : fields.char('Manufacturer Product Code', size=64),
29 'attribute_ids': fields.one2many('product.manufacturer.attribute', 'product_id', 'Attributes'),
32 class product_attribute(osv.osv):
33 _name = "product.manufacturer.attribute"
34 _description = "Product attributes"
36 'name' : fields.char('Attribute', size=64, required=True),
37 'value' : fields.char('Value', size=64),
38 'product_id': fields.many2one('product.product', 'Product', ondelete='cascade'),
41 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: