From 343ac78ed6ce2d11da4b6e22863b49576aa5b3aa Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 12 Oct 2010 11:20:51 +0530 Subject: [PATCH 01/31] [Fix] delivery: Fix yml bzr revid: sbh@tinyerp.com-20101012055051-vmz3ka2dzcq7tenm --- addons/delivery/test/delivery_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/delivery/test/delivery_report.yml b/addons/delivery/test/delivery_report.yml index a88b6bd1942..b66528ea18c 100644 --- a/addons/delivery/test/delivery_report.yml +++ b/addons/delivery/test/delivery_report.yml @@ -12,7 +12,7 @@ invoice_state: none move_lines: - company_id: base.main_company - date_planned: '2010-05-11 15:18:57' + date: '2010-05-11 15:18:57' location_dest_id: stock.stock_location_customers location_id: stock.stock_location_stock name: HP CD writers From dfa5594e4af22928b812e28814bcb22a37cb14a7 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 12 Oct 2010 11:27:35 +0530 Subject: [PATCH 02/31] [Fix] stock_invoice_directly: change the date_planned to date for stock move bzr revid: sbh@tinyerp.com-20101012055735-h1wpluft9xzd2fwb --- addons/stock_invoice_directly/test/stock_invoice_directly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_invoice_directly/test/stock_invoice_directly.yml b/addons/stock_invoice_directly/test/stock_invoice_directly.yml index 9fde059fe17..6a7e99276b9 100644 --- a/addons/stock_invoice_directly/test/stock_invoice_directly.yml +++ b/addons/stock_invoice_directly/test/stock_invoice_directly.yml @@ -11,7 +11,7 @@ move_lines: - company_id: base.main_company date_expected: '2010-08-03 11:05:47' - date_planned: '2010-08-03 11:05:47' + date: '2010-08-03 11:05:47' location_id: stock.stock_location_stock product_id: product.product_product_pc1 product_qty: 3.0 From cad42f4ea53e563101c1911ec056d1ac381990fb Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 12 Oct 2010 11:51:56 +0530 Subject: [PATCH 03/31] [Fix] stock: set readonly on Scheduled date bzr revid: sbh@tinyerp.com-20101012062156-xc2fd2prhcgavn6c --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 989fc50cc31..25c3715c072 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1441,7 +1441,7 @@ class stock_move(osv.osv): 'priority': fields.selection([('0', 'Not urgent'), ('1', 'Urgent')], 'Priority'), 'create_date': fields.datetime('Creation Date', readonly=True), 'date': fields.datetime('Date', required=True, help="Move date: scheduled date until move is done, then date of actual move processing", readonly=True), - 'date_expected': fields.datetime('Scheduled Date', required=True, help="Scheduled date for the processing of this move"), + 'date_expected': fields.datetime('Scheduled Date', states={'done': [('readonly', True)]},required=True, help="Scheduled date for the processing of this move"), 'product_id': fields.many2one('product.product', 'Product', required=True, select=True, domain=[('type','<>','service')],states={'done': [('readonly', True)]}), 'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True,states={'done': [('readonly', True)]}), From d8e6a7d71f2b31e8ef98024220793dc7f4f9c50d Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 12 Oct 2010 12:30:09 +0530 Subject: [PATCH 04/31] [Fix] account: Fix yml bzr revid: sbh@tinyerp.com-20101012070009-5th07cm82hhrlonp --- addons/account/test/account_validate_account_move.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/account/test/account_validate_account_move.yml b/addons/account/test/account_validate_account_move.yml index 9a733d8ad5f..44acc341d8e 100644 --- a/addons/account/test/account_validate_account_move.yml +++ b/addons/account/test/account_validate_account_move.yml @@ -4,9 +4,6 @@ !record {model: account.tax.code, id: account_tax_code_0}: name : Tax Code Test sign : 1.00 -- - - - In order to test the 'Validate Journal Entries' wizard in OpenERP, I created an account move From fe1fd0c8e5887f504783bc646ec2c04ae19a9638 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 12 Oct 2010 16:06:20 +0530 Subject: [PATCH 05/31] [Fix] stock: Remove the duplicate filter for product bzr revid: sbh@tinyerp.com-20101012103620-vl7n13wzt2jxxcv9 --- addons/stock/stock_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index fa81b7534c3..540a70731a1 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -1831,7 +1831,6 @@ - From 35ed213a139b5ce228e38928d06a340a09321189 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Tue, 12 Oct 2010 16:27:44 +0530 Subject: [PATCH 06/31] [Fix] product: Fix the name search method bzr revid: sbh@tinyerp.com-20101012105744-1v1av7q0ir2y9c9o --- addons/product/product.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/product/product.py b/addons/product/product.py index 22f57ac981f..3c94b396907 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -24,7 +24,7 @@ import decimal_precision as dp import math from _common import rounding - +import re from tools.translate import _ def is_pair(x): @@ -501,6 +501,11 @@ class product_product(osv.osv): if not len(ids): ids = self.search(cr, user, [('default_code',operator,name)]+ args, limit=limit, context=context) ids += self.search(cr, user, [('name',operator,name)]+ args, limit=limit, context=context) + if not len(ids): + ptrn=re.compile('(\[(.*?)\])') + res = ptrn.search(str(name)) + if res: + ids = self.search(cr, user, [('default_code','ilike',res.group(2))]+ args, limit=limit, context=context) else: ids = self.search(cr, user, args, limit=limit, context=context) result = self.name_get(cr, user, ids, context) From cff45072e7024a39ec3df798a8103499e8f412c0 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Wed, 13 Oct 2010 12:00:46 +0530 Subject: [PATCH 07/31] [Fix] stock: Done picking wizard ask for cost bzr revid: sbh@tinyerp.com-20101013063046-34xg032inept5an1 --- addons/stock/stock.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 941f878815d..e09ca183675 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -731,21 +731,29 @@ class stock_picking(osv.osv): 'button_confirm', cr) return True - def draft_validate(self, cr, uid, ids, *args): + def draft_validate(self, cr, uid, ids, context=None): """ Validates picking directly from draft state. @return: True """ + if context is None: + context = {} wf_service = netsvc.LocalService("workflow") self.draft_force_assign(cr, uid, ids) for pick in self.browse(cr, uid, ids): move_ids = [x.id for x in pick.move_lines] self.pool.get('stock.move').force_assign(cr, uid, move_ids) wf_service.trg_write(uid, 'stock.picking', pick.id, cr) - - self.action_move(cr, uid, [pick.id]) - wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_done', cr) - return True - + context.update({'active_ids':ids}) + return { + 'name': 'Make Picking', + 'view_type': 'form', + 'view_mode': 'form', + 'res_model': 'stock.partial.picking', + 'type': 'ir.actions.act_window', + 'target': 'new', + 'nodestroy': True, + 'context':context + } def cancel_assign(self, cr, uid, ids, *args): """ Cancels picking and moves. @return: True From 4ff60c931f01936bc8efd85f70be6e1c70c2e30d Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Wed, 13 Oct 2010 12:12:19 +0530 Subject: [PATCH 08/31] [Fix] stock: Fix the demo data bzr revid: sbh@tinyerp.com-20101013064219-jf3eqy083oq3lgdx --- addons/stock/stock_demo.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/stock/stock_demo.xml b/addons/stock/stock_demo.xml index 33d130c2d77..bce4de8b593 100644 --- a/addons/stock/stock_demo.xml +++ b/addons/stock/stock_demo.xml @@ -264,6 +264,7 @@ 2binvoiced + From ff91a45e22900fc2567dc6b5c70b172a216f6bfc Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Wed, 13 Oct 2010 13:58:33 +0530 Subject: [PATCH 09/31] [IMP] stock: Improve the icon bzr revid: sbh@tinyerp.com-20101013082833-xls09cjd79wzmd17 --- 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 80c898daefa..0a0cfc76a03 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -101,7 +101,7 @@ string="Split inventory lines" groups="base.group_extended" type="action" icon="terp-stock_effects-object-colorize" states="draft"/> - +
@@ -127,7 +127,7 @@ - + @@ -935,7 +935,7 @@