From 75c07062f9521c3cded53b5aae7290f7b1f6cf52 Mon Sep 17 00:00:00 2001 From: "DBR (OpenERP)" Date: Fri, 27 Apr 2012 18:00:09 +0530 Subject: [PATCH] [IMP]sale, crm, stock: set link as a string and brackets at end for product kanaban view bzr revid: dbr@tinyerp.com-20120427123009-cy4jbia0chiljvjj --- addons/crm/res_partner_view.xml | 11 +++++------ addons/sale/res_partner_view.xml | 5 ++--- addons/stock/product.py | 6 ++++-- addons/stock/product_view.xml | 22 ++++++++-------------- 4 files changed, 19 insertions(+), 25 deletions(-) diff --git a/addons/crm/res_partner_view.xml b/addons/crm/res_partner_view.xml index eb455b41abe..d041d54cdfa 100644 --- a/addons/crm/res_partner_view.xml +++ b/addons/crm/res_partner_view.xml @@ -58,14 +58,13 @@ - Opportunity - Opportunities - () + Opportunity() + Opportunities() - Meeting - Meetings - () + Meeting() + Meetings() + diff --git a/addons/sale/res_partner_view.xml b/addons/sale/res_partner_view.xml index b8e94c67271..4e4605ecbfb 100644 --- a/addons/sale/res_partner_view.xml +++ b/addons/sale/res_partner_view.xml @@ -13,9 +13,8 @@ - Quotation - Quotations - () + Quotation() + Quotations() diff --git a/addons/stock/product.py b/addons/stock/product.py index 37d26e3d23f..fed6666e354 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -26,7 +26,7 @@ import decimal_precision as dp class product_product(osv.osv): _inherit = "product.product" - def _get_reception(self, cr, uid, ids, field_name, arg, context=None): + def _total_reception(self, cr, uid, ids, field_name, arg, context=None): total_reception={} reception_pool=self.pool.get('stock.picking') for id in ids: @@ -347,7 +347,7 @@ class product_product(osv.osv): return res _columns = { - 'total_reception': fields.function(_get_reception , type='integer',string="Total Reception"), + 'total_reception': fields.function(_total_reception , type='integer',string="Total Reception"), 'total_delivery': fields.function(_total_delivery , type='integer',string="Total Delivery"), 'qty_available': fields.function(_product_available, multi='qty_available', type='float', digits_compute=dp.get_precision('Product UoM'), @@ -420,6 +420,8 @@ class product_product(osv.osv): _defaults = { 'valuation': 'manual_periodic', + 'total_reception': 0, + 'total_delivery': 0, } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): diff --git a/addons/stock/product_view.xml b/addons/stock/product_view.xml index e5d070507e7..6bead678640 100644 --- a/addons/stock/product_view.xml +++ b/addons/stock/product_view.xml @@ -152,20 +152,14 @@
  • Price:
  • Cost:
  • - - - () - Reception - Receptions - - - - - () - Delivery - Deliveries - - + + Reception() + Receptions() + + + Delivery() + Deliveries() +