[FIX] website_sale: mycart when the user haven't sale order
[odoo/odoo.git] / addons / website_sale / views / website_sale_backend.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4
5
6     <record id="product_normal_form_view" model="ir.ui.view">
7         <field name="name">product.normal.form.inherit</field>
8         <field name="model">product.product</field>
9         <field name="inherit_id" ref="product.product_normal_form_view"/>
10         <field name="arch" type="xml">
11             <!-- add state field in header -->
12             <xpath expr="//sheet" position="before">
13                 <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('sale_ok', '=', False)]}">
14                     <p attrs="{'invisible': [('website_published', '=', True)]}">
15                         This product is <b>not available</b> for public user in your ecommerce.
16                     </p>
17                     <p attrs="{'invisible': [('website_published', '=', False)]}">
18                         This product is <b>available</b> for public user in your ecommerce.
19                     </p>
20                     <p>Website view: <field class="oe_inline" name="website_url" widget="url"/></p>
21                 </div>
22             </xpath>
23
24             <group name="sale" position="inside">
25                 <group name="website" string="Website">
26                     <field name="website_published"/>
27                     <field name="suggested_product_ids" widget="many2many_tags"/>
28                     <field name="website_style_ids" widget="many2many_tags"/>
29                 </group>
30             </group>
31         </field>
32     </record>
33
34     <record model="ir.ui.view" id="product_pricelist_view">
35         <field name="name">product.pricelist.website.form</field>
36         <field name="model">product.pricelist</field>
37         <field name="inherit_id" ref="product.product_pricelist_view"/>
38         <field name="arch" type="xml">
39             <field name="active" position="after">
40                 <field name="code"/>
41             </field>
42         </field>
43     </record>
44
45     <record model="ir.ui.view" id="product_template_form_view">
46         <field name="name">product.template.product.website.form</field>
47         <field name="model">product.template</field>
48         <field name="inherit_id" ref="product.product_template_form_view"/>
49         <field name="arch" type="xml">
50             <!-- add state field in header -->
51             <xpath expr="//sheet" position="before">
52                 <div class="oe_form_box_info oe_text_center" attrs="{'invisible': [('sale_ok', '=', False)]}">
53                     <p attrs="{'invisible': [('website_published', '=', True)]}">
54                         This product is <b>not available</b> for public user in your ecommerce.
55                     </p>
56                     <p attrs="{'invisible': [('website_published', '=', False)]}">
57                         This product is <b>available</b> for public user in your ecommerce.
58                     </p>
59                     <p>Website view: <field class="oe_inline" name="website_url" widget="url"/></p>
60                 </div>
61             </xpath>
62
63             <xpath expr="//group[@string='Product Type']" position="inside">
64                     <field name="website_published"/>
65             </xpath>
66             <xpath expr="//page[@string='Information']" position="inside">
67                 <group colspan="4" string="Products On Ecommerce">
68                     <field name="suggested_product_ids" widget="many2many_tags"/>
69                     <field name="website_style_ids" widget="many2many_tags"/>
70                     <field colspan="4" name="website_attribute_ids" nolabel="1">
71                         <tree string="Product Attributes" editable="bottom">
72                             <field name="attribute_id" on_change="onchange_attribute_id(attribute_id)"/>
73                             <field name="type" invisible="1"/>
74                             <field name="value" attrs="{'required': [('type','=','float')]}"/>
75                             <field name="value_id"
76                                 attrs="{'required': [('type','=','distinct')]}"
77                                 context="{'default_attribute_id': attribute_id}"
78                                 domain="[('attribute_id', '=', attribute_id)]"/>
79                         </tree>
80                     </field>
81                 </group>
82             </xpath>
83
84
85         </field>
86     </record>
87
88  </data>
89 </openerp>