From a7e61a9e65fb5b6ff4272c0aca8eae5e25de7588 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 11 Apr 2011 12:20:10 +0530 Subject: [PATCH 001/224] [FIX]stock :Fixed * changing UOM on partial picking wizard * made product field readonly, * production lot required if product have track incoming/outgoing true [TOCHECK: in one2many field of wizard even if we have prodlot required and we donot fill it, and click of process it will not give any warning like correct red fields, but if we open that line in one2many field and then click on process it will give warning] lp bug: https://launchpad.net/bugs/751222 fixed bzr revid: ron@tinyerp.com-20110411065010-hps176e1a4zvow3d --- addons/stock/stock.py | 7 +++++-- addons/stock/wizard/stock_partial_move.py | 3 ++- addons/stock/wizard/stock_partial_move_view.xml | 12 ++++++++---- addons/stock/wizard/stock_partial_picking.py | 2 ++ 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 96f5855166e..0064dc4bf0a 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1180,7 +1180,6 @@ class stock_picking(osv.osv): too_few.append(move) else: too_many.append(move) - # Average price computation if (pick.type == 'in') and (move.product_id.cost_method == 'average'): product = product_obj.browse(cr, uid, move.product_id.id) @@ -1233,6 +1232,7 @@ class stock_picking(osv.osv): 'state': 'assigned', 'move_dest_id': False, 'price_unit': move.price_unit, + 'product_uom':product_uom, } prodlot_id = prodlot_ids[move.id] if prodlot_id: @@ -1248,13 +1248,16 @@ class stock_picking(osv.osv): if new_picking: move_obj.write(cr, uid, [c.id for c in complete], {'picking_id': new_picking}) for move in complete: + defaults = {'product_uom': product_uom} if prodlot_ids.get(move.id): - move_obj.write(cr, uid, move.id, {'prodlot_id': prodlot_ids[move.id]}) + defaults.update({'prodlot_id': prodlot_ids[move.id]}) + move_obj.write(cr, uid, move.id, defaults) for move in too_many: product_qty = move_product_qty[move.id] defaults = { 'product_qty' : product_qty, 'product_uos_qty': product_qty, #TODO: put correct uos_qty + 'product_uom': product_uom } prodlot_id = prodlot_ids.get(move.id) if prodlot_ids.get(move.id): diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py index 874b22844d1..2f0959f247a 100644 --- a/addons/stock/wizard/stock_partial_move.py +++ b/addons/stock/wizard/stock_partial_move.py @@ -28,7 +28,7 @@ class stock_partial_move_memory_out(osv.osv_memory): _name = "stock.move.memory.out" _rec_name = 'product_id' _columns = { - 'product_id' : fields.many2one('product.product', string="Product", required=True), + 'product_id' : fields.many2one('product.product', string="Product", required=True, readonly=True), 'quantity' : fields.float("Quantity", required=True), 'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True), 'prodlot_id' : fields.many2one('stock.production.lot', 'Production Lot'), @@ -36,6 +36,7 @@ class stock_partial_move_memory_out(osv.osv_memory): 'wizard_id' : fields.many2one('stock.partial.move', string="Wizard"), 'cost' : fields.float("Cost", help="Unit Cost for this product line"), 'currency' : fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed"), + 'tracking': fields.related('product_id', 'track_production', type='boolean', relation='product.product', string='Tracking'), } class stock_partial_move_memory_in(osv.osv_memory): diff --git a/addons/stock/wizard/stock_partial_move_view.xml b/addons/stock/wizard/stock_partial_move_view.xml index ec33dff083b..0647c2ba76c 100644 --- a/addons/stock/wizard/stock_partial_move_view.xml +++ b/addons/stock/wizard/stock_partial_move_view.xml @@ -30,7 +30,8 @@ - + + @@ -46,7 +47,8 @@ - + + @@ -62,7 +64,8 @@ - + + @@ -76,7 +79,8 @@ - + + diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 421bcae10ba..4fd6030269d 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -154,6 +154,8 @@ class stock_partial_picking(osv.osv_memory): moves_list = picking_type == 'in' and partial.product_moves_in or partial.product_moves_out for move in moves_list: + if move.product_uom.category_id.id <> move.product_id.uom_id.category_id.id: + raise osv.except_osv(_('Error !'), _('Product UoM category %s must be same with Product Default UoM Category %s!.') % (move.product_uom.category_id.name,move.product_id.uom_id.category_id.name,)) partial_datas['move%s' % (move.move_id.id)] = { 'product_id': move.id, 'product_qty': move.quantity, From f8a2f424824514d46e3be34fd206cec8dfea73e8 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 11 Apr 2011 18:12:04 +0530 Subject: [PATCH 002/224] [IMP]stock :Fixed * processing of product with different uom is working, * made tracking field as function field, * better validation for uom for partial picking Quantity(wizard) check with picking Qty: * production lot required if product have track incoming/outgoing true [TOCHECK: in one2many field of wizard even if we have prodlot required and we donot fill it, and click of process it will not give any warning like correct red fields, but if we open that line in one2many field and then click on process it will give warning] bzr revid: ron@tinyerp.com-20110411124204-25bcgs2024lln14n --- addons/stock/stock.py | 8 +++++--- addons/stock/wizard/stock_partial_move.py | 13 ++++++++++++- addons/stock/wizard/stock_partial_move_view.xml | 4 ++-- addons/stock/wizard/stock_partial_picking.py | 11 +++++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 0064dc4bf0a..748b1278cc1 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1162,6 +1162,7 @@ class stock_picking(osv.osv): complete, too_many, too_few = [], [], [] move_product_qty = {} prodlot_ids = {} + product_uoms = {} product_avail = {} for move in pick.move_lines: if move.state in ('done', 'cancel'): @@ -1174,6 +1175,7 @@ class stock_picking(osv.osv): product_currency = partial_data.get('product_currency',False) prodlot_id = partial_data.get('prodlot_id') prodlot_ids[move.id] = prodlot_id + product_uoms[move.id] = product_uom if move.product_qty == product_qty: complete.append(move) elif move.product_qty > product_qty: @@ -1232,7 +1234,7 @@ class stock_picking(osv.osv): 'state': 'assigned', 'move_dest_id': False, 'price_unit': move.price_unit, - 'product_uom':product_uom, + 'product_uom':product_uoms[move.id], } prodlot_id = prodlot_ids[move.id] if prodlot_id: @@ -1248,7 +1250,7 @@ class stock_picking(osv.osv): if new_picking: move_obj.write(cr, uid, [c.id for c in complete], {'picking_id': new_picking}) for move in complete: - defaults = {'product_uom': product_uom} + defaults = {'product_uom': product_uoms[move.id]} if prodlot_ids.get(move.id): defaults.update({'prodlot_id': prodlot_ids[move.id]}) move_obj.write(cr, uid, move.id, defaults) @@ -1257,7 +1259,7 @@ class stock_picking(osv.osv): defaults = { 'product_qty' : product_qty, 'product_uos_qty': product_qty, #TODO: put correct uos_qty - 'product_uom': product_uom + 'product_uom': product_uoms[move.id] } prodlot_id = prodlot_ids.get(move.id) if prodlot_ids.get(move.id): diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py index 2f0959f247a..72c151c8ddf 100644 --- a/addons/stock/wizard/stock_partial_move.py +++ b/addons/stock/wizard/stock_partial_move.py @@ -25,6 +25,17 @@ import time class stock_partial_move_memory_out(osv.osv_memory): + + def _tracking(self, cursor, user, ids, name, arg, context=None): + res = {} + for tracklot in self.browse(cursor, user, ids, context=context): + tracking = False + if (tracklot.move_id.picking_id.type == 'in' and tracklot.product_id.track_incoming == True) or \ + (tracklot.move_id.picking_id.type == 'out' and tracklot.product_id.track_outgoing == True): + tracking = True + res[tracklot.id] = tracking + return res + _name = "stock.move.memory.out" _rec_name = 'product_id' _columns = { @@ -36,7 +47,7 @@ class stock_partial_move_memory_out(osv.osv_memory): 'wizard_id' : fields.many2one('stock.partial.move', string="Wizard"), 'cost' : fields.float("Cost", help="Unit Cost for this product line"), 'currency' : fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed"), - 'tracking': fields.related('product_id', 'track_production', type='boolean', relation='product.product', string='Tracking'), + 'tracking': fields.function(_tracking, method=True, string='Tracking', type='boolean'), } class stock_partial_move_memory_in(osv.osv_memory): diff --git a/addons/stock/wizard/stock_partial_move_view.xml b/addons/stock/wizard/stock_partial_move_view.xml index 0647c2ba76c..02dd63fe5dd 100644 --- a/addons/stock/wizard/stock_partial_move_view.xml +++ b/addons/stock/wizard/stock_partial_move_view.xml @@ -30,7 +30,7 @@ - + @@ -64,7 +64,7 @@ - + diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 4fd6030269d..e03af945604 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -142,6 +142,7 @@ class stock_partial_picking(osv.osv_memory): @return: A dictionary which of fields with values. """ pick_obj = self.pool.get('stock.picking') + uom_obj = self.pool.get('product.uom') picking_ids = context.get('active_ids', False) partial = self.browse(cr, uid, ids[0], context=context) @@ -152,10 +153,14 @@ class stock_partial_picking(osv.osv_memory): for pick in pick_obj.browse(cr, uid, picking_ids, context=context): picking_type = self.get_picking_type(cr, uid, pick, context=context) moves_list = picking_type == 'in' and partial.product_moves_in or partial.product_moves_out - + picking_qty = 0.0 + partial_qty = 0.0 + for get_qty in pick.move_lines: + picking_qty += get_qty.product_qty for move in moves_list: + partial_qty += uom_obj._compute_qty(cr, uid, move.product_uom.id, move.quantity, move.product_id.uom_id.id) if move.product_uom.category_id.id <> move.product_id.uom_id.category_id.id: - raise osv.except_osv(_('Error !'), _('Product UoM category %s must be same with Product Default UoM Category %s!.') % (move.product_uom.category_id.name,move.product_id.uom_id.category_id.name,)) + raise osv.except_osv(_('Error !'), _('You are selected product uom category %s not same with picking product uom Category %s!.') % (move.product_uom.category_id.name,move.product_id.uom_id.category_id.name,)) partial_datas['move%s' % (move.move_id.id)] = { 'product_id': move.id, 'product_qty': move.quantity, @@ -167,6 +172,8 @@ class stock_partial_picking(osv.osv_memory): 'product_price' : move.cost, 'product_currency': move.currency.id, }) + if picking_qty < partial_qty: + raise osv.except_osv(_('Error !'), _('You cannot select Quantity %s more then Picking Quantity %s.') % (partial_qty, picking_qty,)) pick_obj.do_partial(cr, uid, picking_ids, partial_datas, context=context) return {'type': 'ir.actions.act_window_close'} From 4624ad802949fd486a663a4ddbe1990ad25d1ceb Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 12 Apr 2011 15:02:36 +0530 Subject: [PATCH 003/224] [IMP]stock:Fixed => processing of product with different uom is working and Refector code of do_partial picking bzr revid: ron@tinyerp.com-20110412093236-cjl8sp2m848sjog4 --- addons/stock/stock.py | 36 +++++++++--------------------------- 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 748b1278cc1..d0287987afa 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1159,11 +1159,8 @@ class stock_picking(osv.osv): wf_service = netsvc.LocalService("workflow") for pick in self.browse(cr, uid, ids, context=context): new_picking = None - complete, too_many, too_few = [], [], [] - move_product_qty = {} - prodlot_ids = {} - product_uoms = {} - product_avail = {} + complete, too_few = [], [] + move_product_qty,prodlot_ids, product_uoms, product_avail, partial_qty = {}, {}, {}, {}, {} for move in pick.move_lines: if move.state in ('done', 'cancel'): continue @@ -1176,12 +1173,11 @@ class stock_picking(osv.osv): prodlot_id = partial_data.get('prodlot_id') prodlot_ids[move.id] = prodlot_id product_uoms[move.id] = product_uom - if move.product_qty == product_qty: + partial_qty[move.id] = uom_obj._compute_qty(cr, uid, product_uoms[move.id], product_qty, move.product_uom.id) + if move.product_qty == partial_qty[move.id]: complete.append(move) - elif move.product_qty > product_qty: - too_few.append(move) else: - too_many.append(move) + too_few.append(move) # Average price computation if (pick.type == 'in') and (move.product_id.cost_method == 'average'): product = product_obj.browse(cr, uid, move.product_id.id) @@ -1218,7 +1214,6 @@ class stock_picking(osv.osv): for move in too_few: product_qty = move_product_qty[move.id] - if not new_picking: new_picking = self.copy(cr, uid, pick.id, { @@ -1243,31 +1238,18 @@ class stock_picking(osv.osv): move_obj.write(cr, uid, [move.id], { - 'product_qty' : move.product_qty - product_qty, - 'product_uos_qty':move.product_qty - product_qty, #TODO: put correct uos_qty + 'product_qty' : move.product_qty - partial_qty[move.id], + 'product_uos_qty':move.product_qty - partial_qty[move.id], #TODO: put correct uos_qty }) if new_picking: move_obj.write(cr, uid, [c.id for c in complete], {'picking_id': new_picking}) for move in complete: - defaults = {'product_uom': product_uoms[move.id]} + product_qty = move_product_qty[move.id] + defaults = {'product_uom': product_uoms[move.id],'product_qty': product_qty} if prodlot_ids.get(move.id): defaults.update({'prodlot_id': prodlot_ids[move.id]}) move_obj.write(cr, uid, move.id, defaults) - for move in too_many: - product_qty = move_product_qty[move.id] - defaults = { - 'product_qty' : product_qty, - 'product_uos_qty': product_qty, #TODO: put correct uos_qty - 'product_uom': product_uoms[move.id] - } - prodlot_id = prodlot_ids.get(move.id) - if prodlot_ids.get(move.id): - defaults.update(prodlot_id=prodlot_id) - if new_picking: - defaults.update(picking_id=new_picking) - move_obj.write(cr, uid, [move.id], defaults) - # At first we confirm the new picking (if necessary) if new_picking: From e4e94b12da78bc8b077ea2df79a717f89e77093f Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 14 Apr 2011 14:36:20 +0530 Subject: [PATCH 004/224] [IMP]stock :Fixed:Add proper validation and refector code of do_partial picking bzr revid: ron@tinyerp.com-20110414090620-qx3o3cb5hum36yku --- addons/stock/stock.py | 3 ++- addons/stock/wizard/stock_partial_picking.py | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d0287987afa..7e427e0eef6 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1213,6 +1213,8 @@ class stock_picking(osv.osv): for move in too_few: + if move.product_qty < partial_qty[move.id]: + raise osv.except_osv(_('Error !'), _('You cannot select Quantity %s more then Picking Quantity %s.') % (partial_qty[move.id],move.product_qty,)) product_qty = move_product_qty[move.id] if not new_picking: new_picking = self.copy(cr, uid, pick.id, @@ -1235,7 +1237,6 @@ class stock_picking(osv.osv): if prodlot_id: defaults.update(prodlot_id=prodlot_id) move_obj.copy(cr, uid, move.id, defaults) - move_obj.write(cr, uid, [move.id], { 'product_qty' : move.product_qty - partial_qty[move.id], diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index e03af945604..61ae803d423 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -153,14 +153,15 @@ class stock_partial_picking(osv.osv_memory): for pick in pick_obj.browse(cr, uid, picking_ids, context=context): picking_type = self.get_picking_type(cr, uid, pick, context=context) moves_list = picking_type == 'in' and partial.product_moves_in or partial.product_moves_out - picking_qty = 0.0 - partial_qty = 0.0 - for get_qty in pick.move_lines: - picking_qty += get_qty.product_qty for move in moves_list: - partial_qty += uom_obj._compute_qty(cr, uid, move.product_uom.id, move.quantity, move.product_id.uom_id.id) + picking_qty = 0.0 + partial_qty = 0.0 if move.product_uom.category_id.id <> move.product_id.uom_id.category_id.id: - raise osv.except_osv(_('Error !'), _('You are selected product uom category %s not same with picking product uom Category %s!.') % (move.product_uom.category_id.name,move.product_id.uom_id.category_id.name,)) + raise osv.except_osv(_('Error !'), _('You have selected product uom category %s not same with picking product uom Category %s!.') % (move.product_uom.category_id.name,move.product_id.uom_id.category_id.name,)) + for originalmove in pick.move_lines: + if originalmove.product_id.id == move.product_id.id: + picking_qty += uom_obj._compute_qty(cr, uid, originalmove.product_uom.id, originalmove.product_qty, originalmove.product_id.uom_id.id) + partial_qty += uom_obj._compute_qty(cr, uid, move.product_uom.id, move.quantity, move.product_id.uom_id.id) partial_datas['move%s' % (move.move_id.id)] = { 'product_id': move.id, 'product_qty': move.quantity, @@ -172,8 +173,8 @@ class stock_partial_picking(osv.osv_memory): 'product_price' : move.cost, 'product_currency': move.currency.id, }) - if picking_qty < partial_qty: - raise osv.except_osv(_('Error !'), _('You cannot select Quantity %s more then Picking Quantity %s.') % (partial_qty, picking_qty,)) + if picking_qty < partial_qty: + raise osv.except_osv(_('Error !'), _('You cannot select Quantity %s more then Picking Quantity %s.') % (partial_qty, picking_qty,)) pick_obj.do_partial(cr, uid, picking_ids, partial_datas, context=context) return {'type': 'ir.actions.act_window_close'} From e2f26467617e74fbc40d7ecebfc36893e788728a Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Fri, 15 Apr 2011 16:00:26 +0530 Subject: [PATCH 005/224] [IMP]: stock: Improvement in computation and error messages bzr revid: rpa@tinyerp.com-20110415103026-jcnz0a3gudl8ap3m --- addons/stock/wizard/stock_partial_picking.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 61ae803d423..793c1266b1b 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -154,14 +154,16 @@ class stock_partial_picking(osv.osv_memory): picking_type = self.get_picking_type(cr, uid, pick, context=context) moves_list = picking_type == 'in' and partial.product_moves_in or partial.product_moves_out for move in moves_list: - picking_qty = 0.0 - partial_qty = 0.0 - if move.product_uom.category_id.id <> move.product_id.uom_id.category_id.id: - raise osv.except_osv(_('Error !'), _('You have selected product uom category %s not same with picking product uom Category %s!.') % (move.product_uom.category_id.name,move.product_id.uom_id.category_id.name,)) - for originalmove in pick.move_lines: - if originalmove.product_id.id == move.product_id.id: - picking_qty += uom_obj._compute_qty(cr, uid, originalmove.product_uom.id, originalmove.product_qty, originalmove.product_id.uom_id.id) - partial_qty += uom_obj._compute_qty(cr, uid, move.product_uom.id, move.quantity, move.product_id.uom_id.id) + move_uom = move.move_id.product_uom + process_uom = move.product_uom + if move_uom.category_id.id != process_uom.category_id.id: + raise osv.except_osv(_('Warning'), _('You can not process %s %s as it\'s category is different than category of %s of this move!') % (move.quantity, process_uom.name, move_uom.name)) + if move_uom.factor < process_uom.factor: + raise osv.except_osv(_('Warning'), _('You can not process in UOM"%s" which is smaller than UOM "%s" of the current move.') % (process_uom.name, move_uom.name)) + + toprocess = uom_obj._compute_qty(cr, uid, move.product_uom.id, move.quantity, move.move_id.product_uom.id) + if toprocess > move.move_id.product_qty: + raise osv.except_osv(_('Warning'), _('You can not process "%s %s" as the qty is more than "%s %s" of respective move.') % (toprocess, process_uom.name, move.move_id.product_qty, move_uom.name)) partial_datas['move%s' % (move.move_id.id)] = { 'product_id': move.id, 'product_qty': move.quantity, From c7546b327406c5378a2edeab07453f80946d0f1c Mon Sep 17 00:00:00 2001 From: "Rucha (Open ERP)" Date: Fri, 15 Apr 2011 16:59:29 +0530 Subject: [PATCH 006/224] [FIX]: stock: FIxed warning string values bzr revid: rpa@tinyerp.com-20110415112929-qszbxnz52dxp7tel --- addons/stock/wizard/stock_partial_picking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 793c1266b1b..11ee6d4babb 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -159,11 +159,11 @@ class stock_partial_picking(osv.osv_memory): if move_uom.category_id.id != process_uom.category_id.id: raise osv.except_osv(_('Warning'), _('You can not process %s %s as it\'s category is different than category of %s of this move!') % (move.quantity, process_uom.name, move_uom.name)) if move_uom.factor < process_uom.factor: - raise osv.except_osv(_('Warning'), _('You can not process in UOM"%s" which is smaller than UOM "%s" of the current move.') % (process_uom.name, move_uom.name)) + raise osv.except_osv(_('Warning'), _('You can not process in UOM "%s" which is smaller than UOM "%s" of the current move.') % (process_uom.name, move_uom.name)) toprocess = uom_obj._compute_qty(cr, uid, move.product_uom.id, move.quantity, move.move_id.product_uom.id) if toprocess > move.move_id.product_qty: - raise osv.except_osv(_('Warning'), _('You can not process "%s %s" as the qty is more than "%s %s" of respective move.') % (toprocess, process_uom.name, move.move_id.product_qty, move_uom.name)) + raise osv.except_osv(_('Warning'), _('You can not process "%s %s" as the qty is more than "%s %s" of respective move.') % (move.quantity, process_uom.name, move.move_id.product_qty, move_uom.name)) partial_datas['move%s' % (move.move_id.id)] = { 'product_id': move.id, 'product_qty': move.quantity, From a1008551774d5abe2e70f5504a132dc62344e321 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 15 Apr 2011 18:03:04 +0530 Subject: [PATCH 007/224] [MERGE]:merged with lp:trunk-bug-751222-ron bzr revid: ron@tinyerp.com-20110415123304-4oebtzs7tklkxbap --- addons/stock/wizard/stock_partial_picking.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 11ee6d4babb..245ed38cb80 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -175,8 +175,6 @@ class stock_partial_picking(osv.osv_memory): 'product_price' : move.cost, 'product_currency': move.currency.id, }) - if picking_qty < partial_qty: - raise osv.except_osv(_('Error !'), _('You cannot select Quantity %s more then Picking Quantity %s.') % (partial_qty, picking_qty,)) pick_obj.do_partial(cr, uid, picking_ids, partial_datas, context=context) return {'type': 'ir.actions.act_window_close'} From 54e24571b64031e2d3c5101f3933671c6bd04f2f Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 15 Apr 2011 18:07:07 +0530 Subject: [PATCH 008/224] [IMP]stock:add warning message for quantiny<=0 bzr revid: ron@tinyerp.com-20110415123707-7n06d8vgmbjptqna --- addons/stock/wizard/stock_partial_picking.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 245ed38cb80..a69686eff28 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -156,6 +156,8 @@ class stock_partial_picking(osv.osv_memory): for move in moves_list: move_uom = move.move_id.product_uom process_uom = move.product_uom + if move.quantity <= 0: + raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) if move_uom.category_id.id != process_uom.category_id.id: raise osv.except_osv(_('Warning'), _('You can not process %s %s as it\'s category is different than category of %s of this move!') % (move.quantity, process_uom.name, move_uom.name)) if move_uom.factor < process_uom.factor: From 61ee65d9f0738bd3771911b4a3806a5acc85d373 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 18 Apr 2011 17:52:43 +0530 Subject: [PATCH 009/224] [IMP]stock:Add tooltip for Average costing method bzr revid: ron@tinyerp.com-20110418122243-idxew1aizo6ubzjw --- addons/stock/wizard/stock_partial_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py index 72c151c8ddf..6802bedbf84 100644 --- a/addons/stock/wizard/stock_partial_move.py +++ b/addons/stock/wizard/stock_partial_move.py @@ -45,7 +45,7 @@ class stock_partial_move_memory_out(osv.osv_memory): 'prodlot_id' : fields.many2one('stock.production.lot', 'Production Lot'), 'move_id' : fields.many2one('stock.move', "Move"), 'wizard_id' : fields.many2one('stock.partial.move', string="Wizard"), - 'cost' : fields.float("Cost", help="Unit Cost for this product line"), + 'cost' : fields.float("Cost", help="Unit Cost for this product line per Unit of Measure"), 'currency' : fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed"), 'tracking': fields.function(_tracking, method=True, string='Tracking', type='boolean'), } From 2b83cdfff6cad28301e0956286b178e56792b165 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 27 Apr 2011 16:48:22 +0530 Subject: [PATCH 010/224] [ADD]stock:stock_partial_picking.py ADD comments for increase readability of code bzr revid: ron@tinyerp.com-20110427111822-ow49y4b5l99yeh07 --- addons/stock/wizard/stock_partial_move_view.xml | 7 ++++++- addons/stock/wizard/stock_partial_picking.py | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/addons/stock/wizard/stock_partial_move_view.xml b/addons/stock/wizard/stock_partial_move_view.xml index 02dd63fe5dd..6121e0bab5a 100644 --- a/addons/stock/wizard/stock_partial_move_view.xml +++ b/addons/stock/wizard/stock_partial_move_view.xml @@ -20,7 +20,6 @@ - stock.move.memory.tree stock.move.memory.in @@ -30,6 +29,9 @@ + @@ -64,6 +66,9 @@ + diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index a69686eff28..f1a5ad29dcd 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -156,14 +156,22 @@ class stock_partial_picking(osv.osv_memory): for move in moves_list: move_uom = move.move_id.product_uom process_uom = move.product_uom + #Quantiny must be Positive if move.quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) + + #category id must be same for respective move if move_uom.category_id.id != process_uom.category_id.id: raise osv.except_osv(_('Warning'), _('You can not process %s %s as it\'s category is different than category of %s of this move!') % (move.quantity, process_uom.name, move_uom.name)) + + #Pikcing move product UOM factor must be bigger with respective wizard move product uom factor if move_uom.factor < process_uom.factor: raise osv.except_osv(_('Warning'), _('You can not process in UOM "%s" which is smaller than UOM "%s" of the current move.') % (process_uom.name, move_uom.name)) + #Compute the wizard Quantity for respective move. toprocess = uom_obj._compute_qty(cr, uid, move.product_uom.id, move.quantity, move.move_id.product_uom.id) + + #Compare wizard Quantity with respective picking move quantity if wizard move quantity bigger then it's giving warning. if toprocess > move.move_id.product_qty: raise osv.except_osv(_('Warning'), _('You can not process "%s %s" as the qty is more than "%s %s" of respective move.') % (move.quantity, process_uom.name, move.move_id.product_qty, move_uom.name)) partial_datas['move%s' % (move.move_id.id)] = { From af951d8ed69f2f175f1f9c8c4089e8ad5603c861 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Wed, 29 Jun 2011 12:37:15 +0530 Subject: [PATCH 011/224] [IMP]stock:put attrs in tree view bzr revid: ron@tinyerp.com-20110629070715-034200f7ehabtrph --- addons/stock/wizard/stock_partial_move_view.xml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/addons/stock/wizard/stock_partial_move_view.xml b/addons/stock/wizard/stock_partial_move_view.xml index 6121e0bab5a..461146157cc 100644 --- a/addons/stock/wizard/stock_partial_move_view.xml +++ b/addons/stock/wizard/stock_partial_move_view.xml @@ -29,10 +29,7 @@ - - + @@ -66,10 +63,7 @@ - - + From e5760cd9eb6f5bb212bfcddd761c21ae4b15ee21 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Tue, 13 Sep 2011 11:50:36 +0530 Subject: [PATCH 012/224] [IMP] point_of_sale: Improved Sales Details report. Completed point 3. bzr revid: uco@tinyerp.com-20110913062036-hvod1hestos78k6w --- addons/point_of_sale/report/pos_details.py | 55 +++++++++++-------- addons/point_of_sale/report/pos_details.rml | 18 +++--- .../test/point_of_sale_report.yml | 4 +- addons/point_of_sale/wizard/pos_details.py | 5 +- addons/point_of_sale/wizard/pos_details.xml | 34 +++++++----- 5 files changed, 65 insertions(+), 51 deletions(-) diff --git a/addons/point_of_sale/report/pos_details.py b/addons/point_of_sale/report/pos_details.py index 84f3de8258f..5b25e4a06c1 100644 --- a/addons/point_of_sale/report/pos_details.py +++ b/addons/point_of_sale/report/pos_details.py @@ -24,7 +24,7 @@ from report import report_sxw class pos_details(report_sxw.rml_parse): - def _get_invoice(self,inv_id,user): + def _get_invoice(self,inv_id): res={} if inv_id: self.cr.execute("select name from account_invoice as ac where id = %s", (inv_id,)) @@ -33,15 +33,16 @@ class pos_details(report_sxw.rml_parse): else: return '' - def _pos_sales_details(self,form,user): - data={} + def _pos_sales_details(self,form): + data = {} + user_ids = form['user_ids'] or [self.uid] self.cr.execute ("select po.name as pos_name,po.date_order,pt.name, pp.default_code as code,pol.qty,pu.name as uom,pol.price_unit,pol.discount,po.invoice_id,sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as Total " \ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt,product_uom as pu,res_users as ru,res_company as rc " \ "where pt.id=pp.product_tmpl_id and pu.id=pt.uom_id and pp.id=pol.product_id and po.id = pol.order_id and po.state IN ('done','paid','invoiced') " \ "and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date >= %s and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date <= %s " \ - "and po.user_id = ru.id and rc.id = %s and ru.id = %s " \ + "and po.user_id = ru.id and rc.id = po.company_id and ru.id IN %s " \ "group by po.name,pol.qty,po.date_order,pt.name,pp.default_code,pu.name,pol.price_unit,pol.discount,po.invoice_id " \ - ,(form['date_start'],form['date_end'],str(user.company_id.id),str(self.uid))) + ,(form['date_start'],form['date_end'],tuple(user_ids))) data=self.cr.dictfetchall() if data: for d in data: @@ -51,58 +52,62 @@ class pos_details(report_sxw.rml_parse): else: return {} - def _get_qty_total_2(self, form,user): + def _get_qty_total_2(self, form): qty=[] + user_ids = form['user_ids'] or [self.uid] self.cr.execute("select sum(pol.qty) as qty " \ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt,res_users as ru,res_company as rc " \ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and po.state IN ('done','paid','invoiced') " \ " and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date >= %s and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date <= %s " \ - "and po.user_id = ru.id and rc.id = %s and ru.id = %s " \ - ,(form['date_start'],form['date_end'],str(user.company_id.id),str(self.uid))) + "and po.user_id = ru.id and rc.id = po.company_id and ru.id IN %s " \ + ,(form['date_start'],form['date_end'],tuple(user_ids))) qty = self.cr.fetchone() return qty[0] or 0.00 - def _get_sales_total_2(self, form,user): + def _get_sales_total_2(self, form): self.cr.execute("select sum((pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))) as Total " \ "from pos_order_line as pol, pos_order po, product_product as pp,product_template as pt " \ - " where po.company_id='%s' and po.id=pol.order_id and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date >= '%s' " \ + " where po.id=pol.order_id and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date >= '%s' " \ " and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date <= '%s' and po.state IN ('paid','invoiced','done') " \ - " and pt.id=pp.product_tmpl_id and pol.product_id=pp.id"% (str(user.company_id.id),form['date_start'],form['date_end'])) + " and pt.id=pp.product_tmpl_id and pol.product_id=pp.id"% (form['date_start'],form['date_end'])) res2=self.cr.fetchone() return res2 and res2[0] or 0.0 - def _get_sum_invoice_2(self,form,user): + def _get_sum_invoice_2(self,form): res2=[] + user_ids = form['user_ids'] or [self.uid] self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))" \ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt, res_users as ru,res_company as rc,account_invoice as ai " \ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and ai.id=po.invoice_id " \ "and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date >= %s and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date <= %s " \ - "and po.user_id = ru.id and rc.id = %s and ru.id = %s " \ - ,(form['date_start'],form['date_end'],str(user.company_id.id),str(self.uid))) + "and po.user_id = ru.id and rc.id = po.company_id and ru.id IN %s " \ + ,(form['date_start'],form['date_end'],tuple(user_ids))) res2=self.cr.fetchone() self.total_invoiced=res2[0] return res2[0] or False - def _paid_total_2(self,form,user): + def _paid_total_2(self,form): res3=[] + user_ids = form['user_ids'] or [self.uid] self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0))" \ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt, res_users as ru,res_company as rc " \ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and po.state IN ('paid','invoiced','done') " \ "and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date >= %s and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date <= %s " \ - "and po.user_id = ru.id and rc.id = %s and ru.id = %s " \ - ,(form['date_start'],form['date_end'],str(user.company_id.id),str(self.uid))) + "and po.user_id = ru.id and rc.id = po.company_id and ru.id IN %s " \ + ,(form['date_start'],form['date_end'],tuple(user_ids))) res3=self.cr.fetchone() self.total_paid=res3[0] return res3[0] or False - def _get_sum_dis_2(self,form,user): + def _get_sum_dis_2(self,form): res4=[] + user_ids = form['user_ids'] or [self.uid] self.cr.execute ("select sum(pol.price_ded * pol.qty)" \ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt, res_users as ru,res_company as rc " \ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po.id = pol.order_id and po.state IN ('paid') " \ "and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date >= %s and to_char(date_trunc('day',po.date_order),'YYYY-MM-DD')::date <= %s " \ - "and po.user_id = ru.id and rc.id = %s and ru.id = %s " \ - ,(form['date_start'],form['date_end'],str(user.company_id.id),str(self.uid))) + "and po.user_id = ru.id and rc.id = po.company_id and ru.id IN %s " \ + ,(form['date_start'],form['date_end'],tuple(user_ids))) res4=self.cr.fetchone() self.total_invoiced=res4[0] return res4[0] or False @@ -118,10 +123,11 @@ class pos_details(report_sxw.rml_parse): objects, 0.0) - def _get_payments(self, form,user): + def _get_payments(self, form): statement_line_obj = self.pool.get("account.bank.statement.line") pos_order_obj = self.pool.get("pos.order") - pos_ids=pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','=',self.uid)]) + user_ids = form['user_ids'] or [self.uid] + pos_ids=pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','in',user_ids)]) data={} if pos_ids: st_line_ids = statement_line_obj.search(self.cr, self.uid, [('pos_statement_id', 'in', pos_ids)]) @@ -164,13 +170,14 @@ class pos_details(report_sxw.rml_parse): def _strip_name(self, name, maxlen=50): return self._ellipsis(name, maxlen, ' ...') - def _get_tax_amount(self, form,user): + def _get_tax_amount(self, form): res = {} temp={} list_ids = [] temp2 = 0.0 + user_ids = form['user_ids'] or [self.uid] pos_order_obj = self.pool.get("pos.order") - pos_ids = pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','=',self.uid)]) + pos_ids = pos_order_obj.search(self.cr, self.uid, [('date_order','>=',form['date_start'] + ' 00:00:00'),('date_order','<=',form['date_end'] + ' 23:59:59'),('state','in',['paid','invoiced','done']),('user_id','in',user_ids)]) temp.update({'name':''}) for order in pos_order_obj.browse(self.cr, self.uid, pos_ids): temp2 +=order.amount_tax diff --git a/addons/point_of_sale/report/pos_details.rml b/addons/point_of_sale/report/pos_details.rml index 7aa2c3a8ea0..fa97bea108c 100644 --- a/addons/point_of_sale/report/pos_details.rml +++ b/addons/point_of_sale/report/pos_details.rml @@ -225,7 +225,7 @@
- [[ repeatIn(pos_sales_details(data['form'],user), 'line_ids') ]] + [[ repeatIn(pos_sales_details(data['form']), 'line_ids') ]] @@ -247,7 +247,7 @@ [[ formatLang(line_ids['discount'], dp='Sale Price') ]] - [[ getinvoice(line_ids['invoice_id'],user) or removeParentNode('font') ]] + [[ getinvoice(line_ids['invoice_id']) or removeParentNode('font') ]] @@ -268,7 +268,7 @@
- [[ repeatIn(gettaxamount(data['form'],user), 'p')]] + [[ repeatIn(gettaxamount(data['form']), 'p')]] @@ -299,7 +299,7 @@
- [[ repeatIn(getpayments(data['form'],user), 'p') ]] + [[ repeatIn(getpayments(data['form']), 'p') ]] @@ -335,7 +335,7 @@ Sales total(Revenue) - [[ formatLang(getsalestotal2(data['form'],user), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsalestotal2(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]] @@ -343,7 +343,7 @@ Qty of product - [[ formatLang(getqtytotal2(data['form'],user)) ]] + [[ formatLang(getqtytotal2(data['form'])) ]] @@ -351,7 +351,7 @@ Total invoiced - [[ formatLang(getsuminvoice2(data['form'],user), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsuminvoice2(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]] @@ -359,7 +359,7 @@ Total discount - [[ formatLang(getsumdisc(data['form'],user), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(getsumdisc(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]] @@ -367,7 +367,7 @@ Total paid - [[ formatLang(getpaidtotal2(data['form'],user), dp='Sale Price') ]] [[ company.currency_id.symbol ]] + [[ formatLang(getpaidtotal2(data['form']), dp='Sale Price') ]] [[ company.currency_id.symbol ]] diff --git a/addons/point_of_sale/test/point_of_sale_report.yml b/addons/point_of_sale/test/point_of_sale_report.yml index b821dc899df..5ff8a143384 100644 --- a/addons/point_of_sale/test/point_of_sale_report.yml +++ b/addons/point_of_sale/test/point_of_sale_report.yml @@ -70,7 +70,7 @@ import time ctx={} ctx.update({'model': 'ir.ui.menu','active_ids': []}) - data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d')} + data_dict = {'date_start': time.strftime('%Y-%m-%d'), 'date_end': time.strftime('%Y-%m-%d'), 'user_ids': [(6,0,[ref('base.user_root')])]} from tools import test_reports test_reports.try_report_action(cr, uid, 'action_report_pos_details',wiz_data=data_dict, context=ctx, our_module='point_of_sale') @@ -93,7 +93,7 @@ journal_id: account_journal_cash0 line_ids: - name: statement - date: !eval "(datetime.now() + timedelta(5*31)).strftime('%Y-%m-%d')" + date: !eval "(datetime.now() + timedelta(5*31)).strftime('%Y-%m-%d')" type: customer account_id: account_pos_account_sales amount: 100 diff --git a/addons/point_of_sale/wizard/pos_details.py b/addons/point_of_sale/wizard/pos_details.py index c6793b7b437..acf7738dbfe 100644 --- a/addons/point_of_sale/wizard/pos_details.py +++ b/addons/point_of_sale/wizard/pos_details.py @@ -29,7 +29,8 @@ class pos_details(osv.osv_memory): _columns = { 'date_start': fields.date('Date Start', required=True), - 'date_end': fields.date('Date End', required=True) + 'date_end': fields.date('Date End', required=True), + 'user_ids': fields.many2many('res.users', 'sale_user_rel', 'user_id', 'uid', 'Salesman'), } _defaults = { 'date_start': lambda *a: time.strftime('%Y-%m-%d'), @@ -48,7 +49,7 @@ class pos_details(osv.osv_memory): if context is None: context = {} datas = {'ids': context.get('active_ids', [])} - res = self.read(cr, uid, ids, ['date_start', 'date_end'], context=context) + res = self.read(cr, uid, ids, ['date_start', 'date_end', 'user_ids'], context=context) res = res and res[0] or {} datas['form'] = res if res.get('id',False): diff --git a/addons/point_of_sale/wizard/pos_details.xml b/addons/point_of_sale/wizard/pos_details.xml index f283139b058..0b70b3ae2eb 100644 --- a/addons/point_of_sale/wizard/pos_details.xml +++ b/addons/point_of_sale/wizard/pos_details.xml @@ -1,23 +1,29 @@ - + - + POS Details pos.details form -
- - - - - + From dd79eb534b9a58e2fc54435c9ebe43f30ba00baa Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 27 Dec 2011 20:44:05 +0100 Subject: [PATCH 116/224] [IMP] initial module loading improvements bzr revid: al@openerp.com-20111227194405-rz3kxbib03orbpr8 --- addons/web/static/src/js/boot.js | 8 ++++---- addons/web/static/src/js/core.js | 8 +++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/addons/web/static/src/js/boot.js b/addons/web/static/src/js/boot.js index c2aea24276b..282435f2a71 100644 --- a/addons/web/static/src/js/boot.js +++ b/addons/web/static/src/js/boot.js @@ -22,20 +22,20 @@ * @param {Array} modules list of modules to initialize */ init: function(modules) { + // By default only web will be loaded, the rest will be by loaded + // by openerp.web.Connection on the first session_authenticate + modules = modules || ["web"]; var new_instance = { // links to the global openerp _openerp: openerp, - // Only web will be loaded, the rest will be by loaded by - // openerp.web.Connection on the first connection - _modules_loaded: false, // this unique id will be replaced by hostname_databasename by // openerp.web.Connection on the first connection _session_id: "session" + session_counter++, + _modules: modules, web: {}, web_mobile: {} }; openerp.sessions[new_instance._session_id] = new_instance; - modules = modules || ["web"]; for(var i=0; i < modules.length; i++) { openerp[modules[i]](new_instance); } diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 646b71834c9..1554127e2e6 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -553,9 +553,10 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp. user_context: result.context, openerp_entreprise: result.openerp_entreprise }); - var deferred = self.do_load_qweb(['/web/webclient/qweb']); + var modules = openerp._modules.join(','); + var deferred = self.rpc('/web/webclient/qweblist', {mods: modules}).pipe(self.do_load_qweb); if(self.session_is_valid()) { - return deferred.pipe(_.bind(function() { this.load_modules(); }, self)); + return deferred.pipe(function() { self.load_modules(); }); } return deferred; }); @@ -636,9 +637,6 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp. */ load_modules: function() { var self = this; - if(openerp._modules_loaded) { - return $.when(); - } return this.rpc('/web/session/modules', {}).pipe(function(result) { self.module_list = result; var lang = self.user_context.lang; From c5359c5d0a59d07ff409e47221a7d0dec7477299 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 27 Dec 2011 20:54:00 +0100 Subject: [PATCH 117/224] [FIX] edi loading bzr revid: al@openerp.com-20111227195400-oxt3rmx3fn36hf6n --- addons/edi/controllers/main.py | 4 ++-- addons/edi/static/src/js/edi.js | 33 ++++++++++++++++++++------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/addons/edi/controllers/main.py b/addons/edi/controllers/main.py index 83c3a1608e9..fef91df3d54 100644 --- a/addons/edi/controllers/main.py +++ b/addons/edi/controllers/main.py @@ -23,14 +23,14 @@ class EDI(openerpweb.Controller): @openerpweb.httprequest def view(self, req, db, token): d = self.template(req) - d["init"] = 'new s.edi.EdiView(null,"%s","%s").appendTo($("body"));'%(db,token) + d["init"] = 's.edi.edi_view("%s","%s");'%(db,token) r = web.controllers.main.html_template % d return r @openerpweb.httprequest def import_url(self, req, url): d = self.template(req) - d["init"] = 'new s.edi.EdiImport(null,"%s").appendTo($("body"));'%(url) + d["init"] = 's.edi.edi_import("%s");'%(url) r = web.controllers.main.html_template % d return r diff --git a/addons/edi/static/src/js/edi.js b/addons/edi/static/src/js/edi.js index cef30842362..73bcfa267e5 100644 --- a/addons/edi/static/src/js/edi.js +++ b/addons/edi/static/src/js/edi.js @@ -14,8 +14,8 @@ openerp.edi.EdiView = openerp.web.Widget.extend({ start: function() { this._super(); var self = this; - var param = {"db": this.db, "token": this.token}; - this.session.bind().then(self.rpc('/edi/get_edi_document', param, this.on_document_loaded, this.on_document_failed)); + var param = {"db": self.db, "token": self.token}; + return self.rpc('/edi/get_edi_document', param, this.on_document_loaded, this.on_document_failed); }, on_document_loaded: function(docs){ this.doc = docs[0]; @@ -107,6 +107,12 @@ openerp.edi.EdiView = openerp.web.Widget.extend({ } }); +openerp.edi.edi_view = function (db, token) { + openerp.connection.bind().then(function () { + new openerp.edi.EdiView(null,db,token).appendTo($("body")); + }); +} + openerp.edi.EdiImport = openerp.web.Widget.extend({ init: function(parent,url) { this._super(); @@ -117,18 +123,13 @@ openerp.edi.EdiImport = openerp.web.Widget.extend({ this.session = openerp.connection; this.login = new openerp.web.Login(this); this.header = new openerp.web.Header(this); - this.header.on_logout.add(this.login.on_logout); }, start: function() { - this.session.bind().then(function() { - this.session.on_session_invalid.add_last(this.do_ask_login) - this.header.appendTo($("#oe_header")); - this.login.appendTo($('#oe_login')); - this.do_import(); - }); - }, - do_ask_login: function() { - this.login.do_ask_login(this.do_import); + // TODO fix by explicitly asking login if needed + //this.session.on_session_invalid.add_last(this.do_ask_login); + this.header.appendTo($("#oe_header")); + this.login.appendTo($('#oe_login')); + this.do_import(); }, do_import: function() { this.rpc('/edi/import_edi_url', {url: this.url}, this.on_imported, this.on_imported_error); @@ -159,7 +160,7 @@ openerp.edi.EdiImport = openerp.web.Widget.extend({ msg += "\n Reason:" + response.data.fault_code; } var params = {error: response, message: msg}; - $(openerp.web.qweb.render("DialogWarning", params)).dialog({ + $(openerp.web.qweb.render("CrashManagerWarning", params)).dialog({ title: "Document Import Notification", modal: true, buttons: { @@ -169,5 +170,11 @@ openerp.edi.EdiImport = openerp.web.Widget.extend({ } }); +openerp.edi.edi_import = function (url) { + openerp.connection.bind().then(function () { + new openerp.edi.EdiImport(null,url).appendTo($("body")); + }); +} + } // vim:et fdc=0 fdl=0 foldnestmax=3 fdm=syntax: From 76fa5eda36abd38b62f8efef5b9a9fcc260bf1e1 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 27 Dec 2011 21:36:18 +0100 Subject: [PATCH 118/224] [FIX] share fix and restore if_has_share bzr revid: al@openerp.com-20111227203618-xzmeix809f2smniv --- addons/share/static/src/js/share.js | 50 +++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/addons/share/static/src/js/share.js b/addons/share/static/src/js/share.js index a760f41f1c8..05f45aaef42 100644 --- a/addons/share/static/src/js/share.js +++ b/addons/share/static/src/js/share.js @@ -1,12 +1,12 @@ -openerp.share = function(instance) { +openerp.share = function(session) { function launch_wizard(self, view, user_type) { var action = view.widget_parent.action; - var Share = new instance.web.DataSet(self, 'share.wizard', view.dataset.get_context()); - var domain = new instance.web.CompoundDomain(view.dataset.domain); + var Share = new session.web.DataSet(self, 'share.wizard', view.dataset.get_context()); + var domain = new session.web.CompoundDomain(view.dataset.domain); if (view.fields_view.type == 'form') { - domain = new instance.web.CompoundDomain(domain, [['id', '=', view.datarecord.id]]); + domain = new session.web.CompoundDomain(domain, [['id', '=', view.datarecord.id]]); } self.rpc('/web/session/eval_domain_and_context', { domains: [domain], @@ -28,15 +28,33 @@ function launch_wizard(self, view, user_type) { }); } -instance.web.Sidebar = instance.web.Sidebar.extend({ +function has_share(yes, no) { + if (!session.connection.share_flag) { + session.connection.share_flag = $.Deferred(function() { + var func = new session.web.Model("share.wizard").get_func("has_share"); + func(session.connection.uid).pipe(function(res) { + if(res) { + session.connection.share_flag.resolve(); + } else { + session.connection.share_flag.reject(); + } + }); + }); + } + session.connection.share_flag.done(yes).fail(no); +} + +session.web.Sidebar = session.web.Sidebar.extend({ add_default_sections: function() { this._super(); var self = this; - self.add_items('other', [{ - label: 'Share', - callback: self.on_sidebar_click_share, - classname: 'oe-share', - }]); + has_share(function() { + self.add_items('other', [{ + label: 'Share', + callback: self.on_sidebar_click_share, + classname: 'oe-share', + }]); + }); }, on_sidebar_click_share: function(item) { var view = this.widget_parent @@ -44,11 +62,16 @@ instance.web.Sidebar = instance.web.Sidebar.extend({ }, }); -instance.web.ViewManagerAction.include({ +session.web.ViewManagerAction.include({ start: function() { var self = this; - self.$element.find('a.oe-share_link').click(self.on_click_share_link); - self.$element.find('a.oe-share').click(self.on_click_share); + has_share(function() { + self.$element.find('a.oe-share_link').click(self.on_click_share_link); + self.$element.find('a.oe-share').click(self.on_click_share); + }, function() { + self.$element.find('a.oe-share_link').remove(); + self.$element.find('a.oe-share').remove(); + }); return this._super.apply(this, arguments); }, on_click_share_link: function(e) { @@ -62,3 +85,4 @@ instance.web.ViewManagerAction.include({ }); }; + From 9985eeca4b9ae70cedd0c2824f56d3f3a55fd6c9 Mon Sep 17 00:00:00 2001 From: Serpent Consulting Services Date: Wed, 28 Dec 2011 02:27:42 +0530 Subject: [PATCH 119/224] [FIX] Base_contact : Correction over the domain for contacts lp bug: https://launchpad.net/bugs/909147 fixed bzr revid: support@serpentcs.com-20111227205742-umw4yb3uwu2ztm73 --- addons/base_contact/base_contact.py | 6 ++++-- addons/base_contact/base_contact_view.xml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/base_contact/base_contact.py b/addons/base_contact/base_contact.py index 313ba3189f9..40653f01ff3 100644 --- a/addons/base_contact/base_contact.py +++ b/addons/base_contact/base_contact.py @@ -169,7 +169,8 @@ class res_partner_address(osv.osv): _inherit = 'res.partner.address' def _default_location_id(self, cr, uid, context=None): - context = context or {} + if context is None: + context = {} if not context.get('default_partner_id',False): return False ids = self.pool.get('res.partner.location').search(cr, uid, [('partner_id','=',context['default_partner_id'])], context=context) @@ -242,7 +243,8 @@ class res_partner_address(osv.osv): } def default_get(self, cr, uid, fields=[], context=None): - context = context or {} + if context is None: + context = {} if 'default_type' in context: del context['default_type'] return super(res_partner_address, self).default_get(cr, uid, fields, context) diff --git a/addons/base_contact/base_contact_view.xml b/addons/base_contact/base_contact_view.xml index 475d85a5c1e..10d8de984c2 100644 --- a/addons/base_contact/base_contact_view.xml +++ b/addons/base_contact/base_contact_view.xml @@ -91,7 +91,7 @@ + filter_domain="['|', ('first_name','ilike', self), ('last_name', 'ilike', self)]"/> From 3ca07993d729d0ee28fa69b3d5b79333c4950c35 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 27 Dec 2011 22:40:11 +0100 Subject: [PATCH 120/224] [FIX] template rename bzr revid: al@openerp.com-20111227214011-lbg947ggehoh1alr --- addons/web/static/src/js/view_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 5619f42f269..0b93ad6bebb 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -356,7 +356,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView# this.on_form_changed(); } if (!_.isEmpty(result.warning)) { - $(QWeb.render("DialogWarning", result.warning)).dialog({ + $(QWeb.render("CrashManagerWarning", result.warning)).dialog({ modal: true, buttons: [ {text: _t("Ok"), click: function() { $(this).dialog("close"); }} From 41218715bdcdbbe0b5c34026caaea79bf3c624f5 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Tue, 27 Dec 2011 23:39:44 +0100 Subject: [PATCH 121/224] [FIX] cron mktime should be timegm bzr revid: al@openerp.com-20111227223944-jk1humfvon1kqw59 --- openerp/addons/base/ir/ir_cron.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/ir/ir_cron.py b/openerp/addons/base/ir/ir_cron.py index af46b0ef3e0..6a4adbd2026 100644 --- a/openerp/addons/base/ir/ir_cron.py +++ b/openerp/addons/base/ir/ir_cron.py @@ -19,6 +19,7 @@ # ############################################################################## +import calendar import time import logging import threading @@ -174,7 +175,7 @@ class ir_cron(osv.osv): if numbercall: # Reschedule our own main cron thread if necessary. # This is really needed if this job runs longer than its rescheduling period. - nextcall = time.mktime(nextcall.timetuple()) + nextcall = calendar.timegm(nextcall.timetuple()) openerp.cron.schedule_wakeup(nextcall, cr.dbname) finally: cr.commit() @@ -251,7 +252,7 @@ class ir_cron(osv.osv): next_call = cr.dictfetchone()['min_next_call'] if next_call: - next_call = time.mktime(time.strptime(next_call, DEFAULT_SERVER_DATETIME_FORMAT)) + next_call = calendar.timegm(time.strptime(next_call, DEFAULT_SERVER_DATETIME_FORMAT)) else: # no matching cron job found in database, re-schedule arbitrarily in 1 day, # this delay will likely be modified when running jobs complete their tasks From 031ecd675caaa87481768edc197df51c23486f96 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Wed, 28 Dec 2011 05:21:36 +0000 Subject: [PATCH 122/224] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20111228052112-def190p3malaw3hc bzr revid: launchpad_translations_on_behalf_of_openerp-20111228052136-390v7hxkz4nu1x1g --- addons/analytic/i18n/sr@latin.po | 83 ++++++++++--------- .../i18n/sr@latin.po | 26 +++--- .../analytic_user_function/i18n/sr@latin.po | 20 +++-- addons/association/i18n/sr@latin.po | 49 +++++------ addons/product/i18n/hr.po | 8 +- openerp/addons/base/i18n/ar.po | 22 +++-- 6 files changed, 113 insertions(+), 95 deletions(-) diff --git a/addons/analytic/i18n/sr@latin.po b/addons/analytic/i18n/sr@latin.po index 696d1cb8470..402fe1a2760 100644 --- a/addons/analytic/i18n/sr@latin.po +++ b/addons/analytic/i18n/sr@latin.po @@ -8,24 +8,24 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-12-22 18:44+0000\n" -"PO-Revision-Date: 2010-12-23 16:22+0000\n" -"Last-Translator: OpenERP Administrators \n" +"PO-Revision-Date: 2011-12-27 16:12+0000\n" +"Last-Translator: Milan Milosevic \n" "Language-Team: Serbian latin \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-12-23 07:17+0000\n" +"X-Launchpad-Export-Date: 2011-12-28 05:21+0000\n" "X-Generator: Launchpad (build 14560)\n" #. module: analytic #: field:account.analytic.account,child_ids:0 msgid "Child Accounts" -msgstr "Podređeni Nalozi" +msgstr "Podređeni nalozi" #. module: analytic #: field:account.analytic.account,name:0 msgid "Account Name" -msgstr "Naziv Naloga" +msgstr "Naziv naloga" #. module: analytic #: help:account.analytic.line,unit_amount:0 @@ -70,26 +70,26 @@ msgid "" " If it is to be reviewed then the state is 'Pending'.\n" " When the project is completed the state is set to 'Done'." msgstr "" -"*Kada je neka faktura kreirana a nalazi se u ' U Toku'. " -" \n" -"*Ako je bilo koji asocirani partner tamo, on mora biti u stanju ' Otvoren'. " -" \n" -"*Ako je bilo koji Saldo u stanju 'U izvrsenju' on mora i biti tamo. " -" " +"*kada je nalog napravljen, stanje mu je 'U pripremi' " +" \n" +"*Ako postoji bilo koji partner, može bitu u stanju 'Otvoren' " +" \n" +"*Ako postoji balans na čekanju, može biti 'Na čekanju' " +" \n" +"*I , na kraju, kada su sve transakcije gotove, biće u stanju ' Zatvoreno'. " +" " "\n" -"*I , na kraju kada su sve transakcije gotove, mora se naci u stanju ' " -"Zatvoreno'. " -" \n" -" Ako je ovo shema(obrazac) onda mi mozemo napraviri projekat baziran na " -"istom. Ako je u stanju ' U izvrsenju' to je normalnan\n" +"*Projekat može biti bilo gde ako su mu stanja 'U toku' i 'U pripremi'\n" +" Ako je ovo obrazac, onda možemo napraviti projekat baziran na njima. Ako je " +"u stanju ' U toku' to je normalnan\n" "projekat.\n" -" Ako zelimo da ga pregledamo, stanje mora biti ' U Toku'.\n" -" Kada je projekat zavrsen stanje je postavljeno na ' Zavrseno'." +" Ako želimo da ga pregledamo, stanje mora biti ' U Toku'.\n" +" Kada je projekat završen stanje je postavljeno na ' Završeno'." #. module: analytic #: selection:account.analytic.account,state:0 msgid "New" -msgstr "" +msgstr "Novo" #. module: analytic #: field:account.analytic.account,type:0 @@ -99,7 +99,7 @@ msgstr "Vrsta konta" #. module: analytic #: selection:account.analytic.account,state:0 msgid "Pending" -msgstr "U toku" +msgstr "Na čekanju" #. module: analytic #: model:ir.model,name:analytic.model_account_analytic_line @@ -115,7 +115,7 @@ msgstr "Opis" #. module: analytic #: selection:account.analytic.account,type:0 msgid "Normal" -msgstr "Normalan" +msgstr "Normalno" #. module: analytic #: field:account.analytic.account,company_id:0 @@ -134,6 +134,11 @@ msgid "" "consolidation purposes of several companies charts with different " "currencies, for example." msgstr "" +"Ako odredite kompaniju, izabrana valuta mora biti ista kao valuta preduzeća. " +"\n" +"Možete ukloniti preduzeće i tako izmeniti valutu, samo na analitičkom kontu " +"tipa 'pregled'. Ovo može biti zaista korisno iz razloga konsolidacije tabela " +"nekoliko preduzeća s raznim valutama, na primer." #. module: analytic #: field:account.analytic.line,user_id:0 @@ -153,7 +158,7 @@ msgstr "Datum" #. module: analytic #: selection:account.analytic.account,state:0 msgid "Template" -msgstr "Šablon" +msgstr "Obrazac" #. module: analytic #: field:account.analytic.account,quantity:0 @@ -167,18 +172,18 @@ msgid "" "Calculated by multiplying the quantity and the price given in the Product's " "cost price. Always expressed in the company main currency." msgstr "" -"Izracunato mnozenjem kolicine i cene date u proizvodovom cenovniku. Uvek " -"prikazano u osnovnoj valuti preduzeca." +"Izračunato množenjem količine i cene datim u cenovniku proizvoda. Uvek " +"izraženo u osnovnoj valuti preduzeća." #. module: analytic #: field:account.analytic.account,child_complete_ids:0 msgid "Account Hierarchy" -msgstr "" +msgstr "Hijerarhija naloga" #. module: analytic #: help:account.analytic.account,quantity_max:0 msgid "Sets the higher limit of time to work on the contract." -msgstr "" +msgstr "Postavlja višu granicu vremena za rad na ugovoru." #. module: analytic #: field:account.analytic.account,credit:0 @@ -200,12 +205,12 @@ msgstr "Kontakt" msgid "" "Error! The currency has to be the same as the currency of the selected " "company" -msgstr "" +msgstr "Greška! Valuta mora biti ista kao i valuta izabranog preduzeća" #. module: analytic #: field:account.analytic.account,code:0 msgid "Code/Reference" -msgstr "" +msgstr "Kod/Poziv na broj" #. module: analytic #: selection:account.analytic.account,state:0 @@ -216,17 +221,17 @@ msgstr "Otkazano" #: code:addons/analytic/analytic.py:138 #, python-format msgid "Error !" -msgstr "" +msgstr "Greska !" #. module: analytic #: field:account.analytic.account,balance:0 msgid "Balance" -msgstr "Saldo" +msgstr "Balans" #. module: analytic #: constraint:account.analytic.account:0 msgid "Error! You can not create recursive analytic accounts." -msgstr "" +msgstr "Greška! Ne možete praviti rekurzivne analitičke naloge." #. module: analytic #: help:account.analytic.account,type:0 @@ -234,23 +239,23 @@ msgid "" "If you select the View Type, it means you won't allow to create journal " "entries using that account." msgstr "" -"Ukoliko izaberete PREGLED, to znaci da ne zelite da kreirate sadrzaj " -"dnevnika, koristeci taj nalog." +"Ako izaberete Pregled, znači da ne zelite dozvoliti pravljenje sadržaja " +"dnevnika koristeći taj nalog." #. module: analytic #: field:account.analytic.account,date:0 msgid "Date End" -msgstr "Završni datum" +msgstr "Datum završetka" #. module: analytic #: field:account.analytic.account,quantity_max:0 msgid "Maximum Time" -msgstr "" +msgstr "Maksimalno vreme" #. module: analytic #: model:res.groups,name:analytic.group_analytic_accounting msgid "Analytic Accounting" -msgstr "" +msgstr "Analitičko računovodstvo" #. module: analytic #: field:account.analytic.account,complete_name:0 @@ -266,12 +271,12 @@ msgstr "Analitički konto" #. module: analytic #: field:account.analytic.account,currency_id:0 msgid "Currency" -msgstr "" +msgstr "Valuta" #. module: analytic #: constraint:account.analytic.line:0 msgid "You can not create analytic line on view account." -msgstr "" +msgstr "Ne možete napraviti analitički red na pregledu naloga." #. module: analytic #: selection:account.analytic.account,type:0 @@ -286,7 +291,7 @@ msgstr "Partner" #. module: analytic #: field:account.analytic.account,date_start:0 msgid "Date Start" -msgstr "Početni datum" +msgstr "Datum početka" #. module: analytic #: selection:account.analytic.account,state:0 diff --git a/addons/analytic_journal_billing_rate/i18n/sr@latin.po b/addons/analytic_journal_billing_rate/i18n/sr@latin.po index 4e467a41343..5a5f0e4eca7 100644 --- a/addons/analytic_journal_billing_rate/i18n/sr@latin.po +++ b/addons/analytic_journal_billing_rate/i18n/sr@latin.po @@ -8,24 +8,24 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-12-22 18:44+0000\n" -"PO-Revision-Date: 2010-12-23 15:16+0000\n" -"Last-Translator: Olivier Dony (OpenERP) \n" +"PO-Revision-Date: 2011-12-27 15:53+0000\n" +"Last-Translator: Milan Milosevic \n" "Language-Team: Serbian latin \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-12-23 07:07+0000\n" +"X-Launchpad-Export-Date: 2011-12-28 05:21+0000\n" "X-Generator: Launchpad (build 14560)\n" #. module: analytic_journal_billing_rate #: sql_constraint:account.invoice:0 msgid "Invoice Number must be unique per Company!" -msgstr "" +msgstr "Broj fakture mora biti jedinstven po kompaniji" #. module: analytic_journal_billing_rate #: field:analytic_journal_rate_grid,journal_id:0 msgid "Analytic Journal" -msgstr "Analiticki Dnevnik" +msgstr "Analitički dnevnik" #. module: analytic_journal_billing_rate #: model:ir.model,name:analytic_journal_billing_rate.model_account_invoice @@ -35,12 +35,12 @@ msgstr "Faktura" #. module: analytic_journal_billing_rate #: constraint:account.invoice:0 msgid "Invalid BBA Structured Communication !" -msgstr "" +msgstr "Nepravilno BBA struktuirana komunikacija !" #. module: analytic_journal_billing_rate #: view:analytic_journal_rate_grid:0 msgid "Billing Rate per Journal for this Analytic Account" -msgstr "Stepen naplate po Dnevniku za ovaj Analiticki Konto" +msgstr "Stepen naplate po Dnevniku za ovaj Analitički Konto" #. module: analytic_journal_billing_rate #: field:analytic_journal_rate_grid,account_id:0 @@ -51,7 +51,7 @@ msgstr "Analitički konto" #. module: analytic_journal_billing_rate #: model:ir.model,name:analytic_journal_billing_rate.model_analytic_journal_rate_grid msgid "Relation table between journals and billing rates" -msgstr "Relaciona tabela izmedju dnevnika i stepena naplate" +msgstr "Tabela odnosa između dnevnika i stepenova naplate" #. module: analytic_journal_billing_rate #: field:account.analytic.account,journal_rate_ids:0 @@ -63,27 +63,29 @@ msgstr "Stepen fakturiranja po Dnevniku" msgid "" "Error! The currency has to be the same as the currency of the selected " "company" -msgstr "" +msgstr "Greška! Valuta mora biti ista kao i valuta izabranog preduzeća" #. module: analytic_journal_billing_rate #: constraint:hr.analytic.timesheet:0 msgid "You cannot modify an entry in a Confirmed/Done timesheet !." msgstr "" +"Ne možete izmeniti unos u kontrolnoj kartici obeleženim kao " +"Potvrđenim/Završenim" #. module: analytic_journal_billing_rate #: field:analytic_journal_rate_grid,rate_id:0 msgid "Invoicing Rate" -msgstr "Fakturisanje cene" +msgstr "Stepen fakturisanja" #. module: analytic_journal_billing_rate #: constraint:account.analytic.account:0 msgid "Error! You can not create recursive analytic accounts." -msgstr "" +msgstr "Greška! Ne možete praviti rekurzivne analitičke naloge." #. module: analytic_journal_billing_rate #: model:ir.model,name:analytic_journal_billing_rate.model_hr_analytic_timesheet msgid "Timesheet Line" -msgstr "Timesheet Linija" +msgstr "Niz kontrolne kartice" #~ msgid "Invalid XML for View Architecture!" #~ msgstr "Nevažeći XML za pregled arhitekture" diff --git a/addons/analytic_user_function/i18n/sr@latin.po b/addons/analytic_user_function/i18n/sr@latin.po index e7c3e867644..83bd09cc327 100644 --- a/addons/analytic_user_function/i18n/sr@latin.po +++ b/addons/analytic_user_function/i18n/sr@latin.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-12-22 18:44+0000\n" -"PO-Revision-Date: 2010-12-23 14:19+0000\n" -"Last-Translator: Olivier Dony (OpenERP) \n" +"PO-Revision-Date: 2011-12-27 15:49+0000\n" +"Last-Translator: Milan Milosevic \n" "Language-Team: Serbian latin \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-12-23 07:09+0000\n" +"X-Launchpad-Export-Date: 2011-12-28 05:21+0000\n" "X-Generator: Launchpad (build 14560)\n" #. module: analytic_user_function @@ -25,12 +25,13 @@ msgstr "Proizvod" #. module: analytic_user_function #: model:ir.model,name:analytic_user_function.model_analytic_user_funct_grid msgid "Relation table between users and products on a analytic account" -msgstr "Relaciona tabela izmedju korisnika i proizvoda u analitickom kontu" +msgstr "Relaciona tabela između korisnika i proizvoda u analitičkom kontu" #. module: analytic_user_function #: constraint:hr.analytic.timesheet:0 msgid "You cannot modify an entry in a Confirmed/Done timesheet !." msgstr "" +"Ne možete izmeniti unos u tabelama obeleženim kao Potvrđenim/Završenim" #. module: analytic_user_function #: field:analytic.user.funct.grid,account_id:0 @@ -42,7 +43,7 @@ msgstr "Analitički konto" #: view:account.analytic.account:0 #: field:account.analytic.account,user_product_ids:0 msgid "Users/Products Rel." -msgstr "Korisnik/Proizvod Relac." +msgstr "Korisnik/Proizvod Odnos" #. module: analytic_user_function #: field:analytic.user.funct.grid,user_id:0 @@ -54,7 +55,7 @@ msgstr "Korisnik" msgid "" "Error! The currency has to be the same as the currency of the selected " "company" -msgstr "" +msgstr "Greška! Valuta mora biti ista kao i valuta izabranog preduzeća" #. module: analytic_user_function #: code:addons/analytic_user_function/analytic_user_function.py:96 @@ -62,6 +63,7 @@ msgstr "" #, python-format msgid "There is no expense account define for this product: \"%s\" (id:%d)" msgstr "" +"Nema dodatnih troškova za nalog određenog za ovaj proizvod: \"%s\" (id:%d)" #. module: analytic_user_function #: code:addons/analytic_user_function/analytic_user_function.py:95 @@ -73,17 +75,17 @@ msgstr "Greška !" #. module: analytic_user_function #: constraint:account.analytic.account:0 msgid "Error! You can not create recursive analytic accounts." -msgstr "" +msgstr "Greška! Ne možete praviti rekurzivne analitičke naloge." #. module: analytic_user_function #: model:ir.model,name:analytic_user_function.model_hr_analytic_timesheet msgid "Timesheet Line" -msgstr "Niz Kontrolne kartice" +msgstr "Niz kontrolne kartice" #. module: analytic_user_function #: view:analytic.user.funct.grid:0 msgid "User's Product for this Analytic Account" -msgstr "Korisnicki Proizvod za ovaj Analiticki Konto" +msgstr "Korisnički proizvod za ovaj Analitički Konto" #~ msgid "Invalid XML for View Architecture!" #~ msgstr "Nevažeći XML za pregled arhitekture" diff --git a/addons/association/i18n/sr@latin.po b/addons/association/i18n/sr@latin.po index ccfd9cd68f3..4ee55bdea07 100644 --- a/addons/association/i18n/sr@latin.po +++ b/addons/association/i18n/sr@latin.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-01-11 11:14+0000\n" -"PO-Revision-Date: 2010-12-23 16:04+0000\n" -"Last-Translator: OpenERP Administrators \n" +"PO-Revision-Date: 2011-12-27 16:19+0000\n" +"Last-Translator: Milan Milosevic \n" "Language-Team: Serbian latin \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-11-05 05:52+0000\n" -"X-Generator: Launchpad (build 14231)\n" +"X-Launchpad-Export-Date: 2011-12-28 05:21+0000\n" +"X-Generator: Launchpad (build 14560)\n" #. module: association #: field:profile.association.config.install_modules_wizard,wiki:0 @@ -25,22 +25,22 @@ msgstr "Wiki" #. module: association #: view:profile.association.config.install_modules_wizard:0 msgid "Event Management" -msgstr "Upravljanje Dogadjajima" +msgstr "Upravljanje događajima" #. module: association #: field:profile.association.config.install_modules_wizard,project_gtd:0 msgid "Getting Things Done" -msgstr "Da Zavrsimo" +msgstr "Da završimo" #. module: association #: model:ir.module.module,description:association.module_meta_information msgid "This module is to create Profile for Associates" -msgstr "Ovaj modul ima namenu da kreira Profil za Asociacije" +msgstr "Ovaj modul ima namenu pravljenja profila za partnere" #. module: association #: field:profile.association.config.install_modules_wizard,progress:0 msgid "Configuration Progress" -msgstr "Napredovanje Konfiguracije" +msgstr "Napredak podešavanja" #. module: association #: view:profile.association.config.install_modules_wizard:0 @@ -48,16 +48,17 @@ msgid "" "Here are specific applications related to the Association Profile you " "selected." msgstr "" +"Evo specifičnih aplikacija vezanih za asocijativni profil koji ste izabrali." #. module: association #: view:profile.association.config.install_modules_wizard:0 msgid "title" -msgstr "Naslov" +msgstr "naslov" #. module: association #: help:profile.association.config.install_modules_wizard,event_project:0 msgid "Helps you to manage and organize your events." -msgstr "POmaze vam da upravljate i organizujete svoje dogadjaje." +msgstr "Pomaže Vam da upravljate i organizujete svoje događaje." #. module: association #: field:profile.association.config.install_modules_wizard,config_logo:0 @@ -70,8 +71,8 @@ msgid "" "Tracks and manages employee expenses, and can automatically re-invoice " "clients if the expenses are project-related." msgstr "" -"Prati i upravlja troskovima zaposlenih, i moze da automatski re-fakturise " -"klijente ukoliko su troskovi vezani za projekat." +"Prati i upravlja troškovima zaposlenih, i moze automatski da re-fakturiše " +"klijente ukoliko su troškovi vezani za projekat." #. module: association #: help:profile.association.config.install_modules_wizard,project_gtd:0 @@ -80,28 +81,28 @@ msgid "" "module fully integrates GTD principle with OpenERP's project management." msgstr "" "GTD je metodologija za efikasno organizovanje sebe i svojih zadataka. Ovaj " -"modul potpuno integrise GTD principe sa OpenERP Projekt Menadzmentom." +"modul potpuno integriše GTD principe sa OpenERP-ovim Upravljanjem projektima." #. module: association #: view:profile.association.config.install_modules_wizard:0 msgid "Resources Management" -msgstr "Upravljanje Resursima" +msgstr "Upravljanje izvorima" #. module: association #: model:ir.module.module,shortdesc:association.module_meta_information msgid "Association profile" -msgstr "Profil Asociacije" +msgstr "Asocijativni profil" #. module: association #: field:profile.association.config.install_modules_wizard,hr_expense:0 msgid "Expenses Tracking" -msgstr "Pracenje Troskova" +msgstr "Praćenje troškova" #. module: association #: model:ir.actions.act_window,name:association.action_config_install_module #: view:profile.association.config.install_modules_wizard:0 msgid "Association Application Configuration" -msgstr "" +msgstr "Podešavanje asocijativnih aplikacija" #. module: association #: help:profile.association.config.install_modules_wizard,wiki:0 @@ -109,8 +110,8 @@ msgid "" "Lets you create wiki pages and page groups in order to keep track of " "business knowledge and share it with and between your employees." msgstr "" -"Omogucava ti da kreiras strane i grupe strana sa namerom da odrzis biznis " -"iskustvo i delis ga sa i medju svojim zaposlenima." +"Omogućava Vam pravljenje wiki stranica i grupa strana sa namerom održavanja " +"poslovnog iskustva i deljenja istog sa i među svojim zaposlenima." #. module: association #: help:profile.association.config.install_modules_wizard,project:0 @@ -118,8 +119,8 @@ msgid "" "Helps you manage your projects and tasks by tracking them, generating " "plannings, etc..." msgstr "" -"POmaze ti da upravljas svojim projektima i zadacima prateci ih, generisanjem " -"planova, itd..." +"Pomaže Vam da upravljate svojim projektima i zadacima prateći ih, " +"generisanjem planova, itd..." #. module: association #: model:ir.model,name:association.model_profile_association_config_install_modules_wizard @@ -129,15 +130,15 @@ msgstr "profile.association.config.install_modules_wizard" #. module: association #: field:profile.association.config.install_modules_wizard,event_project:0 msgid "Events" -msgstr "Dogadjaji" +msgstr "Događaji" #. module: association #: view:profile.association.config.install_modules_wizard:0 #: field:profile.association.config.install_modules_wizard,project:0 msgid "Project Management" -msgstr "Upravljanje Projektima" +msgstr "Upravljanje projektima" #. module: association #: view:profile.association.config.install_modules_wizard:0 msgid "Configure" -msgstr "" +msgstr "Podesi" diff --git a/addons/product/i18n/hr.po b/addons/product/i18n/hr.po index 2fd07c409c1..5e39adb3eda 100644 --- a/addons/product/i18n/hr.po +++ b/addons/product/i18n/hr.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0dev_rc3\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-12-22 18:46+0000\n" -"PO-Revision-Date: 2011-01-15 11:31+0000\n" -"Last-Translator: Goran Kliska \n" +"PO-Revision-Date: 2011-12-27 13:33+0000\n" +"Last-Translator: Milan Tribuson \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-12-23 06:49+0000\n" +"X-Launchpad-Export-Date: 2011-12-28 05:21+0000\n" "X-Generator: Launchpad (build 14560)\n" #. module: product @@ -169,7 +169,7 @@ msgstr "Jedinica mjere" #. module: product #: field:product.template,procure_method:0 msgid "Procurement Method" -msgstr "" +msgstr "Metoda nabave" #. module: product #: report:product.pricelist:0 diff --git a/openerp/addons/base/i18n/ar.po b/openerp/addons/base/i18n/ar.po index e1326680966..8a81b64486a 100644 --- a/openerp/addons/base/i18n/ar.po +++ b/openerp/addons/base/i18n/ar.po @@ -7,13 +7,13 @@ msgstr "" "Project-Id-Version: OpenERP Server 5.0.4\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-12-22 20:22+0000\n" -"PO-Revision-Date: 2011-12-04 16:26+0000\n" +"PO-Revision-Date: 2011-12-27 08:31+0000\n" "Last-Translator: kifcaliph \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-12-23 05:35+0000\n" +"X-Launchpad-Export-Date: 2011-12-28 05:21+0000\n" "X-Generator: Launchpad (build 14560)\n" #. module: base @@ -43,6 +43,8 @@ msgid "" "The second argument of the many2many field %s must be a SQL table !You used " "%s, which is not a valid SQL table name." msgstr "" +"يجب تسجيل اسم جدول في الحقل الثاني %s لبناء علاقة متعددة many2many , الاسم " +"%s المسجل غير صحيح" #. module: base #: field:ir.ui.view,arch:0 @@ -150,6 +152,8 @@ msgid "" "specified as a Python expression defining a list of triplets. For example: " "[('color','=','red')]" msgstr "" +"لنطاق الاختياري لتحديد قيم حقل الارتباط , يعرف في لغة البايثون بطريقة " +"ثلاثية , مثال [('color','=','red')]" #. module: base #: field:res.partner,ref:0 @@ -189,6 +193,8 @@ msgid "" "Properties of base fields cannot be altered in this manner! Please modify " "them through Python code, preferably through a custom addon!" msgstr "" +"خصائص الحق الأساسي لا يمكن تعديلها بهذه الطريقة , الرجاء التحرير من خلال " +"كود البايثون , و يستحسن استخدام برنامج إضافي!" #. module: base #: code:addons/osv.py:129 @@ -264,7 +270,7 @@ msgstr "جديد" #. module: base #: field:ir.actions.report.xml,multi:0 msgid "On multiple doc." -msgstr "" +msgstr "على عدة مستندات." #. module: base #: field:ir.module.category,module_nr:0 @@ -511,7 +517,7 @@ msgstr "" #. module: base #: model:res.country,name:base.gf msgid "French Guyana" -msgstr "" +msgstr "غينيا (غينيا الفرنسية)" #. module: base #: field:ir.ui.view.custom,ref_id:0 @@ -529,6 +535,8 @@ msgid "" "If you check this, then the second time the user prints with same attachment " "name, it returns the previous report." msgstr "" +"اذا وافقت على هذا الاختيار , فانه في المرة القادمة سيظهر نفس التقرير السابق " +"اذا طبع المستخدم نفس الملف المرفق" #. module: base #: model:ir.module.module,shortdesc:base.module_sale_layout @@ -594,7 +602,7 @@ msgstr "كولومبيا" #: code:addons/orm.py:1357 #, python-format msgid "Key/value '%s' not found in selection field '%s'" -msgstr "" +msgstr "قيمة/ مفتاح '%s' غير موجود في الحقول المختارة '%s'" #. module: base #: help:res.country,code:0 @@ -624,7 +632,7 @@ msgstr "غير مترجم" #: help:ir.actions.act_window,context:0 msgid "" "Context dictionary as Python expression, empty by default (Default: {})" -msgstr "" +msgstr "القيمة الافتراضية فارغة (Default: {})" #. module: base #: model:ir.actions.act_window,name:base.ir_action_wizard @@ -3625,7 +3633,7 @@ msgstr "" #. module: base #: help:res.lang,iso_code:0 msgid "This ISO code is the name of po files to use for translations" -msgstr "" +msgstr "كود ISO هو اسم ملف ال po لاستخدامه في الترجمة" #. module: base #: view:ir.rule:0 From 0ee2be6bc13c3a8390ee27570d3b23c90b6ac4c3 Mon Sep 17 00:00:00 2001 From: "Bharat Devnani (OpenERP)" Date: Wed, 28 Dec 2011 14:36:08 +0530 Subject: [PATCH 123/224] [FIX] point_of_sale : point of sale invoice action wrong view_id type lp bug: https://launchpad.net/bugs/909137 fixed bzr revid: bde@tinyerp.com-20111228090608-b1t0tfjv0hyxg305 --- addons/point_of_sale/point_of_sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index cf152131f99..e8747465eb9 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -396,7 +396,7 @@ class pos_order(osv.osv): 'name': _('Customer Invoice'), 'view_type': 'form', 'view_mode': 'form', - 'view_id': res_id, + 'view_id': [res_id], 'res_model': 'account.invoice', 'context': "{'type':'out_invoice'}", 'type': 'ir.actions.act_window', From 11a4fe1e8015e894094342e4099588b40d7f9e6b Mon Sep 17 00:00:00 2001 From: "Kirti Savalia (OpenERP)" Date: Wed, 28 Dec 2011 14:46:24 +0530 Subject: [PATCH 124/224] [REM]:duplicate transaction in stock workflow bzr revid: ksa@tinyerp.com-20111228091624-kxvsjeh1vudp0tuy --- addons/stock/stock_workflow.xml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/addons/stock/stock_workflow.xml b/addons/stock/stock_workflow.xml index d54c8b83d11..14b5babdea8 100644 --- a/addons/stock/stock_workflow.xml +++ b/addons/stock/stock_workflow.xml @@ -115,16 +115,5 @@ test_cancel()
- - - - test_cancel() - - - - - test_cancel() - -
From adf3a1a9902b995c4dabe4fee9c7ff8e52ff5b88 Mon Sep 17 00:00:00 2001 From: "Mayur Maheshwari (OpenERP)" Date: Wed, 28 Dec 2011 15:08:03 +0530 Subject: [PATCH 125/224] [FIX]stock:set + operator in graph view for avoid a KeyError: avg lp bug: https://launchpad.net/bugs/909009 fixed bzr revid: mma@tinyerp.com-20111228093803-313rga65vpgr6t03 --- addons/stock/report/report_stock_move_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml index d828af7ea0f..2949f53b117 100644 --- a/addons/stock/report/report_stock_move_view.xml +++ b/addons/stock/report/report_stock_move_view.xml @@ -55,7 +55,7 @@ - + From 33802ab48b0b380a0716ee6ebbf2f18469c2ea3e Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 28 Dec 2011 15:15:09 +0530 Subject: [PATCH 126/224] [FIX] account : Not Create Account form Account Templates lp bug: https://launchpad.net/bugs/909014 fixed bzr revid: mdi@tinyerp.com-20111228094509-tsyuafffvk1rg8rq --- addons/account/account.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index a73fb3d5d1c..ef29ce46742 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2443,7 +2443,7 @@ class account_account_template(osv.osv): _columns = { 'name': fields.char('Name', size=256, required=True, select=True), 'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."), - 'code': fields.char('Code', size=64, select=1), + 'code': fields.char('Code', size=64, required=True, select=1), 'type': fields.selection([ ('receivable','Receivable'), ('payable','Payable'), @@ -2592,7 +2592,7 @@ class account_add_tmpl_wizard(osv.osv_memory): acc_obj = self.pool.get('account.account') tmpl_obj = self.pool.get('account.account.template') data = self.read(cr, uid, ids) - company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']], ['company_id'])[0]['company_id'][0] + company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']][0][0], ['company_id'])['company_id'][0] account_template = tmpl_obj.browse(cr, uid, context['tmpl_ids']) vals = { 'name': account_template.name, @@ -2603,7 +2603,7 @@ class account_add_tmpl_wizard(osv.osv_memory): 'reconcile': account_template.reconcile, 'shortcut': account_template.shortcut, 'note': account_template.note, - 'parent_id': data[0]['cparent_id'], + 'parent_id': data[0]['cparent_id'][0], 'company_id': company_id, } acc_obj.create(cr, uid, vals) From a7e15128e3e798906420d2c46c48d4c88c35a9e0 Mon Sep 17 00:00:00 2001 From: "Ferdinand @ Camptocamp" <> Date: Wed, 28 Dec 2011 16:18:10 +0530 Subject: [PATCH 127/224] [FIX] hr : hr_timesheet_invoice - missing invoiced button lp bug: https://launchpad.net/bugs/909167 fixed bzr revid: bde@tinyerp.com-20111228104810-5fkm1b55bmh1iwvi --- addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml index e0652355063..c93739bbf5d 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice_view.xml @@ -89,7 +89,8 @@ - + + From 0f1a9ba110a1eca9c714810a4de5d5fa28c2585c Mon Sep 17 00:00:00 2001 From: "Divyesh Makwana (Open ERP)" Date: Wed, 28 Dec 2011 18:16:31 +0530 Subject: [PATCH 128/224] [IMP] account : Improved the code bzr revid: mdi@tinyerp.com-20111228124631-iy0eg7dnful3a71q --- addons/account/account.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index ef29ce46742..5c1ed610219 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2591,8 +2591,8 @@ class account_add_tmpl_wizard(osv.osv_memory): context = {} acc_obj = self.pool.get('account.account') tmpl_obj = self.pool.get('account.account.template') - data = self.read(cr, uid, ids) - company_id = acc_obj.read(cr, uid, [data[0]['cparent_id']][0][0], ['company_id'])['company_id'][0] + data = self.read(cr, uid, ids)[0] + company_id = acc_obj.read(cr, uid, [data['cparent_id'][0]], ['company_id'])[0]['company_id'][0] account_template = tmpl_obj.browse(cr, uid, context['tmpl_ids']) vals = { 'name': account_template.name, @@ -2603,7 +2603,7 @@ class account_add_tmpl_wizard(osv.osv_memory): 'reconcile': account_template.reconcile, 'shortcut': account_template.shortcut, 'note': account_template.note, - 'parent_id': data[0]['cparent_id'][0], + 'parent_id': data['cparent_id'][0], 'company_id': company_id, } acc_obj.create(cr, uid, vals) From 40860b517b000fc729353aa7ebd50f842898d1cd Mon Sep 17 00:00:00 2001 From: "Hemendra Paregi (Open ERP)" Date: Wed, 28 Dec 2011 18:55:20 +0530 Subject: [PATCH 129/224] [IMP] Remove Extra Spaces bzr revid: hpa@tinyerp.com-20111228132520-od6cjuvyfc2n7ln6 --- addons/sale/stock.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/sale/stock.py b/addons/sale/stock.py index b48a8952323..653b147d3d0 100644 --- a/addons/sale/stock.py +++ b/addons/sale/stock.py @@ -139,15 +139,14 @@ class stock_picking(osv.osv): continue sale_lines = picking.sale_id.order_line invoice_created = invoices[result[picking.id]] - if picking.sale_id.user_id: invoice_obj.write(cursor, user, [invoice_created.id], {'user_id': picking.sale_id.user_id.id}, context=context) + if picking.sale_id.fiscal_position: invoice_obj.write(cursor, user, [invoice_created.id], {'fiscal_position': picking.sale_id.fiscal_position.id}, context=context) if picking.sale_id.client_order_ref: inv_name = picking.sale_id.client_order_ref + " : " + invoice_created.name invoice_obj.write(cursor, user, [invoice_created.id], {'name': inv_name}, context=context) - for sale_line in sale_lines: if sale_line.product_id.type == 'service' and sale_line.invoiced == False: if not type: From d58db1299c9dae3d4c24470b7067295557ef4431 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Wed, 28 Dec 2011 15:20:11 +0100 Subject: [PATCH 130/224] [IMP] hr_holidays this year bzr revid: al@openerp.com-20111228142011-h9wob65z22lf4byr --- addons/hr_holidays/hr_holidays_view.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/hr_holidays/hr_holidays_view.xml b/addons/hr_holidays/hr_holidays_view.xml index 0f9ac1d78d8..86f630beaaf 100644 --- a/addons/hr_holidays/hr_holidays_view.xml +++ b/addons/hr_holidays/hr_holidays_view.xml @@ -12,7 +12,9 @@ - + + + From eb6ae984bace747118d4c4e1057300bf19f1ac1d Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Wed, 28 Dec 2011 16:53:33 +0100 Subject: [PATCH 131/224] [IMP] m2m move button into list view header bzr revid: al@openerp.com-20111228155333-0leh7vlklordcc31 --- addons/web/static/src/js/view_form.js | 30 ++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index 0b93ad6bebb..bd7dd851b48 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2655,20 +2655,6 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope } }); this.searchview.on_loaded.add_last(function () { - var $buttons = self.searchview.$element.find(".oe_search-view-buttons"); - $buttons.append(QWeb.render("SelectCreatePopup.search.buttons")); - var $cbutton = $buttons.find(".oe_selectcreatepopup-search-close"); - $cbutton.click(function() { - self.stop(); - }); - var $sbutton = $buttons.find(".oe_selectcreatepopup-search-select"); - if(self.options.disable_multiple_selection) { - $sbutton.hide(); - } - $sbutton.click(function() { - self.on_select_elements(self.selected_ids); - self.stop(); - }); self.view_list = new openerp.web.form.SelectCreateListView(self, self.dataset, false, _.extend({'deletable': false, @@ -2680,6 +2666,22 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope }).pipe(function() { self.searchview.do_search(); }); + self.view_list.on_loaded.add_last(function() { + var $buttons = self.view_list.$element.find(".oe-actions"); + $buttons.prepend(QWeb.render("SelectCreatePopup.search.buttons")); + var $cbutton = $buttons.find(".oe_selectcreatepopup-search-close"); + $cbutton.click(function() { + self.stop(); + }); + var $sbutton = $buttons.find(".oe_selectcreatepopup-search-select"); + if(self.options.disable_multiple_selection) { + $sbutton.hide(); + } + $sbutton.click(function() { + self.on_select_elements(self.selected_ids); + self.stop(); + }); + }); }); this.searchview.appendTo($("#" + this.element_id + "_search")); }, From 1c74a545c06501d00015e072de2af1d2543d9228 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Wed, 28 Dec 2011 17:29:52 +0100 Subject: [PATCH 132/224] [FIX] o2m m2m readonly dont diplay edit icon bzr revid: al@openerp.com-20111228162952-9qdrx2lrzkluu9mg --- addons/web/static/src/js/view_form.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index bd7dd851b48..3edba4ce923 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -2130,6 +2130,7 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({ if (self.is_readonly()) { view.options.addable = null; view.options.deletable = null; + view.options.isClarkGable = false; } } else if (view.view_type === "form") { if (self.is_readonly()) { @@ -2478,7 +2479,8 @@ openerp.web.form.FieldMany2Many = openerp.web.form.Field.extend({ this.list_view = new openerp.web.form.Many2ManyListView(this, this.dataset, false, { 'addable': self.is_readonly() ? null : _t("Add"), 'deletable': self.is_readonly() ? false : true, - 'selectable': self.multi_selection + 'selectable': self.multi_selection, + 'isClarkGable': self.is_readonly() ? false : true }); var embedded = (this.field.views || {}).tree; if (embedded) { From ae92ec17ea46cbf1cec414ed9e1a0c756fe22426 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 28 Dec 2011 20:45:06 +0100 Subject: [PATCH 133/224] [FIX] import/export bzr revid: fp@tinyerp.com-20111228194506-nag2kqk1w1uyk43p --- openerp/osv/orm.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 91ea19eccac..14ed4948dd9 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -1106,7 +1106,7 @@ class BaseModel(object): 'res_id': r['id'], 'module': '__export__', }) - r = n + r = '__export__.'+n else: r = r[f[i]] # To display external name of selection field when its exported @@ -1330,7 +1330,7 @@ class BaseModel(object): newfd = relation_obj.fields_get( cr, uid, context=context ) pos = position - res = many_ids(line[i], relation, current_module, mode) + res = [] first = 0 while pos < len(datas): @@ -1342,9 +1342,6 @@ class BaseModel(object): warning += w2 first += 1 - if data_res_id2: - res.append((4, data_res_id2)) - if (not newrow) or not reduce(lambda x, y: x or y, newrow.values(), 0): break From 91cafbee7e45eee30d44d0f6c9694a3e9b238742 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 28 Dec 2011 21:57:57 +0100 Subject: [PATCH 134/224] [FIX] import/export fully working through web interface bzr revid: fp@tinyerp.com-20111228205757-vxdw1j6gcsyvjj3m --- openerp/osv/orm.py | 56 ++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 14ed4948dd9..8236f096abf 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -1073,6 +1073,31 @@ class BaseModel(object): else: return False + def _get_xml_id(self, cr, uid, r): + model_data = self.pool.get('ir.model.data') + data_ids = model_data.search(cr, uid, [('model', '=', r._table_name), ('res_id', '=', r['id'])]) + if len(data_ids): + d = model_data.read(cr, uid, data_ids, ['name', 'module'])[0] + if d['module']: + r = '%s.%s' % (d['module'], d['name']) + else: + r = d['name'] + else: + postfix = 0 + while True: + n = self._table+'_'+str(r['id']) + (postfix and ('_'+str(postfix)) or '' ) + if not model_data.search(cr, uid, [('name', '=', n)]): + break + postfix += 1 + model_data.create(cr, uid, { + 'name': n, + 'model': self._name, + 'res_id': r['id'], + 'module': '__export__', + }) + r = '__export__.'+n + return r + lines = [] data = map(lambda x: '', range(len(fields))) done = [] @@ -1082,35 +1107,14 @@ class BaseModel(object): r = row i = 0 while i < len(f): + cols = False if f[i] == '.id': r = r['id'] elif f[i] == 'id': - model_data = self.pool.get('ir.model.data') - data_ids = model_data.search(cr, uid, [('model', '=', r._table_name), ('res_id', '=', r['id'])]) - if len(data_ids): - d = model_data.read(cr, uid, data_ids, ['name', 'module'])[0] - if d['module']: - r = '%s.%s' % (d['module'], d['name']) - else: - r = d['name'] - else: - postfix = 0 - while True: - n = self._table+'_'+str(r['id']) + (postfix and ('_'+str(postfix)) or '' ) - if not model_data.search(cr, uid, [('name', '=', n)]): - break - postfix += 1 - model_data.create(cr, uid, { - 'name': n, - 'model': self._name, - 'res_id': r['id'], - 'module': '__export__', - }) - r = '__export__.'+n + r = _get_xml_id(self, cr, uid, r) else: r = r[f[i]] # To display external name of selection field when its exported - cols = False if f[i] in self._columns.keys(): cols = self._columns[f[i]] elif f[i] in self._inherit_fields.keys(): @@ -1135,8 +1139,12 @@ class BaseModel(object): if [x for x in fields2 if x]: break done.append(fields2) + if cols and cols._type=='many2many' and len(fields[fpos])>(i+1) and (fields[fpos][i+1]=='id'): + data[fpos] = ','.join([_get_xml_id(self, cr, uid, x) for x in r]) + break + for row2 in r: - lines2 = self.__export_row(cr, uid, row2, fields2, + lines2 = row2._model.__export_row(cr, uid, row2, fields2, context) if first: for fpos2 in range(len(fields)): From b49bb75a26cb71ffcbb6bd273c595edf8df254cd Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 28 Dec 2011 22:09:01 +0100 Subject: [PATCH 135/224] [IMP] no email required to share a link or embed bzr revid: fp@tinyerp.com-20111228210901-sywx5rab63d10lsd --- addons/share/wizard/share_wizard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/share/wizard/share_wizard.py b/addons/share/wizard/share_wizard.py index 276021e97ec..80a0b12f8b2 100644 --- a/addons/share/wizard/share_wizard.py +++ b/addons/share/wizard/share_wizard.py @@ -752,8 +752,6 @@ class share_wizard(osv.osv_memory): self._logger.info('Sending share notifications by email...') mail_message = self.pool.get('mail.message') user = self.pool.get('res.users').browse(cr, UID_ROOT, uid) - if not user.user_email: - raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.')) # TODO: also send an HTML version of this mail msg_ids = [] @@ -761,6 +759,8 @@ class share_wizard(osv.osv_memory): email_to = result_line.user_id.user_email if not email_to: continue + if not user.user_email: + raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.')) subject = wizard_data.name body = _("Hello,") body += "\n\n" From d3866325f354f389469ccd7abc91ecc641736b01 Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of openerp <> Date: Thu, 29 Dec 2011 04:46:15 +0000 Subject: [PATCH 136/224] Launchpad automatic translations update. bzr revid: launchpad_translations_on_behalf_of_openerp-20111229044615-w71b241fj2hqp5hi --- addons/anonymization/i18n/sr@latin.po | 213 +++++++++++++++++++ addons/base_report_designer/i18n/sr@latin.po | 53 ++--- 2 files changed, 241 insertions(+), 25 deletions(-) create mode 100644 addons/anonymization/i18n/sr@latin.po diff --git a/addons/anonymization/i18n/sr@latin.po b/addons/anonymization/i18n/sr@latin.po new file mode 100644 index 00000000000..645d3ee1593 --- /dev/null +++ b/addons/anonymization/i18n/sr@latin.po @@ -0,0 +1,213 @@ +# Serbian Latin translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-12-22 18:44+0000\n" +"PO-Revision-Date: 2011-12-28 20:55+0000\n" +"Last-Translator: Milan Milosevic \n" +"Language-Team: Serbian Latin \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2011-12-29 04:46+0000\n" +"X-Generator: Launchpad (build 14560)\n" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard +msgid "ir.model.fields.anonymize.wizard" +msgstr "ir.model.fields.anonymize.wizard" + +#. module: anonymization +#: field:ir.model.fields.anonymization,field_name:0 +msgid "Field Name" +msgstr "Naziv polja" + +#. module: anonymization +#: field:ir.model.fields.anonymization,field_id:0 +msgid "Field" +msgstr "Polje" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,state:0 +#: field:ir.model.fields.anonymize.wizard,state:0 +msgid "State" +msgstr "Stanje" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,file_import:0 +msgid "Import" +msgstr "Uvoz" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization +msgid "ir.model.fields.anonymization" +msgstr "ir.model.fields.anonymization" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,direction:0 +msgid "Direction" +msgstr "Pravac" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_tree +#: view:ir.model.fields.anonymization:0 +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_fields +msgid "Anonymized Fields" +msgstr "Anonimizirana polja" + +#. module: anonymization +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization +msgid "Database anonymization" +msgstr "Anonimizacija baze podataka" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,direction:0 +msgid "clear -> anonymized" +msgstr "očisti -> anonimizirano" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Anonymized" +msgstr "Anonimizirano" + +#. module: anonymization +#: field:ir.model.fields.anonymization,state:0 +msgid "unknown" +msgstr "nepoznato" + +#. module: anonymization +#: field:ir.model.fields.anonymization,model_id:0 +msgid "Object" +msgstr "Stavka" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,filepath:0 +msgid "File path" +msgstr "Putanja datoteke" + +#. module: anonymization +#: field:ir.model.fields.anonymization.history,date:0 +msgid "Date" +msgstr "Datum" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,file_export:0 +msgid "Export" +msgstr "Izvoz" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Reverse the Database Anonymization" +msgstr "Poništi anonimizaciju baze podataka" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Database Anonymization" +msgstr "Anonimizacija baze podataka" + +#. module: anonymization +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard +msgid "Anonymize database" +msgstr "Anonimiziraj bazu podataka" + +#. module: anonymization +#: view:ir.model.fields.anonymization.history:0 +#: field:ir.model.fields.anonymization.history,field_ids:0 +msgid "Fields" +msgstr "Polja" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Clear" +msgstr "Očisti" + +#. module: anonymization +#: view:ir.model.fields.anonymize.wizard:0 +#: field:ir.model.fields.anonymize.wizard,summary:0 +msgid "Summary" +msgstr "Sažetak" + +#. module: anonymization +#: view:ir.model.fields.anonymization:0 +msgid "Anonymized Field" +msgstr "Anonimizirano polje" + +#. module: anonymization +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Unstable" +msgstr "Nestabilno" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Exception occured" +msgstr "Desio se izuzetak" + +#. module: anonymization +#: selection:ir.model.fields.anonymization,state:0 +#: selection:ir.model.fields.anonymize.wizard,state:0 +msgid "Not Existing" +msgstr "Nepostojeći" + +#. module: anonymization +#: field:ir.model.fields.anonymization,model_name:0 +msgid "Object Name" +msgstr "Ime stavke" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_history_tree +#: view:ir.model.fields.anonymization.history:0 +#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_history +msgid "Anonymization History" +msgstr "Istorija anonimizacije" + +#. module: anonymization +#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history +msgid "ir.model.fields.anonymization.history" +msgstr "ir.model.fields.anonymization.history" + +#. module: anonymization +#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard +#: view:ir.model.fields.anonymize.wizard:0 +msgid "Anonymize Database" +msgstr "Anonimiziraj bazu podataka" + +#. module: anonymization +#: field:ir.model.fields.anonymize.wizard,name:0 +msgid "File Name" +msgstr "Naziv datoteke" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,direction:0 +msgid "anonymized -> clear" +msgstr "anonimizirano -> očisti" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Started" +msgstr "Započet" + +#. module: anonymization +#: selection:ir.model.fields.anonymization.history,state:0 +msgid "Done" +msgstr "Gotovo" + +#. module: anonymization +#: view:ir.model.fields.anonymization.history:0 +#: field:ir.model.fields.anonymization.history,msg:0 +#: field:ir.model.fields.anonymize.wizard,msg:0 +msgid "Message" +msgstr "Poruka" + +#. module: anonymization +#: code:addons/anonymization/anonymization.py:55 +#: sql_constraint:ir.model.fields.anonymization:0 +#, python-format +msgid "You cannot have two fields with the same name on the same object!" +msgstr "Ne možete imati dva polja sa istim imenom na istoj stavci!" diff --git a/addons/base_report_designer/i18n/sr@latin.po b/addons/base_report_designer/i18n/sr@latin.po index 129ee9587c4..44d04687748 100644 --- a/addons/base_report_designer/i18n/sr@latin.po +++ b/addons/base_report_designer/i18n/sr@latin.po @@ -8,13 +8,13 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-12-22 18:44+0000\n" -"PO-Revision-Date: 2010-12-23 15:58+0000\n" -"Last-Translator: OpenERP Administrators \n" +"PO-Revision-Date: 2011-12-28 21:43+0000\n" +"Last-Translator: Milan Milosevic \n" "Language-Team: Serbian latin \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2011-12-23 06:54+0000\n" +"X-Launchpad-Export-Date: 2011-12-29 04:46+0000\n" "X-Generator: Launchpad (build 14560)\n" #. module: base_report_designer @@ -25,7 +25,7 @@ msgstr "base.report.sxw" #. module: base_report_designer #: view:base_report_designer.installer:0 msgid "OpenERP Report Designer Configuration" -msgstr "" +msgstr "Podešavanje OpenERP-ovog čarobnjaka za izveštaje" #. module: base_report_designer #: view:base_report_designer.installer:0 @@ -33,6 +33,8 @@ msgid "" "This plug-in allows you to create/modify OpenERP Reports into OpenOffice " "Writer." msgstr "" +"Ovaj plug-in Vam omogućava da pravite/izmenite OpenERP-ove izveštaje u " +"OpenOffice Writer-u." #. module: base_report_designer #: view:base.report.file.sxw:0 @@ -42,7 +44,7 @@ msgstr "Učitaj izmenjeni izveštaj" #. module: base_report_designer #: view:base.report.file.sxw:0 msgid "The .SXW report" -msgstr ".SXW Izveštaj" +msgstr ".SXW izveštaj" #. module: base_report_designer #: model:ir.model,name:base_report_designer.model_base_report_designer_installer @@ -52,12 +54,12 @@ msgstr "base_report_designer.installer" #. module: base_report_designer #: view:base_report_designer.installer:0 msgid "_Close" -msgstr "_Close" +msgstr "_Zatvori" #. module: base_report_designer #: view:base.report.rml.save:0 msgid "The RML report" -msgstr "RML Izvestaj" +msgstr "RML izveštaj" #. module: base_report_designer #: view:base_report_designer.installer:0 @@ -83,24 +85,24 @@ msgstr "base.report.rml.save" #. module: base_report_designer #: model:ir.ui.menu,name:base_report_designer.menu_action_report_designer_wizard msgid "Report Designer" -msgstr "Dizajner Izvještaja" +msgstr "Čarobnjak za izvešzaje" #. module: base_report_designer #: field:base_report_designer.installer,name:0 msgid "File name" -msgstr "Ime Fajla" +msgstr "Ime datoteke" #. module: base_report_designer #: view:base.report.file.sxw:0 #: view:base.report.sxw:0 msgid "Get a report" -msgstr "Napravi Izvještaj" +msgstr "Nabavi izveštaj" #. module: base_report_designer #: view:base_report_designer.installer:0 #: model:ir.actions.act_window,name:base_report_designer.action_report_designer_wizard msgid "OpenERP Report Designer" -msgstr "OpenERP Dizajner Izvestaja" +msgstr "OpenERP-ov čarobnjak za izveštaje" #. module: base_report_designer #: view:base.report.sxw:0 @@ -110,7 +112,7 @@ msgstr "Nastavi" #. module: base_report_designer #: field:base.report.rml.save,file_rml:0 msgid "Save As" -msgstr "Sacuvaj Kao" +msgstr "Sačuvaj kao" #. module: base_report_designer #: help:base_report_designer.installer,plugin_file:0 @@ -118,13 +120,13 @@ msgid "" "OpenObject Report Designer plug-in file. Save as this file and install this " "plug-in in OpenOffice." msgstr "" -"OpenObject Dizajner Izvestaja plug-in fajl. Sacuvajte kao ovaj fajl i " -"instalirajte plug-in u OpenOffice." +"OpenObject Čarobnjak za izveštaje plug-in datoteka. Sačuvajte kao ovu " +"datoteku i instalirajte plug-in u OpenOffice." #. module: base_report_designer #: view:base.report.rml.save:0 msgid "Save RML FIle" -msgstr "Sacuvaj RML fajl" +msgstr "Sačuvaj RML datoteku" #. module: base_report_designer #: field:base.report.file.sxw,file_sxw:0 @@ -135,7 +137,7 @@ msgstr "Vaša .SXW datoteka" #. module: base_report_designer #: view:base_report_designer.installer:0 msgid "Installation and Configuration Steps" -msgstr "Instalacija i konfiguracione korake" +msgstr "Instalacija i koraci podešavanja" #. module: base_report_designer #: field:base_report_designer.installer,description:0 @@ -150,11 +152,12 @@ msgid "" "Don't forget to install the OpenERP SA OpenOffice package to modify it.\n" "Once it is modified, re-upload it in OpenERP using this wizard." msgstr "" -"Ovo je sablon vaseg zahtevanog izvestaja.\n" -"Sacuvajte ga kao .SXW fajl i otvorite ga sa OpenOfice.\n" -"Ne zaboravite da instalirate OpenERP SA paket OpenOffice da bi ga mogli " -"modofikovati.\n" -"Jednom izmenjen, ponovo ga uvezite u OpenERP koristeci ovog carobnjaka." +"Ovo je obrazac Vašeg traženog izveštaja.\n" +"Sačuvajte ga kao .SWX datoteku i otvorite ga u OpenOffice-u.\n" +"Ne zaboravite da instalirate OpenERP-ov SA openOffice pakovanje da biste ga " +"izmenili.\n" +"Jednom kad je izmenjen, ponovo ga učitajte u OpenERP-u koristeći ovaj " +"čarobnjak." #. module: base_report_designer #: field:base_report_designer.installer,config_logo:0 @@ -164,7 +167,7 @@ msgstr "Slika" #. module: base_report_designer #: model:ir.actions.act_window,name:base_report_designer.action_view_base_report_sxw msgid "Base Report sxw" -msgstr "Bazni sxw Izvestaj" +msgstr "Osnovni sxw izveštaj" #. module: base_report_designer #: model:ir.model,name:base_report_designer.model_base_report_file_sxw @@ -174,12 +177,12 @@ msgstr "base.report.file.sxw" #. module: base_report_designer #: field:base_report_designer.installer,plugin_file:0 msgid "OpenObject Report Designer Plug-in" -msgstr "OpenObject plug-in Dizajner Izvestaja" +msgstr "OpenObject plug-in čarobnjak za izveštaje" #. module: base_report_designer #: model:ir.actions.act_window,name:base_report_designer.action_report_designer_installer msgid "OpenERP Report Designer Installation" -msgstr "Instalacija OpenERP dizajnera Izvestaja" +msgstr "Instalacija OpenERP-ovog čarobnjaka za izveštaje" #. module: base_report_designer #: view:base.report.file.sxw:0 @@ -197,7 +200,7 @@ msgstr "ir.actions.report.xml" #. module: base_report_designer #: view:base.report.sxw:0 msgid "Select your report" -msgstr "Odaberite izvještaj" +msgstr "Odaberite izveštaj" #~ msgid "Report designer interface module" #~ msgstr "Modul Interfejsa Dizajnera Izveštaja" From 1c03c37ad1c2023e024c83a13542f1969bb62ee4 Mon Sep 17 00:00:00 2001 From: =Bhumi Thakkar Date: Thu, 29 Dec 2011 12:27:27 +0530 Subject: [PATCH 137/224] [IMP] Improve code to based on changes on web client for initialize mobile webclient. bzr revid: jra@tinyerp.com-20111229065727-egt8j4c2zlv3jh90 --- .../web_mobile/static/src/js/chrome_mobile.js | 25 +++++++++++++------ addons/web_mobile/static/src/web_mobile.html | 17 ++++++++++--- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/addons/web_mobile/static/src/js/chrome_mobile.js b/addons/web_mobile/static/src/js/chrome_mobile.js index ff75b26ef66..a4e8f0acd44 100644 --- a/addons/web_mobile/static/src/js/chrome_mobile.js +++ b/addons/web_mobile/static/src/js/chrome_mobile.js @@ -17,14 +17,17 @@ openerp.web_mobile.MobileWebClient = openerp.web.Widget.extend({ init: function(element_id) { this._super(null, element_id); - openerp.web.qweb.add_template("xml/web_mobile.xml"); - var params = {}; - this.$element.html(this.render()); this.crashmanager = new openerp.web.CrashManager(this); this.login = new openerp.web_mobile.Login(this, "oe_login"); }, start: function() { - this.login.start(); + this._super.apply(this, arguments); + var self = this; + this.session.bind().then(function() { + openerp.web.qweb.add_template("xml/web_mobile.xml"); + self.$element.html(self.render()); + self.login.start(); + }); } }); @@ -45,7 +48,8 @@ openerp.web_mobile.Login = openerp.web.Widget.extend({ jQuery("#oe_header").children().remove(); this.rpc("/web/database/get_list", {}, function(result) { self.db_list = result.db_list; - self.$element.html(self.render(self)); + $('#'+self.element_id).html(self.render(self)); + self.$element = $('#'+self.element_id); if(self.session.db!=""){ self.$element.find("#database").val(self.session.db); } @@ -64,7 +68,7 @@ openerp.web_mobile.Login = openerp.web.Widget.extend({ var password = $e.find("div input[name=password]").val(); //$e.hide(); // Should hide then call callback - this.session.login(db, login, password, function() { + this.session.session_authenticate(db, login, password).then(function() { if(self.session.session_is_valid()) { if (self.has_local_storage) { if(self.remember_creditentials) { @@ -78,9 +82,13 @@ openerp.web_mobile.Login = openerp.web.Widget.extend({ } } self.on_login_valid(); - } else { + } + }); + this.session.on_session_invalid.add({ + callback: function () { self.on_login_invalid(); - } + }, + unique: true }); }, on_login_invalid: function() { @@ -185,6 +193,7 @@ openerp.web_mobile.Menu = openerp.web.Widget.extend({ this.menu = false; }, start: function() { + this._super.apply(this, arguments); this.rpc("/web/menu/load", {}, this.on_loaded); }, on_loaded: function(data) { diff --git a/addons/web_mobile/static/src/web_mobile.html b/addons/web_mobile/static/src/web_mobile.html index 51f7633bdda..b63ddb2835f 100755 --- a/addons/web_mobile/static/src/web_mobile.html +++ b/addons/web_mobile/static/src/web_mobile.html @@ -13,6 +13,7 @@ + @@ -26,10 +27,20 @@ - - - + + + + + + + + + + + + + From 0483747b450a130c48752af7c1d72596089667d8 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 29 Dec 2011 10:36:03 +0100 Subject: [PATCH 138/224] [IMP] rml_header1: no slogan by default, tooltip bzr revid: fp@tinyerp.com-20111229093603-dbyv5u78xnnlc5ni --- openerp/addons/base/base_data.xml | 1 - openerp/addons/base/res/res_company.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/openerp/addons/base/base_data.xml b/openerp/addons/base/base_data.xml index 3d7e1d0f08c..5457cbdbd83 100644 --- a/openerp/addons/base/base_data.xml +++ b/openerp/addons/base/base_data.xml @@ -1043,7 +1043,6 @@ Your Company - Company business slogan Web: www.companyname.com - Tel: +1-212-555-12345 IBAN: XX12 3456 7890 1234 5678 - SWIFT: SWIFTCODE - VAT: Company vat number diff --git a/openerp/addons/base/res/res_company.py b/openerp/addons/base/res/res_company.py index 87262d20d01..c10ce8e7788 100644 --- a/openerp/addons/base/res/res_company.py +++ b/openerp/addons/base/res/res_company.py @@ -120,7 +120,7 @@ class res_company(osv.osv): 'parent_id': fields.many2one('res.company', 'Parent Company', select=True), 'child_ids': fields.one2many('res.company', 'parent_id', 'Child Companies'), 'partner_id': fields.many2one('res.partner', 'Partner', required=True), - 'rml_header1': fields.char('Report Header / Company Slogan', size=200), + 'rml_header1': fields.char('Report Header / Company Slogan', size=200, help="Appears by default on the top right corner of your printed documents."), 'rml_footer1': fields.char('General Information Footer', size=200), 'rml_footer2': fields.function(_get_bank_data, type="char", string='Bank Accounts Footer', size=250, help="This field is computed automatically based on bank accounts defined, having the display on footer checkbox set."), 'rml_header': fields.text('RML Header', required=True), From c7c5bc19d3c002042bfbb6073b241b5a45dc90b0 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Thu, 29 Dec 2011 14:57:12 +0100 Subject: [PATCH 139/224] [FIX] enhancement of the fix of bug 751222 lp bug: https://launchpad.net/bugs/751222 fixed bzr revid: qdp-launchpad@openerp.com-20111229135712-q42ro7x0de5q3ggj --- addons/stock/wizard/stock_partial_picking.py | 65 +++++++++++-------- .../wizard/stock_partial_picking_view.xml | 14 +++- 2 files changed, 51 insertions(+), 28 deletions(-) diff --git a/addons/stock/wizard/stock_partial_picking.py b/addons/stock/wizard/stock_partial_picking.py index 8671f27f193..937d50014a2 100644 --- a/addons/stock/wizard/stock_partial_picking.py +++ b/addons/stock/wizard/stock_partial_picking.py @@ -22,8 +22,8 @@ import time from osv import fields, osv from tools.misc import DEFAULT_SERVER_DATETIME_FORMAT -from tools.translate import _ import decimal_precision as dp +from tools.translate import _ class stock_partial_picking_line(osv.TransientModel): @@ -52,16 +52,24 @@ class stock_partial_picking_line(osv.TransientModel): 'update_cost': fields.boolean('Need cost update'), 'cost' : fields.float("Cost", help="Unit Cost for this product line"), 'currency' : fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed", ondelete='CASCADE'), - 'tracking': fields.function(_tracking, method=True, string='Tracking', type='boolean'), + 'tracking': fields.function(_tracking, string='Tracking', type='boolean'), } class stock_partial_picking(osv.osv_memory): _name = "stock.partial.picking" _description = "Partial Picking Processing Wizard" + + def _hide_tracking(self, cursor, user, ids, name, arg, context=None): + res = {} + for wizard in self.browse(cursor, user, ids, context=context): + res[wizard.id] = any([not(x.tracking) for x in wizard.move_ids]) + return res + _columns = { 'date': fields.datetime('Date', required=True), 'move_ids' : fields.one2many('stock.partial.picking.line', 'wizard_id', 'Product Moves'), 'picking_id': fields.many2one('stock.picking', 'Picking', required=True, ondelete='CASCADE'), + 'hide_tracking': fields.function(_hide_tracking, string='Tracking', type='boolean', help='This field is for internal purpose. It is used to decide if the column prodlot has to be shown on the move_ids field or not'), } def default_get(self, cr, uid, fields, context=None): @@ -86,7 +94,7 @@ class stock_partial_picking(osv.osv_memory): def _product_cost_for_average_update(self, cr, uid, move): """Returns product cost and currency ID for the given move, suited for re-computing the average product cost. - + :return: map of the form:: {'cost': 123.34, @@ -124,48 +132,51 @@ class stock_partial_picking(osv.osv_memory): 'delivery_date' : partial.date } picking_type = partial.picking_id.type - for move in partial.move_ids: - move_uom = move.move_id.product_uom - process_uom = move.product_uom - move_id = move.move_id.id + for wizard_line in partial.move_ids: + initial_uom = wizard_line.move_id.product_uom + line_uom = wizard_line.product_uom + move_id = wizard_line.move_id.id #Quantiny must be Positive - if move.quantity < 0: + if wizard_line.quantity < 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) - #Compute the wizard Quantity for respective move. - toprocess = uom_obj._compute_qty(cr, uid, process_uom.id, move.quantity, move_uom.id) + #Compute the quantity for respective wizard_line in the line uom and in the initial uom + qty_in_initial_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, initial_uom.id) + qty_in_line_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, line_uom.id) #this just do the rounding if necessary #Check rounding Quantity.ex. #picking: 1kg, uom kg rounding = 0.01 (rounding to 10g), #partial delivery: 253g #=> result= refused, as the qty left on picking would be 0.747kg and only 0.75 is accepted by the uom. - if process_uom.factor and process_uom.factor <> 0 and move_uom.factor: - without_rounding_qty = (move.quantity / process_uom.factor) * move_uom.factor - if toprocess <> without_rounding_qty: - raise osv.except_osv(_('Warning'), _('Quantity left on picking would be "%s %s" but "%s %s" is accepted by the uom.') % (without_rounding_qty, process_uom.name, toprocess, process_uom.name)) + if line_uom.factor and line_uom.factor <> 0 and initial_uom.factor: + if qty_in_line_uom <> wizard_line.quantity: + raise osv.except_osv(_('Warning'), _('The uom rounding does not allow you to ship "%s %s", only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, line_uom.rounding, line_uom.name)) + without_rounding_qty = (wizard_line.quantity / line_uom.factor) * initial_uom.factor + if qty_in_initial_uom <> without_rounding_qty: + raise osv.except_osv(_('Warning'), _('The rounding of the initial uom does not allow you to ship "%s %s", as it would let a quantity of "%s %s" to ship and only roundings of "%s %s" is accepted by the uom.') % (wizard_line.quantity, line_uom.name, wizard_line.move_id.product_qty - without_rounding_qty, initial_uom.name, initial_uom.rounding, initial_uom.name)) if not move_id: seq_obj_name = 'stock.picking.' + picking_type move_id = stock_move.create(cr,uid,{'name' : self.pool.get('ir.sequence').get(cr, uid, seq_obj_name), - 'product_id': move.product_id.id, - 'product_qty': move.quantity, - 'product_uom': move.product_uom.id, - 'prodlot_id': move.prodlot_id.id, - 'location_id' : move.location_id.id, - 'location_dest_id' : move.location_dest_id.id, + 'product_id': wizard_line.product_id.id, + 'product_qty': wizard_line.quantity, + 'product_uom': wizard_line.product_uom.id, + 'prodlot_id': wizard_line.prodlot_id.id, + 'location_id' : wizard_line.location_id.id, + 'location_dest_id' : wizard_line.location_dest_id.id, 'picking_id': partial.picking_id.id },context=context) stock_move.action_confirm(cr, uid, [move_id], context) partial_data['move%s' % (move_id)] = { - 'product_id': move.product_id.id, - 'product_qty': move.quantity, - 'product_uom': move.product_uom.id, - 'prodlot_id': move.prodlot_id.id, + 'product_id': wizard_line.product_id.id, + 'product_qty': wizard_line.quantity, + 'product_uom': wizard_line.product_uom.id, + 'prodlot_id': wizard_line.prodlot_id.id, } - if (picking_type == 'in') and (move.product_id.cost_method == 'average'): - partial_data['move%s' % (move.move_id.id)].update(product_price=move.cost, - product_currency=move.currency.id) + if (picking_type == 'in') and (wizard_line.product_id.cost_method == 'average'): + partial_data['move%s' % (wizard_line.move_id.id)].update(product_price=wizard_line.cost, + product_currency=wizard_line.currency.id) stock_picking.do_partial(cr, uid, [partial.picking_id.id], partial_data, context=context) return {'type': 'ir.actions.act_window_close'} diff --git a/addons/stock/wizard/stock_partial_picking_view.xml b/addons/stock/wizard/stock_partial_picking_view.xml index 4194d7129c5..5e6ac6ead8b 100644 --- a/addons/stock/wizard/stock_partial_picking_view.xml +++ b/addons/stock/wizard/stock_partial_picking_view.xml @@ -15,8 +15,20 @@ form + - + + + + + + + + + + + + - +
From 1dcf921ffa65c78d3b2c5cd5188cb1f7c466a650 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 4 Jan 2012 11:41:06 +0100 Subject: [PATCH 218/224] [imp] improved design of database manager bzr revid: nicolas.vanhoren@openerp.com-20120104104106-mithtsta4apwfccq --- addons/web/static/src/css/base.css | 22 ++++++++++---------- addons/web/static/src/js/chrome.js | 1 - addons/web/static/src/xml/base.xml | 33 ++++++++++++------------------ 3 files changed, 24 insertions(+), 32 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 132efa33888..0a64a562339 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -264,20 +264,20 @@ body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp optio .login.database_block .oe-database-manager { display: block; } -.login .db_options_row { - width: 100%; - height: 100%; - display: table-row; -} -.login .db_options_row .db_right_pane { - width: 100%; - height: 100%; -} -.db_container { +.login .database { + float: left; width: 196px; + height: 100%; background: #666666; } +.login .oe_db_options { + margin-left: 196px; + width: 100%; + height: 100%; + color: black; +} + ul.db_options li { padding: 5px 0 10px 5px; @@ -300,7 +300,7 @@ ul.db_options li { margin: 1px; color: #EEEEEE; cursor: pointer; - width: 196px; + width: 189px; font-size: 12px; } diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 6d300db9c31..bd95d304174 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -289,7 +289,6 @@ openerp.web.Database = openerp.web.Widget.extend(/** @lends openerp.web.Database }); $.when(fetch_db, fetch_langs).then(function () {self.do_create();}); - this.$element.find('#db-back').click(_.bind(function() {this.hide();}, this)); this.$element.find('#db-create').click(this.do_create); this.$element.find('#db-drop').click(this.do_drop); this.$element.find('#db-backup').click(this.do_backup); diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 670b1a377fb..108504c6636 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -313,26 +313,19 @@
- - - - - -
-
-
    -
  • Back
  • -
  • Create
  • -
  • Drop
  • -
  • Backup
  • -
  • Restore
  • -
  • Password
  • -
  • Back to Login
  • -
-
-
-
-
+
+
+
    +
  • Create
  • +
  • Drop
  • +
  • Backup
  • +
  • Restore
  • +
  • Password
  • +
  • Back to Login
  • +
+
+
+
From 624e6ec8dea4c5400655cab5b9f57c39220b9678 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 4 Jan 2012 11:53:05 +0100 Subject: [PATCH 219/224] [imp] improved design of login screen bzr revid: nicolas.vanhoren@openerp.com-20120104105305-mli2denyl1jhyhyq --- addons/web/static/src/css/base.css | 12 +++++++----- addons/web/static/src/xml/base.xml | 5 ++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 0a64a562339..1419387aa6a 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -267,17 +267,19 @@ body.openerp, .openerp textarea, .openerp input, .openerp select, .openerp optio .login .database { float: left; - width: 196px; + width: 202px; height: 100%; background: #666666; } .login .oe_db_options { - margin-left: 196px; - width: 100%; - height: 100%; + margin-left: 202px; color: black; + padding-top: 20px; } +.login .database ul { + margin-top: 65px; +} ul.db_options li { padding: 5px 0 10px 5px; @@ -300,7 +302,7 @@ ul.db_options li { margin: 1px; color: #EEEEEE; cursor: pointer; - width: 189px; + width: 195px; font-size: 12px; } diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 108504c6636..6a5819e4c37 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -315,7 +315,10 @@
-
    + + + +
    • Create
    • Drop
    • Backup
    • From b3799d61d8b4d4cf67cc021e6db54384d736c670 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Wed, 4 Jan 2012 11:59:11 +0100 Subject: [PATCH 220/224] [IMP] useability improvements bzr revid: fp@tinyerp.com-20120104105911-wdxdeqdz5d1g33w1 --- addons/account/account_invoice_view.xml | 1 - addons/sale/__openerp__.py | 2 +- addons/sale/sale_view.xml | 20 +++++++++++++------- addons/stock/stock_view.xml | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 566f3958670..41e5aff24c8 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -303,7 +303,6 @@