From 5703f9fd8d07fe5e9e4e92cd2b15a57d9f57d04b Mon Sep 17 00:00:00 2001 From: "Nimesh (Open ERP)" Date: Thu, 31 May 2012 14:56:14 +0530 Subject: [PATCH 01/86] [add] add open chatter and move Request a quotation button to product tab and add attr in it. bzr revid: nco@tinyerp.com-20120531092614-dvmi3famh400o4sd --- addons/purchase_requisition/purchase_requisition.py | 1 + addons/purchase_requisition/purchase_requisition_view.xml | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py index 3f3afa47e3b..31758edb6bb 100644 --- a/addons/purchase_requisition/purchase_requisition.py +++ b/addons/purchase_requisition/purchase_requisition.py @@ -31,6 +31,7 @@ import decimal_precision as dp class purchase_requisition(osv.osv): _name = "purchase.requisition" _description="Purchase Requisition" + _inherit = "mail.thread" _columns = { 'name': fields.char('Requisition Reference', size=32,required=True), 'origin': fields.char('Source', size=32), diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml index 9a9d2bfa105..af81892190f 100644 --- a/addons/purchase_requisition/purchase_requisition_view.xml +++ b/addons/purchase_requisition/purchase_requisition_view.xml @@ -68,8 +68,9 @@ - + @@ -1711,7 +1711,7 @@ - + From e0a0d760acd069e6d1383dddd50bce1a31c24b79 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Thu, 14 Jun 2012 15:52:58 +0530 Subject: [PATCH 32/86] [IMP]mrp: improve a typo and added a group bzr revid: mma@tinyerp.com-20120614102258-kx1gf1k329fobhrz --- addons/mrp/mrp.py | 8 ++++---- addons/mrp/mrp_view.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 8ebba55771f..3a0ed7bf783 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -466,13 +466,13 @@ class mrp_production(osv.osv): 'date_planned_end': fields.function(_production_date_end, type='date', string='Scheduled End Date'), 'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date'), - 'date_planned': fields.datetime('Scheduled date', required=True, select=1), + 'date_planned': fields.datetime('Scheduled Date', required=True, select=1), 'date_start': fields.datetime('Start Date', select=True), 'date_finished': fields.datetime('End Date', select=True), 'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]}), 'routing_id': fields.many2one('mrp.routing', string='Routing', on_delete='set null', readonly=True, states={'draft':[('readonly',False)]}, help="The list of operations (list of work centers) to produce the finished product. The routing is mainly used to compute work center costs during operations and to plan future loads on work centers based on production plannification."), - 'picking_id': fields.many2one('stock.picking', 'Picking list', readonly=True, ondelete="restrict", + 'picking_id': fields.many2one('stock.picking', 'Picking List', readonly=True, ondelete="restrict", help="This is the Internal Picking List that brings the finished product to the production plan"), 'move_prod_id': fields.many2one('stock.move', 'Move product', readonly=True), 'move_lines': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Products to Consume', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)]}), @@ -1094,8 +1094,8 @@ class mrp_production_workcenter_line(osv.osv): _columns = { 'name': fields.char('Work Order', size=64, required=True), 'workcenter_id': fields.many2one('mrp.workcenter', 'Work Center', required=True), - 'cycle': fields.float('Nbr of cycles', digits=(16,2)), - 'hour': fields.float('Nbr of hours', digits=(16,2)), + 'cycle': fields.float('Nbr of Cycles', digits=(16,2)), + 'hour': fields.float('Nbr of Hours', digits=(16,2)), 'sequence': fields.integer('Sequence', required=True, help="Gives the sequence order when displaying a list of work orders."), 'production_id': fields.many2one('mrp.production', 'Production Order', select=True, ondelete='cascade', required=True), } diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index cb8e4ba476e..97d540703b3 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -706,7 +706,7 @@ - + From 77cedcc2b573469a55ad03f107811ef4808929cd Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Thu, 14 Jun 2012 16:43:28 +0530 Subject: [PATCH 33/86] [IMP]mrp: improve view bzr revid: mma@tinyerp.com-20120614111328-zrxqevkts0byblim --- addons/mrp/mrp_view.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 97d540703b3..b5f3138c800 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -536,7 +536,7 @@ mrp.production tree - + @@ -644,6 +644,9 @@ + + + @@ -681,7 +684,7 @@ states="done,cancel"/> - + From 1631c9331a27f9a02786e3a10df9b5025a845405 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Thu, 14 Jun 2012 17:01:35 +0530 Subject: [PATCH 34/86] [IMP]mrp: improve string bzr revid: mma@tinyerp.com-20120614113135-vzolu02321g58zu4 --- addons/product/product_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index c0aecfc4fa7..9138f7f5dba 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -146,7 +146,7 @@ - + From 7fc06fc81f7ab9efa6084e8ed708cc7a694527ec Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 15 Jun 2012 12:41:06 +0530 Subject: [PATCH 35/86] [IMP]add placeholder attribute for translation in qweb. bzr revid: vme@tinyerp.com-20120615071106-hagp49jwh9ntz5z4 --- addons/web/static/src/js/coresetup.js | 2 +- addons/web/static/src/xml/base.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 4defde54a3c..77355dd163a 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -497,7 +497,7 @@ instance.web.qweb.preprocess_node = function() { break; case 1: // Element - var attr, attrs = ['label', 'title', 'alt']; + var attr, attrs = ['label', 'title', 'alt', 'placeholder']; while (attr = attrs.pop()) { if (this.attributes[attr]) { this.attributes[attr] = instance.web._t(this.attributes[attr]); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 2a55ca0cd4f..6f2a297b3d7 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1391,7 +1391,7 @@

Save current filter

-

+

@@ -1711,7 +1711,7 @@ - + From be7b44cbd131062dd623accfe0481d607e8bfc80 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Fri, 15 Jun 2012 12:44:44 +0530 Subject: [PATCH 36/86] [IMP]mrp: added a context for default search bzr revid: mma@tinyerp.com-20120615071444-2uyv0zz17qtqd6nf --- addons/mrp/mrp_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index b5f3138c800..2349726b9e3 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -642,7 +642,7 @@ - + From fef0b4f52b0bd3803b2ae5764146bc7381e280ef Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 15 Jun 2012 13:04:32 +0530 Subject: [PATCH 37/86] [REM]forgot to remove t-att. bzr revid: vme@tinyerp.com-20120615073432-hymeixv752fxtkji --- addons/web/static/src/xml/base.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 6f2a297b3d7..b90addb0a2c 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1391,7 +1391,7 @@

Save current filter

-

+

@@ -1711,7 +1711,7 @@ - + From e76a800f90c74d86e16a6265e49569fc5f3e7a69 Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 15 Jun 2012 14:20:27 +0530 Subject: [PATCH 38/86] [IMP]add attr in npybabel.py. bzr revid: vme@tinyerp.com-20120615085027-z08zieqvr0v8br4j --- npybabel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npybabel.py b/npybabel.py index 93ff5bcb9dc..3b776857282 100755 --- a/npybabel.py +++ b/npybabel.py @@ -107,7 +107,7 @@ def extract_qweb(fileobj, keywords, comment_tags, options): not ("t-jquery" in el.attrib and "t-operation" not in el.attrib) and \ not ("t-translation" in el.attrib and el.attrib["t-translation"].strip() == "off"): handle_text(el.text, el.sourceline) - for att in ('title', 'alt', 'label'): + for att in ('title', 'alt', 'label','placeholder'): if att in el.attrib: handle_text(el.attrib[att], el.sourceline) iter_elements(el) From 5053c1a66e78ba3e4ce51e9cd41c2d4c39d5136e Mon Sep 17 00:00:00 2001 From: "Vidhin Mehta (OpenERP)" Date: Fri, 15 Jun 2012 14:22:38 +0530 Subject: [PATCH 39/86] bzr revid: vme@tinyerp.com-20120615085238-d0vm6jr5t23k5jim --- npybabel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npybabel.py b/npybabel.py index 3b776857282..14ac115e338 100755 --- a/npybabel.py +++ b/npybabel.py @@ -107,7 +107,7 @@ def extract_qweb(fileobj, keywords, comment_tags, options): not ("t-jquery" in el.attrib and "t-operation" not in el.attrib) and \ not ("t-translation" in el.attrib and el.attrib["t-translation"].strip() == "off"): handle_text(el.text, el.sourceline) - for att in ('title', 'alt', 'label','placeholder'): + for att in ('title', 'alt', 'label', 'placeholder'): if att in el.attrib: handle_text(el.attrib[att], el.sourceline) iter_elements(el) From 07021533c5904e347a6f784387104989cf51fd10 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Fri, 15 Jun 2012 14:35:22 +0530 Subject: [PATCH 40/86] [IMP]mrp: fix the form tag issue bzr revid: mma@tinyerp.com-20120615090522-8twzo6vov7ew3gfx --- addons/mrp/mrp_view.xml | 2 +- addons/procurement/procurement_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 2349726b9e3..9df778cf6f9 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -933,7 +933,7 @@ + mode="tree"> diff --git a/addons/procurement/procurement_view.xml b/addons/procurement/procurement_view.xml index ece6c0388f9..3fa58411e6b 100644 --- a/addons/procurement/procurement_view.xml +++ b/addons/procurement/procurement_view.xml @@ -282,7 +282,7 @@ + mode="tree"> From 318fc7a37f03ddc9ac4721bbcdb43eed8e357985 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Fri, 15 Jun 2012 15:42:07 +0530 Subject: [PATCH 41/86] [IMP]mrp: improve menutip bzr revid: mma@tinyerp.com-20120615101207-yy6eco3oqgtl76m8 --- addons/mrp/mrp_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/mrp_view.xml b/addons/mrp/mrp_view.xml index 9df778cf6f9..9cff3bcd3db 100644 --- a/addons/mrp/mrp_view.xml +++ b/addons/mrp/mrp_view.xml @@ -818,7 +818,7 @@ {} - Click here to create a new Manufacturing Order + Click here to create a new Manufacturing Order. <p> To process the production, don't forget to create a Bill of Material. Manufacturing Order can be automatically generated based on procurement rules specified on the product. From 2a75718588ca39f20c0be1a7d51e7339802c7b10 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Fri, 15 Jun 2012 16:59:50 +0530 Subject: [PATCH 42/86] [IMP]mrp: added a prodct_uom group bzr revid: mma@tinyerp.com-20120615112950-etsshtnaajfyddb1 --- addons/mrp_subproduct/mrp_subproduct_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/mrp_subproduct/mrp_subproduct_view.xml b/addons/mrp_subproduct/mrp_subproduct_view.xml index 814e4e46391..42f9c7b4060 100644 --- a/addons/mrp_subproduct/mrp_subproduct_view.xml +++ b/addons/mrp_subproduct/mrp_subproduct_view.xml @@ -12,13 +12,13 @@ - + - + From d89a10cf7576663a45d430eb45d4a82851b49f7e Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Tue, 19 Jun 2012 19:03:00 +0530 Subject: [PATCH 43/86] [IMP] improved functionality for purchase_requisition, added group on destination field and improved view bzr revid: bde@tinyerp.com-20120619133300-jqndqfhxm7g2p443 --- addons/purchase/purchase.py | 5 +++-- .../purchase_requisition/purchase_requisition.py | 15 ++++++++------- .../purchase_requisition_view.xml | 6 +++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 47ff616b548..8743b348583 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -1072,8 +1072,9 @@ class procurement_order(osv.osv): 'company_id': procurement.company_id.id, 'fiscal_position': partner.property_account_position and partner.property_account_position.id or False } - res[procurement.id] = self.create_procurement_purchase_order(cr, uid, procurement, po_vals, line_vals, context=context) - self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': res[procurement.id]}) + if not procurement.product_id.purchase_requisition: + res[procurement.id] = self.create_procurement_purchase_order(cr, uid, procurement, po_vals, line_vals, context=context) + self.write(cr, uid, [procurement.id], {'state': 'running', 'purchase_id': res[procurement.id]}) self.running_send_note(cr, uid, [procurement.id], context=context) return res diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py index be8660bb10b..f0aecbeea55 100644 --- a/addons/purchase_requisition/purchase_requisition.py +++ b/addons/purchase_requisition/purchase_requisition.py @@ -280,11 +280,12 @@ class procurement_order(osv.osv): def make_po(self, cr, uid, ids, context=None): sequence_obj = self.pool.get('ir.sequence') res = super(procurement_order, self).make_po(cr, uid, ids, context=context) - for proc_id, po_id in res.items(): - procurement = self.browse(cr, uid, proc_id, context=context) - requisition_id=False - if procurement.product_id.purchase_requisition: - requisition_id=self.pool.get('purchase.requisition').create(cr, uid, { + sequence_obj = self.pool.get('ir.sequence') + requisition_obj = self.pool.get('purchase.requisition') + procurement = self.browse(cr, uid, ids, context=context)[0] + if procurement.product_id.purchase_requisition: + requisition_id = requisition_obj.create(cr, uid, + { 'name': sequence_obj.get(cr, uid, 'purchase.order.requisition'), 'origin': procurement.origin, 'date_end': procurement.date_planned, @@ -296,9 +297,9 @@ class procurement_order(osv.osv): 'product_qty': procurement.product_qty })], - 'purchase_ids': [(6,0,[po_id])] }) - self.write(cr,uid,[proc_id],{'requisition_id':requisition_id},context=context) + self.write(cr, uid, ids, {'requisition_id':requisition_id}, context=context) + return {} return res procurement_order() diff --git a/addons/purchase_requisition/purchase_requisition_view.xml b/addons/purchase_requisition/purchase_requisition_view.xml index 7a9bf4a1abe..88b2c3a8724 100644 --- a/addons/purchase_requisition/purchase_requisition_view.xml +++ b/addons/purchase_requisition/purchase_requisition_view.xml @@ -74,6 +74,8 @@ +