summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorFabien Pinckaers <fp@tinyerp.com>2012-08-31 15:50:10 +0200
committerFabien Pinckaers <fp@tinyerp.com>2012-08-31 15:50:10 +0200
commitbeb8a590e55bfc978112f7e2497c2d8212ece4cc (patch)
treed6fbf1e0e90e2c66f78880f38b8c0c4ca79e5a5a /addons
parent1262c81fc7e8a0b2b72554842567068e16fbb71e (diff)
[IMP] product view improvements
bzr revid: fp@tinyerp.com-20120831135010-zo37jb6nyngvqfpy
Diffstat (limited to 'addons')
-rw-r--r--addons/event_sale/event_sale_view.xml3
-rw-r--r--addons/product/product.py6
-rw-r--r--addons/product/product_view.xml77
-rw-r--r--addons/product_expiry/product_expiry_view.xml8
-rw-r--r--addons/product_manufacturer/product_manufacturer_view.xml32
-rw-r--r--addons/purchase/purchase_view.xml9
-rw-r--r--addons/purchase_requisition/purchase_requisition_view.xml2
-rw-r--r--addons/stock/product_view.xml65
-rw-r--r--addons/stock_location/stock_location_view.xml101
-rw-r--r--addons/warning/warning_view.xml14
10 files changed, 156 insertions, 161 deletions
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 53e8a4cc18f..c39cff04bd9 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -8,8 +8,9 @@
<field name="arch" type="xml">
<field name="purchase_ok" position="after">
<field name="event_ok" on_change="onchange_event_ok(event_ok, context)"/>
+ <label for="event_ok"/>
</field>
- <field name='procure_method' position='before'>
+ <field name='default_code' position='before'>
<field name="event_type_id" attrs="{'readonly': [('event_ok', '=', False)]}"/>
</field>
</field>
diff --git a/addons/product/product.py b/addons/product/product.py
index 214445204bb..699fa66dd8f 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -288,7 +288,7 @@ class product_template(osv.osv):
'rental': fields.boolean('Can be Rent'),
'categ_id': fields.many2one('product.category','Category', required=True, change_default=True, domain="[('type','=','normal')]" ,help="Select category for the current product"),
'list_price': fields.float('Sale Price', digits_compute=dp.get_precision('Product Price'), help="Base price for computing the customer price. Sometimes called the catalog price."),
- 'standard_price': fields.float('Cost Price', required=True, digits_compute=dp.get_precision('Product Price'), help="Product's cost for accounting stock valuation. It is the base price for the supplier price.", groups="base.group_user"),
+ 'standard_price': fields.float('Cost', required=True, digits_compute=dp.get_precision('Product Price'), help="Product's cost for accounting stock valuation. It is the base price for the supplier price.", groups="base.group_user"),
'volume': fields.float('Volume', help="The volume in m3."),
'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."),
'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."),
@@ -535,9 +535,9 @@ class product_product(osv.osv):
'outgoing_qty': fields.function(_product_outgoing_qty, type='float', string='Outgoing'),
'price': fields.function(_product_price, type='float', string='Pricelist', digits_compute=dp.get_precision('Product Price')),
'lst_price' : fields.function(_product_lst_price, type='float', string='Public Price', digits_compute=dp.get_precision('Product Price')),
- 'code': fields.function(_product_code, type='char', string='Reference'),
+ 'code': fields.function(_product_code, type='char', string='Internal Reference'),
'partner_ref' : fields.function(_product_partner_ref, type='char', string='Customer ref'),
- 'default_code' : fields.char('Reference', size=64, select=True),
+ 'default_code' : fields.char('Internal Reference', size=64, select=True),
'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the product without removing it."),
'variants': fields.char('Variants', size=64),
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade"),
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index d341b5883d6..cc0b7073a58 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -71,6 +71,12 @@
</h1>
<label for="categ_id" class="oe_edit_only"/>
<h2><field name="categ_id"/></h2>
+ <div name="options" groups="base.group_user">
+ <field name="sale_ok"/>
+ <label for="sale_ok"/>
+ <field name="purchase_ok"/>
+ <label for="purchase_ok"/>
+ </div>
</div>
<div class="oe_right oe_button_box" name="buttons">
</div>
@@ -78,57 +84,60 @@
<page string="Information">
<group>
<group>
+ <field name="list_price"/>
+ <field name="cost_method" groups="product.group_costing_method"/>
+ <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
+ <field name="price_margin" groups="product.group_product_variant"/>
+ <field name="price_extra" groups="product.group_product_variant"/>
+ </group>
+ <group>
<field name="default_code"/>
<field name="ean13" placeholder="e.g. 5901234123457"/>
<field groups="product.group_product_variant" name="variants"/>
</group>
- <group groups="base.group_user">
- <field name="sale_ok"/>
- <field name="purchase_ok"/>
- </group>
- <group string="Procurement">
+ <group>
<field name="type"/>
+ <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)" groups="product.group_uom"/>
+ </group>
+ </group>
+ <field name="description" placeholder="describe the product's characteristics..."/>
+ </page>
+ <page string="Procurements" groups="base.group_user">
+ <group name="procurement">
+ <group>
<field name="procure_method" groups="base.group_user" attrs="{'invisible':[('type','=', 'service')]}"/>
</group>
- <group string="Prices">
- <field name="list_price"/>
- <field name="cost_method" groups="product.group_costing_method"/>
- <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}"/>
- <field name="price_margin" groups="product.group_product_variant"/>
- <field name="price_extra" groups="product.group_product_variant"/>
+ <group>
+ <field name="uom_po_id"/>
+
</group>
+ </group>
+ <label for="description_purchase"/>
+ <field name="description_purchase" placeholder="This note will be displayed on requests for quotation..."/>
+ </page>
+ <page string="Inventory" groups="base.group_user">
+ <group name="inventory">
<group groups="product.group_stock_packaging" string="Weights">
<field digits="(14, 3)" name="volume" attrs="{'readonly':[('type','=','service')]}"/>
<field name="weight" attrs="{'readonly':[('type','=','service')]}"/>
<field name="weight_net" attrs="{'readonly':[('type','=','service')]}"/>
</group>
-
- <group name="uom" groups="product.group_uom" string="Unit of Measure">
- <field name="uom_id" on_change="onchange_uom(uom_id,uom_po_id)"/>
- <field name="uom_po_id"/>
- <field name="uos_id"/>
- <field name="uos_coeff"/>
- <field name="mes_type"/>
- </group>
-
<group name="status" string="Status">
<field name="state"/>
<field name="product_manager"/>
</group>
-
</group>
</page>
- <page string="Descriptions" groups="base.group_user">
- <separator string="Description"/>
- <field name="description"/>
- <separator string="Sale Description"/>
- <field name="description_sale" placeholder="This note will be displayed on quotations..."/>
- <separator string="Purchase Description"/>
- <field name="description_purchase" placeholder="This note will be displayed on requests for quotation..."/>
- </page>
- <page groups="product.group_stock_packaging" string="Packaging">
- <field name="packaging">
+ <page string="Sales">
+ <group>
+ <group groups="product.group_uom">
+ <field name="uos_id"/>
+ <field name="uos_coeff"/>
+ <field name="mes_type"/>
+ </group>
+ </group>
+ <field name="packaging" groups="product.group_stock_packaging">
<form string="Packaging" version="7.0">
<group col="4">
<field name="ean"/>
@@ -150,6 +159,8 @@
<field name="name"/>
</form>
</field>
+ <label for="description_sale"/>
+ <field name="description_sale" placeholder="This note will be displayed on quotations..."/>
</page>
</notebook>
</sheet>
@@ -534,7 +545,7 @@
<field name="model">product.packaging</field>
<field name="arch" type="xml">
<tree string="Packaging">
- <field name="sequence" invisible="1"/>
+ <field name="sequence" widget="handle"/>
<field name="ean"/>
<field name="qty"/>
<field name="ul"/>
@@ -606,7 +617,7 @@
<field name="model">product.supplierinfo</field>
<field name="arch" type="xml">
<tree string="Supplier Information">
- <field name="sequence" string="Seq"/>
+ <field name="sequence" widget="handle"/>
<field name="name"/>
<field name="delay"/>
<field name="min_qty"/>
diff --git a/addons/product_expiry/product_expiry_view.xml b/addons/product_expiry/product_expiry_view.xml
index f883ca55fe0..88ea6f365e8 100644
--- a/addons/product_expiry/product_expiry_view.xml
+++ b/addons/product_expiry/product_expiry_view.xml
@@ -21,14 +21,14 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
- <notebook position="inside">
- <page string="Dates">
+ <group name="inventory">
+ <group string="Dates">
<field name="life_time" />
<field name="use_time" />
<field name="removal_time" />
<field name="alert_time" />
- </page>
- </notebook>
+ </group>
+ </group>
</field>
</record>
</data>
diff --git a/addons/product_manufacturer/product_manufacturer_view.xml b/addons/product_manufacturer/product_manufacturer_view.xml
index 5f620747d64..88f528693df 100644
--- a/addons/product_manufacturer/product_manufacturer_view.xml
+++ b/addons/product_manufacturer/product_manufacturer_view.xml
@@ -7,23 +7,21 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
- <notebook position="inside">
- <page string="Manufacturer">
- <group string="Manufacturer">
- <field name="manufacturer" />
- <field name="manufacturer_pname"/>
- <field name="manufacturer_pref"/>
- </group>
- <group string="Attributes">
- <field name="attribute_ids" colspan="4" nolabel="1">
- <tree string="Product Attributes" editable="bottom">
- <field name="name"/>
- <field name="value"/>
- </tree>
- </field>
- </group>
- </page>
- </notebook>
+ <group name="procurement" position="inside">
+ <group string="Manufacturer">
+ <field name="manufacturer" />
+ <field name="manufacturer_pname"/>
+ <field name="manufacturer_pref"/>
+ </group>
+ <group string="Attributes">
+ <field name="attribute_ids" colspan="4" nolabel="1">
+ <tree string="Product Attributes" editable="bottom">
+ <field name="name"/>
+ <field name="value"/>
+ </tree>
+ </field>
+ </group>
+ </group>
</field>
</record>
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index f513e2a60e8..2dee145145b 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -562,11 +562,10 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
- <xpath expr="//page[@string='Descriptions']" position="before">
- <page string="Suppliers" groups="base.group_user">
- <field name="seller_ids" context="{'uom_id': uom_id}"/>
- </page>
- </xpath>
+ <group name="procurement" position="after">
+ <label for="seller_ids"/>
+ <field name="seller_ids" context="{'uom_id': uom_id}"/>
+ </group>
</field>
</record>
</data>
diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml
index a1b270934e2..d4e8e3e20a9 100644
--- a/addons/purchase_requisition/purchase_requisition_view.xml
+++ b/addons/purchase_requisition/purchase_requisition_view.xml
@@ -183,9 +183,7 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="procure_method" position="before">
- <group colspan="2" col="2" attrs="{'invisible': [('supply_method','&lt;&gt;','buy')]}">
<field name="purchase_requisition"/>
- </group>
</field>
</field>
</record>
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index 477c458da02..d146d5fa0fb 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -50,38 +50,33 @@
</page>
</field>
</record>
-
+
<record id="view_normal_procurement_locations_form" model="ir.ui.view">
<field name="name">product.normal.procurement.locations.inherit</field>
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
- <notebook position="inside">
- <page string="Procurement &amp; Locations" groups="base.group_user">
- <group>
- <group name="delay" string="Delays">
- <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',0)]}"/>
- <field name="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
- <field name="warranty"/>
- </group>
- <group name="store" string="Storage Localisation">
- <field name="loc_rack" attrs="{'readonly':[('type','=','service')]}"/>
- <field name="loc_row" attrs="{'readonly':[('type','=','service')]}"/>
- <field name="loc_case" attrs="{'readonly':[('type','=','service')]}"/>
- </group>
- <group name="store" groups="stock.group_locations">
- <separator string="Counter-Part Locations Properties" colspan="2"/>
- <field name="property_stock_procurement" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','procurement')]"/>
- <field name="property_stock_production" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','production')]"/>
- <field name="property_stock_inventory" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','inventory')]"/>
- </group>
- <group name="misc" string="Miscellaneous">
- <field name="active"/>
- <field name="company_id" groups="base.group_multi_company" widget="selection"/>
- </group>
- </group>
- </page>
- </notebook>
+ <group name="procurement" position="inside">
+ <group name="delay" string="Delays">
+ <field name="sale_delay" attrs="{'readonly':[('sale_ok','=',0)]}"/>
+ <field name="produce_delay" attrs="{'invisible':[('type','=','service')]}"/>
+ <field name="warranty"/>
+ </group>
+ <group name="store" string="Storage Localisation">
+ <field name="loc_rack" attrs="{'readonly':[('type','=','service')]}"/>
+ <field name="loc_row" attrs="{'readonly':[('type','=','service')]}"/>
+ <field name="loc_case" attrs="{'readonly':[('type','=','service')]}"/>
+ </group>
+ <group name="store" groups="stock.group_locations" string="Counter-Part Locations Properties">
+ <field name="property_stock_procurement" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','procurement')]"/>
+ <field name="property_stock_production" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','production')]"/>
+ <field name="property_stock_inventory" attrs="{'readonly':[('type','=','service')]}" domain="[('usage','=','inventory')]"/>
+ </group>
+ <group name="misc" string="Miscellaneous">
+ <field name="active"/>
+ <field name="company_id" groups="base.group_multi_company" widget="selection"/>
+ </group>
+ </group>
</field>
</record>
@@ -93,8 +88,8 @@
<field name="standard_price" position="replace" version="7.0">
<label string="Cost Price" for="standard_price" align="1.0" groups="base.group_user"/>
<div groups="base.group_user">
- <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/> -
- <button name="%(action_view_change_standard_price)d" string="update"
+ <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/>
+ <button name="%(action_view_change_standard_price)d" string="- update"
type="action" attrs="{'invisible':[('cost_method','&lt;&gt;','average')]}"
class="oe_link"/>
</div>
@@ -132,19 +127,17 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<group name="status" position="before" version="7.0">
- <group string="Stock and Expected Variations" attrs="{'invisible': [('type', '=', 'service')]}">
+ <group string="Stock and Expected Variations" attrs="{'invisible': [('type', '=', 'service')]}" groups="base.group_user">
<label for="qty_available"/>
<div>
<field name="qty_available" class="oe_inline"/>
<button name="%(action_view_change_product_quantity)d" string="update"
- type="action" groups="stock.group_stock_manager,stock.group_stock_user"
+ type="action"
class="oe_link"/>
</div>
- <label for="virtual_available" groups="base.group_user"/>
- <div groups="base.group_user">
- <field name="virtual_available" class="oe_inline"/>
- (+<field name="incoming_qty" class="oe_inline"/> -<field name="outgoing_qty" class="oe_inline"/>)
- </div>
+ <field name="incoming_qty" class="oe_inline"/>
+ <field name="outgoing_qty" class="oe_inline"/>
+ <field name="virtual_available" class="oe_inline"/>
</group>
<group name="lot" groups="stock.group_tracking_lot,stock.group_production_lot" string="Lots">
<field name="track_production" groups="stock.group_production_lot"/>
diff --git a/addons/stock_location/stock_location_view.xml b/addons/stock_location/stock_location_view.xml
index 720c7753df6..ddb2efc21e5 100644
--- a/addons/stock_location/stock_location_view.xml
+++ b/addons/stock_location/stock_location_view.xml
@@ -38,62 +38,59 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
- <notebook position="inside">
- <page string="Logistics Flows">
- <field name="flow_pull_ids" colspan="4" nolabel="1">
- <tree string="Pulled flows">
- <field name="name"/>
- <field name="location_id" attrs="{'required': [('type_proc', '=', 'move')]}"/>
- <field name="type_proc"/>
- <field name="journal_id"/>
- <field name="company_id" groups="base.group_multi_company"/>
- </tree>
- <form string="Pulled Paths">
- <group>
- <group string="Conditions">
- <field name="name" placeholder="Fulfill needs on location X from location Y "/>
- <field name="location_id"/>
- </group>
- <group string="Action Type">
- <field name="type_proc"/>
- <field name="company_id"/>
- </group>
+ <group name="inventory" position="after">
+ <field name="flow_pull_ids" colspan="4" nolabel="1">
+ <tree string="Pulled flows">
+ <field name="name"/>
+ <field name="location_id" attrs="{'required': [('type_proc', '=', 'move')]}"/>
+ <field name="type_proc"/>
+ <field name="journal_id"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ <form string="Pulled Paths">
+ <group>
+ <group string="Conditions">
+ <field name="name" placeholder="Fulfill needs on location X from location Y "/>
+ <field name="location_id"/>
</group>
- <group attrs="{'invisible':[('type_proc','!=','move')]}">
- <field name="location_src_id" attrs="{'required': [('type_proc', '=', 'move')]}"/>
- <field name="picking_type"/>
- <field name="partner_address_id"/>
- <field name="procure_method"/>
- <field name="cancel_cascade"/>
- <field name="invoice_state"/>
- <field name="journal_id"/>
+ <group string="Action Type">
+ <field name="type_proc"/>
+ <field name="company_id"/>
</group>
- </form>
- </field>
- <field name="path_ids">
- <field name="name"/>
- <tree string="Pushed flows">
- <field name="location_from_id"/>
- <field name="location_dest_id"/>
- <field name="auto"/>
- <field name="name"/>
- <field name="invoice_state"/>
- <field name="company_id" groups="base.group_multi_company"/>
- </tree>
- <form string="Pushed flows">
- <field name="name" placeholder="When receiving at location X, move to location Y"/>
- <field name="location_from_id"/>
- <field name="location_dest_id"/>
- <field name="auto"/>
- <field name="delay"/>
- <field name="journal_id"/>
+ </group>
+ <group attrs="{'invisible':[('type_proc','!=','move')]}">
+ <field name="location_src_id" attrs="{'required': [('type_proc', '=', 'move')]}"/>
<field name="picking_type"/>
+ <field name="partner_address_id"/>
+ <field name="procure_method"/>
+ <field name="cancel_cascade"/>
<field name="invoice_state"/>
- <field name="company_id" groups="base.group_multi_company"/>
- </form>
- </field>
- </page>
- </notebook>
+ <field name="journal_id"/>
+ </group>
+ </form>
+ </field>
+ <field name="path_ids">
+ <tree string="Pushed flows">
+ <field name="location_from_id"/>
+ <field name="location_dest_id"/>
+ <field name="auto"/>
+ <field name="name"/>
+ <field name="invoice_state"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </tree>
+ <form string="Pushed flows">
+ <field name="name" placeholder="When receiving at location X, move to location Y"/>
+ <field name="location_from_id"/>
+ <field name="location_dest_id"/>
+ <field name="auto"/>
+ <field name="delay"/>
+ <field name="journal_id"/>
+ <field name="picking_type"/>
+ <field name="invoice_state"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ </form>
+ </field>
+ </group>
</field>
</record>
</data>
diff --git a/addons/warning/warning_view.xml b/addons/warning/warning_view.xml
index 3f3bbefdbab..fd12ce53ac9 100644
--- a/addons/warning/warning_view.xml
+++ b/addons/warning/warning_view.xml
@@ -45,16 +45,14 @@
<field name="arch" type="xml">
<notebook position="inside">
<page string="Warnings">
- <group colspan="2" col="2">
- <separator string="Warning when Selling this Product" colspan="4"/>
- <field name="sale_line_warn" nolabel="1" />
- <field name="sale_line_warn_msg" colspan="3" nolabel="1"
+ <group string="Warning when Selling this Product">
+ <field name="sale_line_warn"/>
+ <field name="sale_line_warn_msg"
attrs="{'required':[('sale_line_warn','!=','no-message')],'readonly':[('sale_line_warn','=','no-message')]}"/>
</group>
- <group colspan="2" col="2">
- <separator string="Warning when Purchasing this Product" colspan="4" />
- <field name="purchase_line_warn" nolabel="1" />
- <field name="purchase_line_warn_msg" colspan="3" nolabel="1"
+ <group string="Warning when Purchasing this Product">
+ <field name="purchase_line_warn"/>
+ <field name="purchase_line_warn_msg"
attrs="{'required':[('purchase_line_warn','!=','no-message')],'readonly':[('purchase_line_warn','=','no-message')]}"/>
</group>
</page>