1
# -*- encoding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
5
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
8
# This program is free software: you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation, either version 3 of the License, or
11
# (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License
19
# along with this program. If not, see <http://www.gnu.org/licenses/>.
21
##############################################################################
25
from osv import fields,osv
31
class product_product(osv.osv):
32
_inherit = "product.product"
34
'product_logo': fields.binary('Product Logo'),
35
'shop_ids': fields.many2many('ecommerce.shop','ecommerce_new_product_rel','ecommerce_product','product','Web shop'),
39
class specail_offer(osv.osv):
40
_inherit = "product.pricelist.version"
42
'offer_name': fields.char('OfferName',size=64,translate=True)
47
class reviews(osv.osv):
48
_name="ecommerce.product.reviews"
50
_description="Reviews about product"
52
'product_id':fields.many2one('product.product','Product', required=True, ondelete='cascade'),
53
'customer_id':fields.many2one('ecommerce.partner','Customer', required=True, ondelete='cascade'),
54
'reviewdate':fields.date('Review Date'),
55
'rating':fields.integer('Rating'),
56
'review':fields.text('Review')
60
'reviewdate': lambda *a: time.strftime('%Y-%m-%d'),