[MERGE] addons9 + usability improvements (product form view, quotation report)

bzr revid: qdp-launchpad@openerp.com-20120926122435-35ag0m4s0mteki28
This commit is contained in:
Quentin (OpenERP) 2012-09-26 14:24:35 +02:00
commit fceb8556df
7 changed files with 28 additions and 17 deletions

View File

@ -6,7 +6,7 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view" />
<field name="arch" type="xml">
<field name="purchase_ok" position="after">
<field name="purchase_ok" position="before">
<field name="event_ok" on_change="onchange_event_ok(event_ok, context)"/>
<label for="event_ok"/>
</field>

View File

@ -195,8 +195,11 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<field name="purchase_ok" position="after">
<field name="hr_expense_ok" on_change="on_change_hr_expense_ok(hr_expense_ok)"/>
<field name="purchase_ok" position="before">
<div>
<field name="hr_expense_ok" on_change="on_change_hr_expense_ok(hr_expense_ok)"/>
<label for="hr_expense_ok"/>
</div>
</field>
</field>
</record>

View File

@ -743,6 +743,14 @@ class product_product(osv.osv):
else:
return super(product_product, self).copy(cr, uid, id, default=default,
context=context)
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
if context is None:
context = {}
if context and context.get('search_default_categ_id', False):
args.append((('categ_id', 'child_of', context['search_default_categ_id'])))
return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=False)
product_product()
class product_packaging(osv.osv):

View File

@ -7,7 +7,11 @@
<record id="product_category_all" model="product.category">
<field name="name">All products</field>
</record>
<record id="product_category_1" model="product.category">
<field name="parent_id" ref="product_category_all"/>
<field name="name">Saleable</field>
</record>
<record id="product_uom_categ_unit" model="product.uom.categ">
<field name="name">Unit</field>
</record>

View File

@ -9,11 +9,7 @@
<!--
Resource: product.category
-->
<record id="product_category_1" model="product.category">
<field name="parent_id" ref="product.product_category_all"/>
<field name="name">Saleable</field>
</record>
<record id="product_category_2" model="product.category">
<field name="parent_id" ref="product.product_category_all"/>
<field name="name">Internal</field>
@ -23,27 +19,27 @@
<field name="name">Other Products</field>
</record>
<record id="product_category_4" model="product.category">
<field name="parent_id" ref="product_category_1"/>
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">Computers</field>
</record>
<record id="product_category_5" model="product.category">
<field name="parent_id" ref="product_category_1"/>
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">Services</field>
</record>
<record id="product_category_6" model="product.category">
<field name="parent_id" ref="product_category_1"/>
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">External Devices</field>
</record>
<record id="product_category_7" model="product.category">
<field name="parent_id" ref="product_category_1"/>
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">Accessories</field>
</record>
<record id="product_category_8" model="product.category">
<field name="parent_id" ref="product_category_1"/>
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">Components</field>
</record>
<record id="product_category_9" model="product.category">
<field name="parent_id" ref="product_category_1"/>
<field name="parent_id" ref="product.product_category_1"/>
<field name="name">Softwares</field>
</record>
<record id="product_category_10" model="product.category">

View File

@ -2,7 +2,7 @@
<document filename="Request for Quotation.pdf">
<template title="Request for Quotation" author="OpenERP S.A.(sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="23.0" y1="43.0" width="530" height="799"/>
<frame id="first" x1="18.0" y1="42.0" width="535" height="758"/>
</pageTemplate>
</template>
<stylesheet>

View File

@ -46,7 +46,7 @@ class stock_config_settings(osv.osv_memory):
manage product manufacturing chains, manage default locations per product,
define routes within your warehouse according to business needs, etc.
This installs the module stock_location."""),
'group_uom': fields.boolean("Manage different units of measure per products",
'group_uom': fields.boolean("Manage different units of measure for products",
implied_group='product.group_uom',
help="""Allows you to select and maintain different units of measure for products."""),
'group_uos': fields.boolean("Invoice products in a different unit of measure than the sale order",