[IMP] product rename suggested to accessory, add alternative to replace recommend

bzr revid: al@openerp.com-20140130233240-p0wcs2s57qp9nwp2
This commit is contained in:
Antony Lesuisse 2014-01-31 00:32:40 +01:00
parent 5400c508e5
commit c1739bfb8d
4 changed files with 6 additions and 6 deletions

View File

@ -320,7 +320,7 @@ class Ecommerce(http.Controller):
product_ids = []
if order:
for line in order.order_line:
suggested_ids += [p.id for p in line.product_id and line.product_id.suggested_product_ids or []]
suggested_ids += [p.id for p in line.product_id and line.product_id.accessory_product_ids or []]
product_ids.append(line.product_id.id)
suggested_ids = list(set(suggested_ids) - set(product_ids))
if suggested_ids:

View File

@ -536,7 +536,7 @@ Weight: 1.1 ounces</field>
</div>
</section>
</field>
<field name="suggested_product_ids" eval="[(6, 0, [ref('product.product_template_7')])]"/>
<field name="accessory_product_ids" eval="[(6, 0, [ref('product.product_template_7')])]"/>
</record>
<record id="item1" model="product.pricelist.item">

View File

@ -53,8 +53,8 @@ class product_template(osv.Model):
string='Website Messages',
help="Website communication history",
),
'suggested_product_id': fields.many2one('product.template', 'Suggested For Product'),
'suggested_product_ids': fields.one2many('product.template', 'suggested_product_id', 'Suggested Products'),
'alternative_product_ids': fields.many2many('product.template','product_alternative_rel','src_id','dest_id', string='Alternative Products', help='Appear on the product page'),
'accessory_product_ids': fields.many2many('product.template','product_accessory_rel','src_id','dest_id', string='Accessory Products', help='Appear on the shopping cart'),
'website_size_x': fields.integer('Size X'),
'website_size_y': fields.integer('Size Y'),
'website_style_ids': fields.many2many('product.style', 'product_website_style_rel', 'product_id', 'style_id', 'Styles'),

View File

@ -29,7 +29,7 @@
<group name="sale" position="inside">
<group name="website" string="Website">
<field name="suggested_product_ids" widget="many2many_tags"/>
<field name="accessory_product_ids" widget="many2many_tags"/>
<field name="website_style_ids" widget="many2many_tags"/>
<field name="website_sequence"/>
</group>
@ -61,7 +61,7 @@
</xpath>
<xpath expr="//field[@name='description']" position="before">
<group colspan="4" string="Website Options">
<field name="suggested_product_ids" widget="many2many_tags"/>
<field name="accessory_product_ids" widget="many2many_tags"/>
<field name="website_style_ids" widget="many2many_tags"/>
<field colspan="4" name="attribute_lines" nolabel="1" groups="product.group_product_attributes">
<tree string="Product attributes" editable="bottom">