summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2012-08-29 17:54:00 +0200
committerOlivier Dony <odo@openerp.com>2012-08-29 17:54:00 +0200
commitbc74fc920cd159ebcbcee62d0b3e99eaac15641e (patch)
treec4c1d4633be52a442420d27251035321eb5ab801
parentba7aee832d999b940c1139218d6966db660510fe (diff)
parent6e80e425d1626d46c0f48054a5beb339fa1cd557 (diff)
[MERGE] Rebase incorrect top-level merge of `pad/wiki` refactoring + extra merge of product form simplification
To be completed by an extra merge containing the remaining work-in-progress stuff of pad/wiki refactoring. bzr revid: odo@openerp.com-20120829155400-memirrjghutw5pl7
-rw-r--r--addons/account/product_view.xml2
-rw-r--r--addons/event/event_view.xml4
-rw-r--r--addons/event_sale/event_sale_view.xml2
-rw-r--r--addons/hr/hr_view.xml4
-rw-r--r--addons/mail/mail_group_view.xml4
-rw-r--r--addons/mrp/mrp_view.xml12
-rw-r--r--addons/pad/pad.py12
-rw-r--r--addons/pad/res_company.py3
-rw-r--r--addons/pad/static/src/css/etherpad.css53
-rw-r--r--addons/pad/static/src/js/pad.js45
-rw-r--r--addons/pad/static/src/xml/pad.xml22
-rw-r--r--addons/pad_project/project_task.py3
-rw-r--r--addons/point_of_sale/point_of_sale_view.xml2
-rw-r--r--addons/portal_hr_employees/hr_employee_view.xml2
-rw-r--r--addons/portal_project_issue/portal_project_issue_view.xml2
-rw-r--r--addons/procurement/procurement_view.xml2
-rw-r--r--addons/product/product.py2
-rw-r--r--addons/product/product_view.xml27
-rw-r--r--addons/product/security/product_security.xml7
-rw-r--r--addons/project_mrp/project_mrp_view.xml2
-rw-r--r--addons/purchase/purchase_view.xml15
-rw-r--r--addons/purchase/res_config.py3
-rw-r--r--addons/purchase/res_config_view.xml4
-rw-r--r--addons/purchase_requisition/purchase_requisition_view.xml2
-rw-r--r--addons/stock/product_view.xml54
25 files changed, 168 insertions, 122 deletions
diff --git a/addons/account/product_view.xml b/addons/account/product_view.xml
index 659a4f6ac36..5f417825032 100644
--- a/addons/account/product_view.xml
+++ b/addons/account/product_view.xml
@@ -7,7 +7,7 @@
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
<notebook position="inside">
- <page string="Accounting" groups="base.group_user">
+ <page string="Accounting" groups="account.group_account_user">
<group name="properties">
<group>
<field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" attrs="{'readonly':[('sale_ok','=',0)]}"/>
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 27829129c15..dce96e4c3cf 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -244,7 +244,7 @@
<templates>
<t t-name="kanban-box">
<div class="oe_module_vignette">
- <a type="edit" class="oe_module_icon">
+ <a type="open" class="oe_module_icon">
<div class="oe_event_date "><t t-esc="record.date_begin.raw_value.getDate()"/></div>
<div class="oe_event_month_year">
<t t-esc="record.date_begin.raw_value.toString('MMM')"/>
@@ -253,7 +253,7 @@
<div class="oe_event_time"><t t-esc="record.date_begin.raw_value.toString('hh:mm tt')"/></div>
</a>
<div class="oe_module_desc">
- <h4><a type="edit"><field name="name"/></a></h4>
+ <h4><a type="open"><field name="name"/></a></h4>
<p>
<t t-if="record.country_id.raw_value">@<field name="country_id"/><br/></t>
<t t-if="record.user_id.raw_value">Organized by <field name="user_id"/><br/></t>
diff --git a/addons/event_sale/event_sale_view.xml b/addons/event_sale/event_sale_view.xml
index 82c1c05b714..53e8a4cc18f 100644
--- a/addons/event_sale/event_sale_view.xml
+++ b/addons/event_sale/event_sale_view.xml
@@ -9,7 +9,7 @@
<field name="purchase_ok" position="after">
<field name="event_ok" on_change="onchange_event_ok(event_ok, context)"/>
</field>
- <field name='supply_method' position='after'>
+ <field name='procure_method' position='before'>
<field name="event_type_id" attrs="{'readonly': [('event_ok', '=', False)]}"/>
</field>
</field>
diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml
index 0dcc675e665..99d7af027e9 100644
--- a/addons/hr/hr_view.xml
+++ b/addons/hr/hr_view.xml
@@ -130,11 +130,11 @@
<t t-name="kanban-box">
<div class="oe_employee_vignette">
<div class="oe_employee_image">
- <a type="edit"><img t-att-src="kanban_image('hr.employee', 'image_medium', record.id.value)" class="oe_employee_picture"/></a>
+ <a type="open"><img t-att-src="kanban_image('hr.employee', 'image_medium', record.id.value)" class="oe_employee_picture"/></a>
</div>
<div class="oe_employee_details">
<h4>
- <a type="edit"><field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t></a>
+ <a type="open"><field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t></a>
</h4>
<ul>
<li id="last_login">
diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml
index a71ec972326..d21d32a3893 100644
--- a/addons/mail/mail_group_view.xml
+++ b/addons/mail/mail_group_view.xml
@@ -25,10 +25,10 @@
<t t-name="kanban-box">
<div t-attf-class="{record.message_is_follower.raw_value} oe_group_vignette">
<div class="oe_group_image">
- <a type="edit"><img t-att-src="kanban_image('mail.group', 'image_medium', record.id.value)" class="oe_group_photo" tooltip="kanban-description"/></a>
+ <a type="open"><img t-att-src="kanban_image('mail.group', 'image_medium', record.id.value)" class="oe_group_photo" tooltip="kanban-description"/></a>
</div>
<div class="oe_group_details">
- <h4><a type="edit"><field name="name"/></a></h4>
+ <h4><a type="open"><field name="name"/></a></h4>
<ul>
<!-- <li><field name="message_follower_count"/> member(s)</li> -->
<li>
diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml
index c394544574d..9cb3d8dbfa2 100644
--- a/addons/mrp/mrp_view.xml
+++ b/addons/mrp/mrp_view.xml
@@ -981,11 +981,21 @@
</data>
</field>
</record>
+ <record id="product_normal_form_supply_view" model="ir.ui.view">
+ <field name="name">product.normal.form.mrp.inherit</field>
+ <field name="model">product.product</field>
+ <field name="inherit_id" ref="product.product_normal_form_view"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='procure_method']" position="after">
+ <field name="supply_method" groups="base.group_user"/>
+ </xpath>
+ </field>
+ </record>
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">product.normal.form.mrp.inherit</field>
<field name="model">product.product</field>
- <field name="inherit_id" ref="product.product_normal_form_view"/>
+ <field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
<field name="arch" type="xml">
<page string="Procurement &amp; Locations" position="inside">
<separator string="Bill of Materials"/>
diff --git a/addons/pad/pad.py b/addons/pad/pad.py
index 40569fcd589..3431e196b59 100644
--- a/addons/pad/pad.py
+++ b/addons/pad/pad.py
@@ -8,6 +8,11 @@ from tools.translate import _
class pad_common(osv.osv_memory):
_name = 'pad.common'
_pad_fields = []
+
+ def pad_content(self, cr, uid, url ,context=None):
+ content = urllib2.urlopen('%s/export/html'%url).read()
+ return content
+
def pad_generate_url(self, cr, uid, context=None):
pad_url_template = self.pool.get('res.users').browse(cr,uid, uid, context).company_id.pad_url_template
s = string.ascii_uppercase + string.digits
@@ -20,6 +25,13 @@ class pad_common(osv.osv_memory):
url = pad_url_template % template_vars
return url
+ # TODO
+ # add attribute on columns pad_content_field =
+ # override default write to load the content at write and store it in the field
+ # reverse engineer protocol to be setHtml without using the api key
+ # override default get to generate urls
+ # override read to generate url and store the content if empty
+
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default = {}
diff --git a/addons/pad/res_company.py b/addons/pad/res_company.py
index bd955cd0481..703e655219b 100644
--- a/addons/pad/res_company.py
+++ b/addons/pad/res_company.py
@@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
from osv import fields, osv
-DEFAULT_PAD_TEMPLATE = 'http://beta.etherpad.org/p/%(db)s-%(model)s-%(salt)s'
+DEFAULT_PAD_TEMPLATE = 'http://pad.openerp.com/p/%(db)s-%(model)s-%(salt)s'
+DEFAULT_PAD_TEMPLATE = ''
class company_pad(osv.osv):
_inherit = 'res.company'
diff --git a/addons/pad/static/src/css/etherpad.css b/addons/pad/static/src/css/etherpad.css
index a0240afcab7..8ea7972071e 100644
--- a/addons/pad/static/src/css/etherpad.css
+++ b/addons/pad/static/src/css/etherpad.css
@@ -1,52 +1,39 @@
-.oe_etherpad_head{
+.oe_pad_head {
width: 100%;
display: block;
- padding-left:3px;
- cursor:pointer;
+ padding: 4px;
}
-.oe_etherpad_fullscreen div.oe_etherpad_head .oe_normal {
- display: none;
-}
-.oe_etherpad_normal div.oe_etherpad_head .oe_fullscreen {
- display: none;
+
+.oe_pad_readonly {
+ border: 1px solid #ddd;
+ padding: 8px;
}
-.oe_etherpad_fullscreen {
+
+.oe_pad_fullscreen {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: white;
- z-index:10001 !important;
-}
-.etherpad_default{
- width: 100%;
- height: 450px;
-}
-.oe_etherpad_fullscreen .etherpad_default{
- height: 100%
+ z-index: 1000;
}
-.etherpad_body{
- overflow:hidden;
+.oe_pad_fullscreen .oe_pad_content {
+ height: 100%;
}
-.etherpad_readonly{
- width: 100%;
- height: 450px;
- overflow:auto;
-}
-.etherpad_readonly ul,.etherpad_readonly ol{
- -webkit-margin-before: 1em;
- -webkit-margin-after: 1em;
- -webkit-margin-start: 0px;
- -webkit-margin-end: 0px;
- -webkit-padding-start: 40px !important;
-}
-.etherpad_readonly ul li{
+.etherpad_readonly ul, .etherpad_readonly ol {
+ margin-before: 1em;
+ margin-after: 1em;
+ margin-start: 0px;
+ margin-end: 0px;
+ padding-start: 40px !important;
+}
+.etherpad_readonly ul li{
list-style-type: disc;
}
-.etherpad_readonly ol li{
+.etherpad_readonly ol li{
list-style-type: decimal;
}
.etherpad_readonly .indent li{
diff --git a/addons/pad/static/src/js/pad.js b/addons/pad/static/src/js/pad.js
index df182650afe..a295e860a51 100644
--- a/addons/pad/static/src/js/pad.js
+++ b/addons/pad/static/src/js/pad.js
@@ -1,32 +1,47 @@
openerp.pad = function(instance) {
-instance.web.form.FieldPad = instance.web.form.AbstractField.extend(instance.web.form.ReinitializeFieldMixin, {
+instance.web.form.FieldPad = instance.web.form.AbstractField.extend({
template: 'FieldPad',
- initialize_content: function() {
+ start: function() {
+ this._super();
var self = this;
- this.$textarea = undefined;
- this.$el.find('div.oe_etherpad_head').click(function(ev) {
- self.$el.toggleClass('oe_etherpad_fullscreen').toggleClass('oe_etherpad_normal');
+ this.$el.find('div.oe_pad_head').click(function(ev) {
+ self.$el.toggleClass('oe_pad_fullscreen');
+ });
+ this.on("change:effective_readonly", this, function() {
+ this.render_value();
});
},
- set_value: function(value_) {
- this._super(value_);
- this.render_value();
+ set_value: function(val) {
+ var self = this;
+ var _super = self._super;
+ _super.apply(self,[val]);
+ if (val === false || val === "") {
+ self.field_manager.dataset.call('pad_generate_url').then(function(r) {
+ _super.apply(self,[r]);
+ self.render_value();
+ });
+ } else {
+ self.render_value();
+ }
},
render_value: function() {
+ console.log("display");
var self = this;
var value = this.get('value');
- if(value !== false) {
- var url = value.split('\n')[0];
+
+ if (!_.str.startsWith(value, "http")) {
+ self.$('.oe_pad_content').html(instance.web.qweb.render('FieldPad.unconfigured'));
+ } else {
if (!this.get("effective_readonly")) {
var pad_username = this.session.username;
- var code = '<iframe width="100%" height="100%" frameborder="0" src="'+url+'?showChat=false&userName='+pad_username+'"></iframe>';
- this.$el.find('div.oe_etherpad_default').html(code);
+ var code = '<iframe width="100%" height="100%" frameborder="0" src="'+value+'?showChat=false&userName='+pad_username+'"></iframe>';
+ this.$('.oe_pad_content').html(code);
} else {
- $.get(url+'/export/html').success(function(data) {
- self.$el.html('<div class="etherpad_readonly">'+data+'</div>');
+ $.get(value+'/export/html').success(function(data) {
+ self.$('.oe_pad_content').html('<div class="oe_pad_readonly">'+data+'</div>');
}).error(function() {
- self.$el.text('Unable to load pad');
+ self.$('.oe_pad_content').text('Unable to load pad');
});
}
}
diff --git a/addons/pad/static/src/xml/pad.xml b/addons/pad/static/src/xml/pad.xml
index e128fb183fb..58266a2594a 100644
--- a/addons/pad/static/src/xml/pad.xml
+++ b/addons/pad/static/src/xml/pad.xml
@@ -2,17 +2,19 @@
<!-- vim:fdl=1:
-->
<templates id="template" xml:space="preserve">
-
<t t-name="FieldPad">
- <t t-if="!widget.get('effective_readonly')">
- <div class="oe_form_field_text oe_etherpad_normal">
- <div class="oe_etherpad_head">
- <span class="oe_normal">Fullscreen</span>
- <span class="oe_fullscreen">Return to Record</span>
- </div>
- <div class="oe_etherpad_default" ></div>
+ <div class="oe_form_field_text oe_pad">
+ <div class="oe_pad_head">
+ <span class="oe_pad_switch">Fullscreen</span>
</div>
- </t>
+ <div class="oe_pad_content"></div>
+ </div>
+</t>
+<t t-name="FieldPad.unconfigured">
+ Please configure your etherpad server.<br/>
+ OpenERP Entreprise customers may safely use pad.openerp.com as a server using the following template:<br/>
+ <blockquote>
+ http://pad.openerp.com/p/%(db)s-%(model)s-%(salt)s
+ </blockquote>
</t>
-
</templates>
diff --git a/addons/pad_project/project_task.py b/addons/pad_project/project_task.py
index 46c2c54cd46..513fc3fef5d 100644
--- a/addons/pad_project/project_task.py
+++ b/addons/pad_project/project_task.py
@@ -9,6 +9,3 @@ class task(osv.osv):
_columns = {
'description_pad': fields.char('Description PAD', size=250)
}
- _defaults = {
- 'description_pad': lambda self, cr, uid, context: self.pad_generate_url(cr, uid, context),
- }
diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml
index dce19ab77b6..0f8e5e57e5f 100644
--- a/addons/point_of_sale/point_of_sale_view.xml
+++ b/addons/point_of_sale/point_of_sale_view.xml
@@ -625,7 +625,7 @@
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">product.normal.form.inherit</field>
<field name="model">product.product</field>
- <field name="inherit_id" ref="product.product_normal_form_view"/>
+ <field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
<field name="arch" type="xml">
<group name="misc" position="after">
<group name="pos" colspan="2" col="2">
diff --git a/addons/portal_hr_employees/hr_employee_view.xml b/addons/portal_hr_employees/hr_employee_view.xml
index f36e2a4d2d8..dc1b1bae56c 100644
--- a/addons/portal_hr_employees/hr_employee_view.xml
+++ b/addons/portal_hr_employees/hr_employee_view.xml
@@ -38,7 +38,7 @@
</div>
<div class="oe_employee_details">
<h4>
- <a type="edit"><field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t></a>
+ <a type="open"><field name="name"/><t t-if="record.login.raw_value"> (<field name="login"/>)</t></a>
</h4>
<ul>
<li t-if="record.job_id.raw_value"><field name="job_id"/></li>
diff --git a/addons/portal_project_issue/portal_project_issue_view.xml b/addons/portal_project_issue/portal_project_issue_view.xml
index 14e944ab32e..5d0b4ce081e 100644
--- a/addons/portal_project_issue/portal_project_issue_view.xml
+++ b/addons/portal_project_issue/portal_project_issue_view.xml
@@ -18,7 +18,7 @@
<div class="oe_kanban_card oe_kanban_global_click">
<div class="oe_kanban_content">
<div>
- <h1><a type="edit"><field name="name"/></a></h1>
+ <h1><a type="open"><field name="name"/></a></h1>
<field name="partner_id"/> <br/>
<field name="version_id"/>
</div>
diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml
index dbdc65c6763..f2a8dc98cb0 100644
--- a/addons/procurement/procurement_view.xml
+++ b/addons/procurement/procurement_view.xml
@@ -286,7 +286,7 @@
<record id="product_normal_form_view" model="ir.ui.view">
<field name="name">product.normal.form.orderpoint.inherit</field>
<field name="model">product.product</field>
- <field name="inherit_id" ref="product.product_normal_form_view"/>
+ <field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
<field name="arch" type="xml">
<page string="Procurement &amp; Locations" position="inside">
<separator string="Minimum Stock Rules"/>
diff --git a/addons/product/product.py b/addons/product/product.py
index aa1bc3954a0..214445204bb 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -541,7 +541,7 @@ class product_product(osv.osv):
'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"),
- 'ean13': fields.char('EAN13', size=13, help="The numbers encoded in EAN-13 bar codes are product identification numbers."),
+ 'ean13': fields.char('EAN13 Barcode', size=13, help="The numbers encoded in EAN-13 bar codes are product identification numbers."),
'packaging' : fields.one2many('product.packaging', 'product_id', 'Logistical Units', help="Gives the different ways to package the same product. This has no impact on the picking order and is mainly used if you use the EDI module."),
'price_extra': fields.float('Variant Price Extra', digits_compute=dp.get_precision('Product Price')),
'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Product Price')),
diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml
index 70651a0a795..17b4a7ecc68 100644
--- a/addons/product/product_view.xml
+++ b/addons/product/product_view.xml
@@ -86,12 +86,11 @@
</group>
<group string="Procurement">
<field name="type"/>
- <field name="procure_method" groups="base.group_user"/>
- <field name="supply_method" groups="base.group_user"/>
+ <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="base.group_user"/>
+ <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"/>
@@ -118,28 +117,6 @@
</group>
</page>
- <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="misc" string="Miscellaneous">
- <field name="active"/>
- <field name="company_id" groups="base.group_multi_company" widget="selection"/>
- </group>
- </group>
-
- </page>
- <page string="Suppliers" groups="base.group_user">
- <field name="seller_ids" context="{'uom_id': uom_id}"/>
- </page>
<page string="Descriptions" groups="base.group_user">
<separator string="Description"/>
<field name="description"/>
diff --git a/addons/product/security/product_security.xml b/addons/product/security/product_security.xml
index 1d2c795083a..73ab6f8a3d5 100644
--- a/addons/product/security/product_security.xml
+++ b/addons/product/security/product_security.xml
@@ -23,7 +23,12 @@
<field name="name">Purchase Pricelists</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
-
+
+ <record id="group_costing_method" model="res.groups">
+ <field name="name">Costing Method</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
<record id="group_uom" model="res.groups">
<field name="name">Manage Multiple Units of Measure</field>
<field name="category_id" ref="base.module_category_hidden"/>
diff --git a/addons/project_mrp/project_mrp_view.xml b/addons/project_mrp/project_mrp_view.xml
index ffceb33a611..841a61e6c31 100644
--- a/addons/project_mrp/project_mrp_view.xml
+++ b/addons/project_mrp/project_mrp_view.xml
@@ -14,7 +14,7 @@
<record id="view_product_task_form" model="ir.ui.view">
<field name="name">product.form.view.inherit</field>
<field name="model">product.product</field>
- <field name="inherit_id" ref="product.product_normal_form_view"/>
+ <field name="inherit_id" ref="stock.view_normal_procurement_locations_form"/>
<field name="arch" type="xml">
<field name="active" position="after">
<field name="project_id" attrs="{'readonly':[('type','!=','service')]}" />
diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml
index aec55bf93c2..f513e2a60e8 100644
--- a/addons/purchase/purchase_view.xml
+++ b/addons/purchase/purchase_view.xml
@@ -554,5 +554,20 @@
</xpath>
</field>
</record>
+
+ <!-- Product Suppliers-->
+
+ <record id="view_product_supplier_inherit" model="ir.ui.view">
+ <field name="name">product.normal.supplier.form.inherit</field>
+ <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>
+ </field>
+ </record>
</data>
</openerp>
diff --git a/addons/purchase/res_config.py b/addons/purchase/res_config.py
index 6beac5a4cd0..3d9c858cec5 100644
--- a/addons/purchase/res_config.py
+++ b/addons/purchase/res_config.py
@@ -40,6 +40,9 @@ class purchase_config_settings(osv.osv_memory):
'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_costing_method':fields.boolean("compute product cost price based on average cost",
+ implied_group='product.group_costing_method',
+ help="""Allows you to compute product cost price based on average cost."""),
'group_purchase_delivery_address': fields.boolean("allow a different address for incoming products and invoicings",
implied_group='purchase.group_delivery_invoice_address',
help="Allows you to specify different delivery and invoice addresses on a purchase order."),
diff --git a/addons/purchase/res_config_view.xml b/addons/purchase/res_config_view.xml
index 23d89f1a7f1..00e0b6108e8 100644
--- a/addons/purchase/res_config_view.xml
+++ b/addons/purchase/res_config_view.xml
@@ -59,6 +59,10 @@
<field name="group_purchase_delivery_address" class="oe_inline"/>
<label for="group_purchase_delivery_address"/>
</div>
+ <div>
+ <field name="group_costing_method" class="oe_inline"/>
+ <label for="group_costing_method"/>
+ </div>
<div name="module_purchase_double_validation">
<field name="module_purchase_double_validation" class="oe_inline"/>
<label for="module_purchase_double_validation"/>
diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml
index 188f81b6cbe..a1b270934e2 100644
--- a/addons/purchase_requisition/purchase_requisition_view.xml
+++ b/addons/purchase_requisition/purchase_requisition_view.xml
@@ -182,7 +182,7 @@
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml">
- <field name="supply_method" position="after">
+ <field name="procure_method" position="before">
<group colspan="2" col="2" attrs="{'invisible': [('supply_method','&lt;&gt;','buy')]}">
<field name="purchase_requisition"/>
</group>
diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml
index 3264057ae21..477c458da02 100644
--- a/addons/stock/product_view.xml
+++ b/addons/stock/product_view.xml
@@ -50,6 +50,40 @@
</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>
+ </field>
+ </record>
<record id="view_product_standard_price_form" model="ir.ui.view">
<field name="name">product.product.standard.price.form.inherit</field>
@@ -178,10 +212,10 @@
<t t-name="kanban-box">
<div class="oe_product_vignette">
<div class="oe_product_img">
- <a type="edit"><img t-att-src="kanban_image('product.product', 'image_medium', record.id.value)" class="oe_product_photo"/></a>
+ <a type="open"><img t-att-src="kanban_image('product.product', 'image_medium', record.id.value)" class="oe_product_photo"/></a>
</div>
<div class="oe_product_desc">
- <h4><a type="edit"><field name="name"></field></a></h4>
+ <h4><a type="open"><field name="name"></field></a></h4>
<ul>
<li t-if="record.code.raw_value">Code: <field name="code"/></li>
<li t-if="record.type.raw_value != 'service'">Stock on hand: <field name="qty_available"/> <field name="uom_id"/></li>
@@ -210,21 +244,5 @@
</field>
</record>
- <record id="view_normal_property_form" model="ir.ui.view">
- <field name="name">product.normal.stock.property.form.inherit</field>
- <field name="model">product.product</field>
- <field name="inherit_id" ref="product.product_normal_form_view"/>
- <field name="arch" type="xml">
- <group name="store" position="after">
- <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>
- </field>
- </record>
-
</data>
</openerp>