From 2ac7066e1d2675a13e804b8ae3f05b32f17bad95 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 27 May 2010 13:31:06 +0530 Subject: [PATCH 1/6] Task-ID:814: To add doc string to POS and related modules with wizards bzr revid: sbh@tinyerp.com-20100527080106-1qpw6wrxu8veenxg --- .../point_of_sale/wizard/pos_add_product.py | 8 +++++ addons/point_of_sale/wizard/pos_discount.py | 8 +++++ addons/point_of_sale/wizard/pos_payment.py | 11 +++++-- .../wizard/pos_payment_report_date.py | 3 -- .../wizard/pos_payment_report_user.py | 3 -- addons/point_of_sale/wizard/pos_receipt.py | 8 +++++ addons/point_of_sale/wizard/pos_return.py | 29 +++++++++++++++++++ 7 files changed, 61 insertions(+), 9 deletions(-) diff --git a/addons/point_of_sale/wizard/pos_add_product.py b/addons/point_of_sale/wizard/pos_add_product.py index 5d88b75d7ff..5150e10f99f 100644 --- a/addons/point_of_sale/wizard/pos_add_product.py +++ b/addons/point_of_sale/wizard/pos_add_product.py @@ -62,6 +62,14 @@ class add_product(osv.osv_memory): 'type': 'ir.actions.act_window', } def close_action(self, cr, uid, ids, context): + """ + To get the product and Make the payment . + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + @return : Return the Make Payment + """ record_id = context and context.get('active_id', False) order_obj= self.pool.get('pos.order') diff --git a/addons/point_of_sale/wizard/pos_discount.py b/addons/point_of_sale/wizard/pos_discount.py index 8b0f4b45fa4..0e3fc88767c 100644 --- a/addons/point_of_sale/wizard/pos_discount.py +++ b/addons/point_of_sale/wizard/pos_discount.py @@ -37,6 +37,14 @@ class pos_discount(osv.osv_memory): def view_init(self, cr, uid, fields_list, context=None): + """ + Creates view dynamically and adding fields at runtime. + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + @return: New arch of view with new columns. + """ res = super(pos_discount, self).view_init(cr, uid, fields_list, context=context) record_id = context and context.get('active_id', False) or False order = self.pool.get('pos.order').browse(cr, uid, record_id) diff --git a/addons/point_of_sale/wizard/pos_payment.py b/addons/point_of_sale/wizard/pos_payment.py index 565ae257180..aa4d200467a 100644 --- a/addons/point_of_sale/wizard/pos_payment.py +++ b/addons/point_of_sale/wizard/pos_payment.py @@ -124,6 +124,7 @@ class pos_make_payment(osv.osv_memory): return result def check(self, cr, uid, ids, context): + """Check the order: if the order is not paid: continue payment, if the order is paid print invoice (if wanted) or ticket. @@ -168,6 +169,10 @@ class pos_make_payment(osv.osv_memory): def create_invoice(self, cr, uid, ids, context): + + """ + Create a invoice + """ wf_service = netsvc.LocalService("workflow") active_ids = [context and context.get('active_id',False)] for i in active_ids: @@ -180,8 +185,6 @@ class pos_make_payment(osv.osv_memory): } def print_report(self, cr, uid, ids, context=None): - if not context: - context={} """ @summary: To get the date and print the report @param self: The object pointer. @@ -189,7 +192,9 @@ class pos_make_payment(osv.osv_memory): @param uid: ID of the user currently logged in @param context: A standard dictionary @return : retrun report - """ + """ + if not context: + context={} active_id=context.get('active_id',[]) datas = {'ids' : [active_id]} res = {} diff --git a/addons/point_of_sale/wizard/pos_payment_report_date.py b/addons/point_of_sale/wizard/pos_payment_report_date.py index c2e60a07045..d30ff412887 100644 --- a/addons/point_of_sale/wizard/pos_payment_report_date.py +++ b/addons/point_of_sale/wizard/pos_payment_report_date.py @@ -26,9 +26,6 @@ import time class pos_payment_report_date(osv.osv_memory): - ''' - Open ERP Model - ''' _name = 'pos.payment.report.date' _description = 'POS Payment Report according to date' def print_report(self, cr, uid, ids, context=None): diff --git a/addons/point_of_sale/wizard/pos_payment_report_user.py b/addons/point_of_sale/wizard/pos_payment_report_user.py index c8f32ff8cb0..e58073bdcbd 100644 --- a/addons/point_of_sale/wizard/pos_payment_report_user.py +++ b/addons/point_of_sale/wizard/pos_payment_report_user.py @@ -25,9 +25,6 @@ from osv import fields class pos_payment_report_user(osv.osv_memory): - ''' - Open ERP Model - ''' _name = 'pos.payment.report.user' _description = 'Sales lines by Users' def print_report(self, cr, uid, ids, context=None): diff --git a/addons/point_of_sale/wizard/pos_receipt.py b/addons/point_of_sale/wizard/pos_receipt.py index bf37288f55b..daf63fd6674 100644 --- a/addons/point_of_sale/wizard/pos_receipt.py +++ b/addons/point_of_sale/wizard/pos_receipt.py @@ -32,6 +32,14 @@ class pos_receipt(osv.osv_memory): } def view_init(self, cr, uid, fields_list, context=None): + """ + Creates view dynamically and adding fields at runtime. + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + @return: New arch of view with new columns. + """ order_lst = self. pool.get('pos.order').browse(cr, uid, context['active_id']) for order in order_lst: if order.state_2 in ('to_verify'): diff --git a/addons/point_of_sale/wizard/pos_return.py b/addons/point_of_sale/wizard/pos_return.py index 91a063df9a9..13a31057d28 100644 --- a/addons/point_of_sale/wizard/pos_return.py +++ b/addons/point_of_sale/wizard/pos_return.py @@ -63,6 +63,14 @@ class pos_return(osv.osv_memory): return res def view_init(self, cr, uid, fields_list, context=None): + """ + Creates view dynamically and adding fields at runtime. + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + @return: New arch of view with new columns. + """ res = super(pos_return, self).view_init(cr, uid, fields_list, context=context) order_obj=self.pool.get('pos.order') if not context: @@ -77,6 +85,18 @@ class pos_return(osv.osv_memory): return res def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): + + """ + Changes the view dynamically + + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + + @return: New arch of view. + + """ result = super(pos_return, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) if not context: context={} @@ -123,6 +143,15 @@ class pos_return(osv.osv_memory): def create_returns(self, cr, uid, data, context): + """ + @param self: The object pointer. + @param cr: A database cursor + @param uid: ID of the user currently logged in + @param context: A standard dictionary + + @return: Return the add product form again for adding more product + + """ return { 'name': _('Add Product'), 'view_type': 'form', From eca922ef2704d626005be6d8d681e6a4500464d2 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Thu, 27 May 2010 17:06:45 +0530 Subject: [PATCH 2/6] Task-ID 578: Improve the view of point_of_sale bzr revid: sbh@tinyerp.com-20100527113645-y7dw4k6o8vr2eoux --- addons/point_of_sale/pos_view.xml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/addons/point_of_sale/pos_view.xml b/addons/point_of_sale/pos_view.xml index a108c06dc9e..0aee6115682 100644 --- a/addons/point_of_sale/pos_view.xml +++ b/addons/point_of_sale/pos_view.xml @@ -85,6 +85,7 @@ + @@ -109,13 +110,10 @@ - - - - - - - + + + + From 4ded80f9ac16daf9433dad712a353dd29a94e9f5 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 28 May 2010 13:35:55 +0530 Subject: [PATCH 3/6] Task-ID 818: When a stock move is done for a product with real-time valuation write a account_move bzr revid: sbh@tinyerp.com-20100528080555-06p64q1hk61s02ph --- .../wizard/base_openoffice.py | 3 +- addons/stock/stock.py | 76 +++++++++++++------ 2 files changed, 56 insertions(+), 23 deletions(-) diff --git a/addons/base_report_designer/wizard/base_openoffice.py b/addons/base_report_designer/wizard/base_openoffice.py index d8e585b7ddb..054e027dbab 100644 --- a/addons/base_report_designer/wizard/base_openoffice.py +++ b/addons/base_report_designer/wizard/base_openoffice.py @@ -51,7 +51,8 @@ class base_openoffice(osv.osv_memory): _defaults = { 'name' : 'tiny_plugin-2.0.xpi', 'pdf_name' : 'Installation Guide to OpenOffice Report Desinger.pdf', - 'base_desinger_url':'http://doc.openerp.com/book/8/8_20_Config/8_20_Config_reports.html' + 'base_desinger_url':'http://doc.openerp.com/developer/7_23_RAD_tools/index.html#open-office-report-designer' + } base_openoffice() \ No newline at end of file diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 635231fcca5..80eb07d5b78 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -537,11 +537,14 @@ class stock_picking(osv.osv): } def copy(self, cr, uid, id, default=None, context={}): + picking_obj = self.browse(cr, uid, [id], context)[0] if default is None: default = {} default = default.copy() - if not default.get('name',False): - default['name'] = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking') + if ('name' not in default) or (picking_obj.get('name')=='/'): + seq_obj_name = 'stock.picking.' + picking_obj.type + default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name) + return super(stock_picking, self).copy(cr, uid, id, default, context) def onchange_partner_in(self, cr, uid, context, partner_id=None): @@ -1568,41 +1571,40 @@ class stock_move(osv.osv): acc_dest = None if move.product_id.valuation=='real_time': journal_id = move.product_id.categ_id.property_stock_journal and move.product_id.categ_id.property_stock_journal.id or False - if(move.location_id.usage=='internal' and move.location_dest_id.usage=='internal' and move.location_id.company_id.id!=move.location_dest_id.company_id.id) or ( move.location_id.usage=='internal' or move.location_dest_id.usage=='internal'): + if(move.location_id.usage=='internal' and move.location_dest_id.usage=='internal' and move.location_id.company_id.id!=move.location_dest_id.company_id.id): + test = [('product.product', move.product_id.id)] - if move.product_id.categ_id: - test.append( ('product.category', move.product_id.categ_id.id) ) + product_obj=self.pool.get('product.product') + accounts=product_obj.get_product_accounts(cr,uid,move.product_id.id,context) + acc_src=accounts['stock_account_input'] + acc_dest=accounts['stock_account_output'] + journal_id=accounts['stock_journal'] if not acc_src: - acc_src = move.product_id.product_tmpl_id.\ - property_stock_account_input.id - if not acc_src: - acc_src = move.product_id.categ_id.\ - property_stock_account_input_categ.id - if not acc_src: raise osv.except_osv(_('Error!'), _('There is no stock input account defined ' \ 'for this product: "%s" (id: %d)') % \ (move.product_id.name, move.product_id.id,)) if not acc_dest: - acc_dest = move.product_id.product_tmpl_id.\ - property_stock_account_output.id - if not acc_dest: - acc_dest = move.product_id.categ_id.\ - property_stock_account_output_categ.id - if not acc_dest: raise osv.except_osv(_('Error!'), _('There is no stock output account defined ' \ 'for this product: "%s" (id: %d)') % \ (move.product_id.name, move.product_id.id,)) - if not move.product_id.categ_id.property_stock_journal.id: + if not journal_id: raise osv.except_osv(_('Error!'), _('There is no journal defined '\ 'on the product category: "%s" (id: %d)') % \ (move.product_id.categ_id.name, move.product_id.categ_id.id,)) - journal_id = move.product_id.categ_id.property_stock_journal.id + + account_variation = move.product_id.categ_id.property_stock_variation + if not account_variation: + raise osv.except_osv(_('Error!'), + _('There is no variation account defined '\ + 'on the product category: "%s" (id: %d)') % \ + (move.product_id.categ_id.name, + move.product_id.categ_id.id,)) if acc_src != acc_dest: ref = move.picking_id and move.picking_id.name or False default_uom = move.product_id.uom_id.id @@ -1622,16 +1624,19 @@ class stock_move(osv.osv): partner_id = False if move.picking_id: partner_id = move.picking_id.address_id and (move.picking_id.address_id.partner_id and move.picking_id.address_id.partner_id.id or False) or False + lines = [ (0, 0, { 'name': move.name, 'quantity': move.product_qty, 'product_id': move.product_id and move.product_id.id or False, 'credit': amount, - 'account_id': acc_src, + 'account_id': account_variation and account_variation.id, 'ref': ref, 'date': date, - 'partner_id': partner_id}), + 'partner_id': partner_id, + 'company_id':move.location_id.company_id.id, + }), (0, 0, { 'name': move.name, 'product_id': move.product_id and move.product_id.id or False, @@ -1640,11 +1645,38 @@ class stock_move(osv.osv): 'account_id': acc_dest, 'ref': ref, 'date': date, - 'partner_id': partner_id}) + 'partner_id': partner_id, + 'company_id':move.location_id.company_id.id, + }), + + (0, 0, { + 'name': move.name, + 'quantity': move.product_qty, + 'product_id': move.product_id and move.product_id.id or False, + 'credit': amount, + 'account_id': acc_src, + 'ref': ref, + 'date': date, + 'partner_id': partner_id, + 'company_id':move.location_dest_id.company_id.id + }), + (0, 0, { + 'name': move.name, + 'product_id': move.product_id and move.product_id.id or False, + 'quantity': move.product_qty, + 'debit': amount, + 'account_id': account_variation and account_variation.id, + 'ref': ref, + 'date': date, + 'partner_id': partner_id, + 'company_id':move.location_dest_id.company_id.id + }) +# ] move_obj.create(cr, uid, { 'name': move.name, 'journal_id': journal_id, + 'type':'cont_voucher', 'line_id': lines, 'ref': ref, }) From c4368eae038947849d6408bac81c2bdf86a2dc1a Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 28 May 2010 17:07:10 +0530 Subject: [PATCH 4/6] Task-ID 818 :account_move when stock_move base on product bzr revid: sbh@tinyerp.com-20100528113710-jf2z3ocsnqnvludx --- addons/product/product.py | 4 +- addons/stock/stock.py | 166 ++++++++++++++++-------------------- addons/stock/stock_view.xml | 6 +- 3 files changed, 80 insertions(+), 96 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index 407125c841d..ce650e86c2f 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -215,7 +215,7 @@ class product_category(osv.osv): relation='account.account', string="Stock variation Account", method=True, - view_load=True,), + view_load=True, help="This account will be used in product when valuation type is real-time valuation ",), } @@ -467,7 +467,7 @@ class product_product(osv.osv): 'pricelist_id': fields.dummy(string='Pricelist',relation='product.pricelist', type='many2one'), 'valuation':fields.selection([('manual_periodic','Manual Periodic Valuation'), ('real_time','Real Time valuation'), - ('','')],'Valuation'), + ('','')],'Valuation',help="Decide if the system must automatically creates account moves based on stock moves"), } def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id): diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f51da3a81da..f59bb5f3533 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -541,7 +541,7 @@ class stock_picking(osv.osv): default = {} default = default.copy() picking_obj = self.browse(cr, uid, [id], context)[0] - if ('name' not in default) or (picking_obj.get('name')=='/'): + if ('name' not in default) or (picking_obj.name=='/'): seq_obj_name = 'stock.picking.' + picking_obj.type default['name'] = self.pool.get('ir.sequence').get(cr, uid, seq_obj_name) @@ -1546,8 +1546,12 @@ class stock_move(osv.osv): def action_done(self, cr, uid, ids, context={}): track_flag = False picking_ids = [] + lines=[] + sale=[] + purchase=[] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') + product_obj=self.pool.get('product.product') move_obj = self.pool.get('account.move') for move in self.browse(cr, uid, ids): if move.picking_id: picking_ids.append(move.picking_id.id) @@ -1570,116 +1574,72 @@ class stock_move(osv.osv): acc_src = None acc_dest = None if move.product_id.valuation=='real_time': + journal_id = move.product_id.categ_id.property_stock_journal and move.product_id.categ_id.property_stock_journal.id or False - if(move.location_id.usage=='internal' and move.location_dest_id.usage=='internal' and move.location_id.company_id.id!=move.location_dest_id.company_id.id): - - test = [('product.product', move.product_id.id)] - product_obj=self.pool.get('product.product') - accounts=product_obj.get_product_accounts(cr,uid,move.product_id.id,context) - acc_src=accounts['stock_account_input'] - acc_dest=accounts['stock_account_output'] - journal_id=accounts['stock_journal'] - if not acc_src: + accounts=product_obj.get_product_accounts(cr,uid,move.product_id.id,context) + account_variation = move.product_id.categ_id.property_stock_variation.id + acc_src=accounts['stock_account_input'] + acc_dest=accounts['stock_account_output'] + journal_id=accounts['stock_journal'] + if not acc_src: raise osv.except_osv(_('Error!'), _('There is no stock input account defined ' \ 'for this product: "%s" (id: %d)') % \ (move.product_id.name, move.product_id.id,)) - if not acc_dest: + if not acc_dest: raise osv.except_osv(_('Error!'), _('There is no stock output account defined ' \ 'for this product: "%s" (id: %d)') % \ (move.product_id.name, move.product_id.id,)) - if not journal_id: + if not journal_id: raise osv.except_osv(_('Error!'), _('There is no journal defined '\ 'on the product category: "%s" (id: %d)') % \ (move.product_id.categ_id.name, move.product_id.categ_id.id,)) - - account_variation = move.product_id.categ_id.property_stock_variation - if not account_variation: + if not account_variation: raise osv.except_osv(_('Error!'), _('There is no variation account defined '\ 'on the product category: "%s" (id: %d)') % \ (move.product_id.categ_id.name, move.product_id.categ_id.id,)) - if acc_src != acc_dest: - ref = move.picking_id and move.picking_id.name or False - default_uom = move.product_id.uom_id.id - date = time.strftime('%Y-%m-%d') - q = product_uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, default_uom) - if move.product_id.cost_method == 'average' and move.price_unit: - amount = q * move.price_unit - # Base computation on valuation price type - else: - company_id = move.company_id.id - context['currency_id'] = move.company_id.currency_id.id - pricetype = price_type_obj.browse(cr,uid,move.company_id.property_valuation_price_type.id) - amount_unit = move.product_id.price_get(pricetype.field, context)[move.product_id.id] - amount = amount_unit * q or 1.0 - # amount = q * move.product_id.standard_price - - partner_id = False - if move.picking_id: - partner_id = move.picking_id.address_id and (move.picking_id.address_id.partner_id and move.picking_id.address_id.partner_id.id or False) or False - - lines = [ - (0, 0, { - 'name': move.name, - 'quantity': move.product_qty, - 'product_id': move.product_id and move.product_id.id or False, - 'credit': amount, - 'account_id': account_variation and account_variation.id, - 'ref': ref, - 'date': date, - 'partner_id': partner_id, - 'company_id':move.location_id.company_id.id, - }), - (0, 0, { - 'name': move.name, - 'product_id': move.product_id and move.product_id.id or False, - 'quantity': move.product_qty, - 'debit': amount, - 'account_id': acc_dest, - 'ref': ref, - 'date': date, - 'partner_id': partner_id, - 'company_id':move.location_id.company_id.id, - }), - - (0, 0, { - 'name': move.name, - 'quantity': move.product_qty, - 'product_id': move.product_id and move.product_id.id or False, - 'credit': amount, - 'account_id': acc_src, - 'ref': ref, - 'date': date, - 'partner_id': partner_id, - 'company_id':move.location_dest_id.company_id.id - }), - (0, 0, { - 'name': move.name, - 'product_id': move.product_id and move.product_id.id or False, - 'quantity': move.product_qty, - 'debit': amount, - 'account_id': account_variation and account_variation.id, - 'ref': ref, - 'date': date, - 'partner_id': partner_id, - 'company_id':move.location_dest_id.company_id.id - }) -# - ] - move_obj.create(cr, uid, { - 'name': move.name, - 'journal_id': journal_id, - 'type':'cont_voucher', - 'line_id': lines, - 'ref': ref, - }) + if acc_src != acc_dest: + default_uom = move.product_id.uom_id.id + q = product_uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, default_uom) + if move.product_id.cost_method == 'average' and move.price_unit: + amount = q * move.price_unit + # Base computation on valuation price type + else: + company_id = move.company_id.id + context['currency_id'] = move.company_id.currency_id.id + pricetype = price_type_obj.browse(cr,uid,move.company_id.property_valuation_price_type.id) + amount_unit = move.product_id.price_get(pricetype.field, context)[move.product_id.id] + amount = amount_unit * q or 1.0 + # amount = q * move.product_id.standard_price + partner_id = False + if move.picking_id: + + if (move.location_id.usage=='internal' and move.location_dest_id.usage=='customer') or \ + (move.location_id.usage=='internal' and move.location_dest_id.usage=='internal'\ + and move.location_id.company_id.id!=move.location_dest_id.company_id.id): + + sale.append(self.create_account_move(cr,uid,move,account_variation ,acc_dest,amount,context)) + + if (move.location_id.usage =='supplier' and move.location_dest_id.usage=='internal') or\ + (move.location_id.usage=='internal' and move.location_dest_id.usage=='internal'\ + and move.location_id.company_id.id!=move.location_dest_id.company_id.id): + purchase.append(self.create_account_move(cr,uid,move,acc_src ,account_variation,amount,context)) + + lines=sale[0] +purchase[0] + move_obj.create(cr, uid, { + 'name': move.name, + 'journal_id': journal_id, + 'type':'cont_voucher', + 'line_id':lines, + 'ref': move.picking_id and move.picking_id.name, + }) tracking_lot = False if context: tracking_lot = context.get('tracking_lot', False) @@ -1698,7 +1658,31 @@ class stock_move(osv.osv): for id in ids: wf_service.trg_trigger(uid, 'stock.move', id, cr) return True - + + def create_account_move(self, cr, uid, move,account_id,account_variation,amount, context=None): + + partner_id = move.picking_id.address_id and (move.picking_id.address_id.partner_id and move.picking_id.address_id.partner_id.id or False) or False + lines=[(0, 0, { + 'name': move.name, + 'quantity': move.product_qty, + 'product_id': move.product_id and move.product_id.id or False, + 'credit': amount, + 'account_id': account_id, + 'ref': move.picking_id and move.picking_id.name or False, + 'date': time.strftime('%Y-%m-%d') , + 'partner_id': partner_id, + }), + (0, 0, { + 'name': move.name, + 'product_id': move.product_id and move.product_id.id or False, + 'quantity': move.product_qty, + 'debit': amount, + 'account_id': account_variation, + 'ref': move.picking_id and move.picking_id.name or False, + 'date': time.strftime('%Y-%m-%d') , + 'partner_id': partner_id, + })] + return lines def unlink(self, cr, uid, ids, context=None): if context is None: context = {} diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml index 7eab6aa8c3e..fab489fa163 100644 --- a/addons/stock/stock_view.xml +++ b/addons/stock/stock_view.xml @@ -757,7 +757,7 @@
- + @@ -937,7 +937,7 @@ - + @@ -1119,7 +1119,7 @@ - + From e382e9fa0eb0a2adc899f128665097471c6d7ad8 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 28 May 2010 17:19:17 +0530 Subject: [PATCH 5/6] stock:Fix the small bug in move bzr revid: sbh@tinyerp.com-20100528114917-ft0jk5w7ioee47ed --- addons/stock/stock.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index f59bb5f3533..e647f622e22 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1624,20 +1624,22 @@ class stock_move(osv.osv): if (move.location_id.usage=='internal' and move.location_dest_id.usage=='customer') or \ (move.location_id.usage=='internal' and move.location_dest_id.usage=='internal'\ and move.location_id.company_id.id!=move.location_dest_id.company_id.id): - + print "<<<<<<<<<<<<< Date: Fri, 28 May 2010 17:27:08 +0530 Subject: [PATCH 6/6] stock: remove print statement bzr revid: sbh@tinyerp.com-20100528115708-r5ptklifia2lkkkz --- addons/stock/stock.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index e647f622e22..2c0935df7f2 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1624,13 +1624,12 @@ class stock_move(osv.osv): if (move.location_id.usage=='internal' and move.location_dest_id.usage=='customer') or \ (move.location_id.usage=='internal' and move.location_dest_id.usage=='internal'\ and move.location_id.company_id.id!=move.location_dest_id.company_id.id): - print "<<<<<<<<<<<<<