From bef2f4f82ade6a7713ab90d89d69452676757db3 Mon Sep 17 00:00:00 2001 From: "p_christ@hol.gr" <> Date: Thu, 5 Aug 2010 10:58:15 +0530 Subject: [PATCH 01/14] [FIX] Project: Task search fix regression bzr revid: mra@mra-laptop-20100805052815-3gum037ihtbp5bp3 --- addons/project/project.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/addons/project/project.py b/addons/project/project.py index f0e1ceaaddd..fd839149422 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -335,28 +335,29 @@ class task(osv.osv): _description = "Task" _log_create = True _date_name = "date_start" - + def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): + obj_project = self.pool.get('project.project') for domain in args: if domain[0] == 'project_id' and (not isinstance(domain[2], str)): - id = isinstance(domain[2], list) and int(domain[2][0]) or int(domain[2]) - if id: - if self.pool.get('project.project').read(cr, user, id, ['state'])['state'] == 'template': - args.append(['active', '=', False]) + id = isinstance(domain[2], list) and domain[2][0] or domain[2] + if id and isinstance(id, (long, int)): + if obj_project.read(cr, user, id, ['state'])['state'] == 'template': + args.append(('active', '=', False)) return super(task, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count) def _str_get(self, task, level=0, border='***', context=None): return border+' '+(task.user_id and task.user_id.name.upper() or '')+(level and (': L'+str(level)) or '')+(' - %.1fh / %.1fh'%(task.effective_hours or 0.0,task.planned_hours))+' '+border+'\n'+ \ border[0]+' '+(task.name or '')+'\n'+ \ (task.description or '')+'\n\n' - + # Compute: effective_hours, total_hours, progress def _hours_get(self, cr, uid, ids, field_names, args, context=None): project_obj = self.pool.get('project.project') res = {} cr.execute("SELECT task_id, COALESCE(SUM(hours),0) FROM project_task_work WHERE task_id IN %s GROUP BY task_id",(tuple(ids),)) hours = dict(cr.fetchall()) - + uom_obj = self.pool.get('product.uom') user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid) if user_uom != default_uom: From fa1990b532f9602beee7e955c0a61ab4d9299b66 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 5 Aug 2010 11:09:52 +0530 Subject: [PATCH 02/14] [Fix] stock : Fix the packing report bzr revid: sbh@tinyerp.com-20100805053952-8suzix8brrra4x8s --- addons/stock/report/packing.rml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/addons/stock/report/packing.rml b/addons/stock/report/packing.rml index 3db817996d9..7288615da6d 100644 --- a/addons/stock/report/packing.rml +++ b/addons/stock/report/packing.rml @@ -276,12 +276,11 @@ - [[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]] - Non Assigned Products: [[ ( move_lines.state == 'assigned' or move_lines.state == 'done' or move_lines.state == 'confirmed' ) and removeParentNode('para') ]] - [[ (move_lines.state == 'done' or move_lines.state == 'confirmed') and removeParentNode('para') ]] -
- [[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]] + + [[ ([line for line in picking.move_lines if (line.state == 'draft' )]) and 'Non Assigned Products:' or removeParentNode('para') ]] +
+ [[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') ]] [ [[ move_lines.product_id.default_code ]] ] [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] From 5b52666f71e44d2478ab2399b30360acf6db717b Mon Sep 17 00:00:00 2001 From: "atp (Open ERP)" Date: Thu, 5 Aug 2010 11:18:57 +0530 Subject: [PATCH 03/14] [IMP]: Use Tooltips in auction form and change menu name. bzr revid: atp@tinyerp.co.in-20100805054857-iw21bieed73n29ns --- addons/auction/auction.py | 16 ++++++++-------- addons/auction/auction_view.xml | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/auction/auction.py b/addons/auction/auction.py index 41c75e0fe7b..6a241873f98 100644 --- a/addons/auction/auction.py +++ b/addons/auction/auction.py @@ -72,14 +72,14 @@ class auction_dates(osv.osv): _columns = { 'name': fields.char('Auction Name', size=64, required=True), - 'expo1': fields.date('First Exposition Day', required=True), - 'expo2': fields.date('Last Exposition Day', required=True), - 'auction1': fields.date('First Auction Day', required=True), - 'auction2': fields.date('Last Auction Day', required=True), - 'journal_id': fields.many2one('account.journal', 'Buyer Journal', required=True), - 'journal_seller_id': fields.many2one('account.journal', 'Seller Journal', required=True), - 'buyer_costs': fields.many2many('account.tax', 'auction_buyer_taxes_rel', 'auction_id', 'tax_id', 'Buyer Costs'), - 'seller_costs': fields.many2many('account.tax', 'auction_seller_taxes_rel', 'auction_id', 'tax_id', 'Seller Costs'), + 'expo1': fields.date('First Exposition Day', required=True, help="Beginning Exposition Date For Auction"), + 'expo2': fields.date('Last Exposition Day', required=True, help="Last Exposition Date For Auction"), + 'auction1': fields.date('First Auction Day', required=True, help="Start Date Of Auction"), + 'auction2': fields.date('Last Auction Day', required=True, help="End Date Of Auction"), + 'journal_id': fields.many2one('account.journal', 'Buyer Journal', required=True, help="Account Journal For Buyer"), + 'journal_seller_id': fields.many2one('account.journal', 'Seller Journal', required=True, help="Account Journal For Seller"), + 'buyer_costs': fields.many2many('account.tax', 'auction_buyer_taxes_rel', 'auction_id', 'tax_id', 'Buyer Costs', help="Account Tax For Buyer"), + 'seller_costs': fields.many2many('account.tax', 'auction_seller_taxes_rel', 'auction_id', 'tax_id', 'Seller Costs', help="Account Tax For Seller"), 'acc_income': fields.many2one('account.account', 'Income Account', required=True), 'acc_expense': fields.many2one('account.account', 'Expense Account', required=True), 'adj_total': fields.function(_adjudication_get, method=True, string='Total Adjudication', store=True), diff --git a/addons/auction/auction_view.xml b/addons/auction/auction_view.xml index 46d49754d16..6079081c417 100644 --- a/addons/auction/auction_view.xml +++ b/addons/auction/auction_view.xml @@ -55,6 +55,7 @@ + auction.lot.category.form auction.lot.category @@ -91,7 +92,6 @@ -