From 0757ae25abdade0f0f354da3975e549a7c78b510 Mon Sep 17 00:00:00 2001 From: sebastien beau Date: Wed, 6 Jul 2011 02:26:24 +0200 Subject: [PATCH 01/49] [REF] refactor the methode make_po in order to make easier the overwritting bzr revid: sebastien.beau@akretion.com.br-20110706002624-8ag88jv5a5i979iy --- addons/purchase/purchase.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 6ec558acc97..1b3d0eeb839 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -761,6 +761,10 @@ class procurement_order(osv.osv): res = res.values() return len(res) and res[0] or 0 #TO CHECK: why workflow is generated error if return not integer value + def create_procurement_purchase_order(self, cr, uid, procurement, po_vals, line, context=None): + po_vals.update({'order_line': [(0,0,line)]}) + return self.pool.get('purchase.order').create(cr, uid, po_vals, context=context) + def make_po(self, cr, uid, ids, context=None): """ Make purchase order from procurement @return: New created Purchase Orders procurement wise @@ -774,7 +778,6 @@ class procurement_order(osv.osv): pricelist_obj = self.pool.get('product.pricelist') prod_obj = self.pool.get('product.product') acc_pos_obj = self.pool.get('account.fiscal.position') - po_obj = self.pool.get('purchase.order') for procurement in self.browse(cr, uid, ids, context=context): res_id = procurement.move_id.id partner = procurement.product_id.seller_id # Taken Main Supplier of Product of Procurement. @@ -799,6 +802,8 @@ class procurement_order(osv.osv): context.update({'lang': partner.lang, 'partner_id': partner_id}) product = prod_obj.browse(cr, uid, procurement.product_id.id, context=context) + taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id + taxes = acc_pos_obj.map_tax(cr, uid, partner.property_account_position, taxes_ids) line = { 'name': product.partner_ref, @@ -809,25 +814,20 @@ class procurement_order(osv.osv): 'date_planned': newdate.strftime('%Y-%m-%d %H:%M:%S'), 'move_dest_id': res_id, 'notes': product.description_purchase, + 'taxes_id': [(6,0,taxes)], } - - taxes_ids = procurement.product_id.product_tmpl_id.supplier_taxes_id - taxes = acc_pos_obj.map_tax(cr, uid, partner.property_account_position, taxes_ids) - line.update({ - 'taxes_id': [(6,0,taxes)] - }) - purchase_id = po_obj.create(cr, uid, { + + po_vals = { 'origin': procurement.origin, 'partner_id': partner_id, 'partner_address_id': address_id, 'location_id': procurement.location_id.id, 'pricelist_id': pricelist_id, - 'order_line': [(0,0,line)], 'company_id': procurement.company_id.id, 'fiscal_position': partner.property_account_position and partner.property_account_position.id or False - }) - res[procurement.id] = purchase_id - self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': purchase_id}) + } + res[procurement.id] = self.create_procurement_purchase_order(cr, uid, procurement, po_vals, line, context=context) + self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': res[procurement.id]}) return res procurement_order() From d852a2a828371f02522677de5f5c2e5e7cde3903 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Mon, 8 Aug 2011 18:38:57 +0530 Subject: [PATCH 02/49] [IMP]account,hr_timesheet_sheet,mrp,pad,point_of_sale,purchase:Improvement is done in company view bzr revid: mma@tinyerp.com-20110808130857-fyxra4gte3nsp60u --- addons/account/company.py | 6 +++--- .../hr_timesheet_sheet/hr_timesheet_sheet_view.xml | 13 ++++++++----- addons/mrp/company_view.xml | 6 +++--- addons/pad/company_pad.xml | 9 ++++++--- addons/point_of_sale/point_of_sale_view.xml | 13 ++++++++----- addons/procurement/company_view.xml | 10 +++++----- addons/project/project_view.xml | 9 ++++++--- addons/purchase/company_view.xml | 6 +++--- addons/sale/company_view.xml | 6 +++--- 9 files changed, 45 insertions(+), 33 deletions(-) diff --git a/addons/account/company.py b/addons/account/company.py index c7836e0128b..82a60beb461 100644 --- a/addons/account/company.py +++ b/addons/account/company.py @@ -36,9 +36,9 @@ class res_company(osv.osv): } _defaults = { - 'overdue_msg': 'Please note that the following payments are now due. If your payment \ - has been sent, kindly forward your payment details. If payment will be \ - delayed further, please contact us to discuss. \ + 'overdue_msg': 'Please note that the following payments are now due.\ + \nIf your payment has been sent, kindly forward your payment details.\ + \nIf payment will be delayed further, please contact us to discuss.\ \nWould your payment have been carried out after this mail was sent, please consider the present one as void.' } diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index 321e4c2addd..be6c4509557 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -202,14 +202,17 @@ res.company.sheet res.company form + 18 - - - - + + + + + - + + diff --git a/addons/mrp/company_view.xml b/addons/mrp/company_view.xml index f5f06518565..3c33a332977 100644 --- a/addons/mrp/company_view.xml +++ b/addons/mrp/company_view.xml @@ -6,12 +6,12 @@ res.company.mrp.config res.company form - 22 + 24 - + - + diff --git a/addons/pad/company_pad.xml b/addons/pad/company_pad.xml index 754776715d7..0ee80937d18 100644 --- a/addons/pad/company_pad.xml +++ b/addons/pad/company_pad.xml @@ -6,9 +6,12 @@ form - - - + + + + + + diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 1435f6cc2b6..8bf7155096c 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -637,13 +637,16 @@ view.company.form.pos res.company form + 25 - - - - - + + + + + + + diff --git a/addons/procurement/company_view.xml b/addons/procurement/company_view.xml index 4d14f69edde..a5319c43640 100644 --- a/addons/procurement/company_view.xml +++ b/addons/procurement/company_view.xml @@ -6,14 +6,14 @@ res.company.mrp.config res.company form - 17 + 25 - + - - - + + + diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 85cde448c6d..cafe538e12a 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -528,13 +528,16 @@ res.company.task.config res.company form + 22 - - + + + - + + diff --git a/addons/purchase/company_view.xml b/addons/purchase/company_view.xml index d9d2fb9f9ee..04e48af29d9 100644 --- a/addons/purchase/company_view.xml +++ b/addons/purchase/company_view.xml @@ -6,12 +6,12 @@ res.company.mrp.config res.company form - 19 + 22 - + - + diff --git a/addons/sale/company_view.xml b/addons/sale/company_view.xml index 96ff91e8e90..567bf50948f 100644 --- a/addons/sale/company_view.xml +++ b/addons/sale/company_view.xml @@ -5,12 +5,12 @@ res.company.mrp.config res.company form - 24 + 20 - + - + From de2cb73d3add5e7c06bfceb229946865353e71cb Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 10 Aug 2011 11:34:26 +0530 Subject: [PATCH 03/49] [IMP]l10n_ch: rml_footer2 Replace with account_number2 bzr revid: mma@tinyerp.com-20110810060426-3y4ea0reolawrz42 --- addons/l10n_ch/company_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_ch/company_view.xml b/addons/l10n_ch/company_view.xml index df49cf123be..9a9b1464f8d 100644 --- a/addons/l10n_ch/company_view.xml +++ b/addons/l10n_ch/company_view.xml @@ -7,7 +7,7 @@ form - + From ddd53dc30ea3b1edeaf4c9506a1405002107a420 Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Tue, 16 Aug 2011 17:51:44 +0530 Subject: [PATCH 04/49] [Usability] Changed meni location of the -job position bzr revid: tta@openerp.com-20110816122144-4hjrj4qyk848hkma --- addons/hr/hr_view.xml | 2 +- addons/hr_recruitment/hr_recruitment_menu.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 64580a7dbe1..c463cf436e0 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -377,7 +377,7 @@ - + diff --git a/addons/hr_recruitment/hr_recruitment_menu.xml b/addons/hr_recruitment/hr_recruitment_menu.xml index 2e941877b65..9883e311fba 100644 --- a/addons/hr_recruitment/hr_recruitment_menu.xml +++ b/addons/hr_recruitment/hr_recruitment_menu.xml @@ -46,6 +46,9 @@ name="Applicants" parent="base.menu_crm_case_job_req_main" id="menu_crm_case_categ0_act_job" action="crm_case_categ0_act_job" sequence="1"/> + + + From 90569c64cac1ff269e6734a1a481d7b949ecb8cf Mon Sep 17 00:00:00 2001 From: "Tejas (OpenERP)" Date: Tue, 16 Aug 2011 18:20:51 +0530 Subject: [PATCH 05/49] [Usability] Product : Lable changed ,Real Stock and Virtual Stock respectively Quanity On Hand and Quantity On Order. bzr revid: tta@openerp.com-20110816125051-4lgrd1x567v2ea0k --- addons/product/product.py | 4 ++-- addons/stock/product.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index 8e6e132296d..5eb4247fd29 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -469,8 +469,8 @@ class product_product(osv.osv): _inherits = {'product.template': 'product_tmpl_id'} _order = 'default_code,name_template' _columns = { - 'qty_available': fields.function(_product_qty_available, type='float', string='Real Stock'), - 'virtual_available': fields.function(_product_virtual_available, type='float', string='Virtual Stock'), + 'qty_available': fields.function(_product_qty_available, type='float', string='Quantity On Hand'), + 'virtual_available': fields.function(_product_virtual_available, type='float', string='Quantity On Order'), 'incoming_qty': fields.function(_product_incoming_qty, type='float', string='Incoming'), '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('Sale Price')), diff --git a/addons/stock/product.py b/addons/stock/product.py index 70925a82d10..46a5dec759d 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -330,8 +330,8 @@ class product_product(osv.osv): return res _columns = { - 'qty_available': fields.function(_product_available, type='float', string='Real Stock', help="Current quantities of products in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), - 'virtual_available': fields.function(_product_available, type='float', string='Virtual Stock', help="Future stock for this product according to the selected locations or all internal if none have been selected. Computed as: Real Stock - Outgoing + Incoming.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), + 'qty_available': fields.function(_product_available, type='float', string='Quantity On Hand', help="Current quantities of products in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), + 'virtual_available': fields.function(_product_available, type='float', string='Quantity On Order', help="Future stock for this product according to the selected locations or all internal if none have been selected. Computed as: Real Stock - Outgoing + Incoming.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), 'incoming_qty': fields.function(_product_available, type='float', string='Incoming', help="Quantities of products that are planned to arrive in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), 'outgoing_qty': fields.function(_product_available, type='float', string='Outgoing', help="Quantities of products that are planned to leave in selected locations or all internal if none have been selected.", multi='qty_available', digits_compute=dp.get_precision('Product UoM')), 'track_production': fields.boolean('Track Manufacturing Lots' , help="Forces to specify a Production Lot for all moves containing this product and generated by a Manufacturing Order"), From 170ee9bf72132b553dfd856cb5476b0c00d9419d Mon Sep 17 00:00:00 2001 From: "ksa (Open ERP)" Date: Tue, 16 Aug 2011 19:03:53 +0530 Subject: [PATCH 06/49] [IMP]: remove stage type in lead and opportunity bzr revid: ksa@tinyerp.co.in-20110816133353-kfgzeotfuwoe0jle --- addons/crm/crm_lead.py | 2 +- addons/crm/crm_lead_view.xml | 2 +- addons/crm/crm_opportunity.py | 2 +- addons/crm/crm_opportunity_view.xml | 2 +- addons/crm/report/crm_lead_report.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 294c5dfbf56..7644bf08042 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -155,7 +155,7 @@ class crm_lead(crm_case, osv.osv): ],'Type', help="Type is used to separate Leads and Opportunities"), 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), 'date_closed': fields.datetime('Closed', readonly=True), - 'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('type','=','lead')]"), + 'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[(section_ids', '=', section_id)]"), 'user_id': fields.many2one('res.users', 'Salesman'), 'referred': fields.char('Referred By', size=64), 'date_open': fields.datetime('Opened', readonly=True), diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index cc0297c16f4..812ba11b623 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -74,7 +74,7 @@ - +