From 05347eac9b8b116a3f844e21ba282180b6a4fa90 Mon Sep 17 00:00:00 2001 From: Mohammad Alhashash Date: Mon, 6 May 2013 22:04:20 +0200 Subject: [PATCH 001/826] Fixing bugs 1177076 and 1177063: Add module name in context view reference Add group stock.group_production_lot for Traceability section in view_move_form bzr revid: alhashash@centrivision.com-20130506200420-ph86vjd3d208ttly --- addons/stock/stock_view.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 83362ab5d6f..5878a578868 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -776,7 +776,7 @@ - + @@ -911,7 +911,7 @@ - +
@@ -1038,7 +1038,7 @@ - +
@@ -1256,7 +1256,7 @@ + groups="stock.group_tracking_lot,stock.group_production_lot"> diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml index 8b941a395dd..9755f938bec 100644 --- a/addons/crm/res_partner_view.xml +++ b/addons/crm/res_partner_view.xml @@ -95,7 +95,7 @@ name="%(crm.crm_case_category_act_oppor11)d" context="{'search_default_partner_id': active_id}"/>
-
    +
    • :
    • From c8877ec1f702ad16ebe821d22dcd3f5c8e1c994f Mon Sep 17 00:00:00 2001 From: Vidhin Mehta Date: Fri, 13 Sep 2013 16:53:31 +0530 Subject: [PATCH 021/826] [IMP]show add/delete/edit icon on the basis of access right. bzr revid: vme@tinyerp.com-20130913112331-hjv2j57d3ou64me4 --- addons/web_kanban/static/src/xml/web_kanban.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/web_kanban/static/src/xml/web_kanban.xml b/addons/web_kanban/static/src/xml/web_kanban.xml index e866894a768..ff489ff2c83 100644 --- a/addons/web_kanban/static/src/xml/web_kanban.xml +++ b/addons/web_kanban/static/src/xml/web_kanban.xml @@ -18,7 +18,7 @@ -
-
    +
    • :
    • From 8acd61c43e7d47f3c83d19aa3c3f1d4fd4547c10 Mon Sep 17 00:00:00 2001 From: Vidhin Mehta Date: Fri, 13 Sep 2013 17:25:54 +0530 Subject: [PATCH 022/826] [ADD]put old code of ima. bzr revid: vme@tinyerp.com-20130913115554-6ij1ns4jke41r3vh --- addons/web_kanban/static/src/xml/web_kanban.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/xml/web_kanban.xml b/addons/web_kanban/static/src/xml/web_kanban.xml index ff489ff2c83..15cd60f79ab 100644 --- a/addons/web_kanban/static/src/xml/web_kanban.xml +++ b/addons/web_kanban/static/src/xml/web_kanban.xml @@ -57,7 +57,7 @@
      -
        +
        • :
        • From 74e054201b05d6486b4165f9983d6bf6bf362d71 Mon Sep 17 00:00:00 2001 From: "Ravi Gohil (OpenERP)" Date: Wed, 18 Sep 2013 14:32:44 +0530 Subject: [PATCH 023/826] [FIX] procurement: User belonging to the company other then the 'Your Company' would not be able to create record for object 'stock.warehouse.orderpoint'(Warehouse/Configuration/Reordering Rules) as it tries to get the default warehouse using xml_id(warehouse0) that does not belong to current user's company : (Maintenance Case : 596679) lp bug: https://launchpad.net/bugs/1212429 fixed bzr revid: rgo@tinyerp.com-20130918090244-edabc3uq6mfmx7vu --- addons/procurement/procurement.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index 8a5b5107319..9879b91e88b 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -547,14 +547,14 @@ class stock_warehouse_orderpoint(osv.osv): ] def default_get(self, cr, uid, fields, context=None): + warehouse_obj = self.pool.get('stock.warehouse') res = super(stock_warehouse_orderpoint, self).default_get(cr, uid, fields, context) # default 'warehouse_id' and 'location_id' if 'warehouse_id' not in res: - warehouse = self.pool.get('ir.model.data').get_object(cr, uid, 'stock', 'warehouse0', context) - res['warehouse_id'] = warehouse.id + warehouse_ids = warehouse_obj.search(cr, uid, [('company_id', '=', res.get('company_id'))], context=context) + res['warehouse_id'] = warehouse_ids and warehouse_ids[0] or False if 'location_id' not in res: - warehouse = self.pool.get('stock.warehouse').browse(cr, uid, res['warehouse_id'], context) - res['location_id'] = warehouse.lot_stock_id.id + res['location_id'] = False if not res.get('warehouse_id') else self.pool.get('stock.warehouse').browse(cr, uid, res['warehouse_id'], context).lot_stock_id.id return res def onchange_warehouse_id(self, cr, uid, ids, warehouse_id, context=None): From 8fdc129f5613bd3ba025afafe5514909fac7c2f4 Mon Sep 17 00:00:00 2001 From: "Darshan Kalola (OpenERP)" Date: Tue, 24 Sep 2013 16:22:03 +0530 Subject: [PATCH 024/826] [IMP]Improve onchange behave with seperate onchange method for use parent address. bzr revid: dka@tinyerp.com-20130924105203-6nq2755rdfscs6kb --- openerp/addons/base/res/res_partner.py | 18 ++++++++++++++---- openerp/addons/base/res/res_partner_view.xml | 9 +++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index 54e61101909..39e070e018b 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -358,11 +358,25 @@ class res_partner(osv.osv, format_address): value = {} value['title'] = False if is_company: + value['use_parent_address'] = False domain = {'title': [('domain', '=', 'partner')]} else: domain = {'title': [('domain', '=', 'contact')]} return {'value': value, 'domain': domain} + def onchange_use_address(self, cr, uid, ids, use_parent_address, parent_id, context=None): + def value_or_id(val): + """ return val or val.id if val is a browse record """ + return val if isinstance(val, (bool, int, long, float, basestring)) else val.id + result = {} + address_fields = self._address_fields(cr, uid, context=context) + if parent_id and use_parent_address: + parent = self.browse(cr, uid, parent_id, context=context) + result['value'] = dict((key, value_or_id(parent[key])) for key in address_fields) + else: + result['value'] = dict((key,"") for key in address_fields) + return result + def onchange_address(self, cr, uid, ids, use_parent_address, parent_id, context=None): def value_or_id(val): """ return val or val.id if val is a browse record """ @@ -381,10 +395,6 @@ class res_partner(osv.osv, format_address): address_fields = self._address_fields(cr, uid, context=context) if use_parent_address: result['value'] = dict((key, value_or_id(parent[key])) for key in address_fields) - else: - result['value'] = dict((key,None) for key in address_fields) - else: - result['value'] = {'use_parent_address': False} return result def onchange_state(self, cr, uid, ids, state_id, context=None): diff --git a/openerp/addons/base/res/res_partner_view.xml b/openerp/addons/base/res/res_partner_view.xml index a032ecfe4db..28d51bd1917 100644 --- a/openerp/addons/base/res/res_partner_view.xml +++ b/openerp/addons/base/res/res_partner_view.xml @@ -140,7 +140,8 @@ + attrs="{'invisible': [('is_company','=', True),('parent_id', '=', False)]}" + on_change="onchange_address(use_parent_address, parent_id)"/>
          @@ -156,9 +157,9 @@