From 2070be7bf5d5c279b7921d1cd4d86212501a7f37 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 21 Oct 2010 12:02:20 +0530 Subject: [PATCH 1/6] [IMP] Invoice line-Taxes field nolable with separator string bzr revid: ron@tinyerp.com-20101021063220-cdxeihm34gagy5gj --- addons/account/account_invoice_view.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 4d4b0a3022f..a7da472e760 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -63,7 +63,9 @@ - + + From 75b72c807449a85222448b367f131209161fdce7 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 21 Oct 2010 13:03:27 +0530 Subject: [PATCH 2/6] [FIX]Purchase->Addressbook->supplier:Create opportunities bzr revid: ron@tinyerp.com-20101021073327-5fi72y0fcwum949h --- addons/crm/wizard/crm_partner_to_opportunity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/wizard/crm_partner_to_opportunity.py b/addons/crm/wizard/crm_partner_to_opportunity.py index 0df19df8eb7..865096498f1 100644 --- a/addons/crm/wizard/crm_partner_to_opportunity.py +++ b/addons/crm/wizard/crm_partner_to_opportunity.py @@ -84,7 +84,7 @@ class crm_partner2opportunity(osv.osv_memory): categ_obj = self.pool.get('crm.case.categ') - categ_ids = categ_obj.search(cr, uid, [('name','ilike','Part%')]) + categ_ids = categ_obj.search(cr, uid, [('name','ilike','other%')]) case_obj = self.pool.get('crm.lead') opp_id = case_obj.create(cr, uid, { From 5806a89fbe5dbc0401fe965a62999178838dead8 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Fri, 22 Oct 2010 12:56:06 +0530 Subject: [PATCH 3/6] [FIX] Purchase Requisition:Request Quatation Opening Wizard bzr revid: ron@tinyerp.com-20101022072606-s4ic3wsuogwxve6e --- .../purchase_requisition_demo.xml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/addons/purchase_requisition/purchase_requisition_demo.xml b/addons/purchase_requisition/purchase_requisition_demo.xml index ff9bba7c700..d5a0dfd5391 100644 --- a/addons/purchase_requisition/purchase_requisition_demo.xml +++ b/addons/purchase_requisition/purchase_requisition_demo.xml @@ -1,27 +1,26 @@ - + - + TE0001 multiple 2010/09/16 15:56:14 - + - + - + - + 5 - - + + - \ No newline at end of file From d8d5a563980ab0a48571f896bf0702c38ed18396 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Tue, 26 Oct 2010 19:26:22 +0530 Subject: [PATCH 4/6] [FIX] BUG:-666362 sale Invoice Control Status Rename "Not from Picking" to From Ordered Quantities bzr revid: ron@tinyerp.com-20101026135622-d57kelps5grfr6b5 --- addons/stock/stock.py | 44 ++++++++++++------------- addons/stock_location/stock_location.py | 4 +-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index fe984b10f22..a0ad98adc86 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -356,7 +356,7 @@ class stock_location(osv.osv): Attempt to find a quantity ``product_qty`` (in the product's default uom or the uom passed in ``context``) of product ``product_id`` in locations with id ``ids`` and their child locations. If ``lock`` is True, the stock.move lines of product with id ``product_id`` in the searched location will be write-locked using Postgres's - "FOR UPDATE NOWAIT" option until the transaction is committed or rolled back, to prevent reservin + "FOR UPDATE NOWAIT" option until the transaction is committed or rolled back, to prevent reservin twice the same products. If ``lock`` is True and the lock cannot be obtained (because another transaction has locked some of the same stock.move lines), a log line will be output and False will be returned, as if there was @@ -501,14 +501,14 @@ class stock_tracking(osv.osv): def unlink(self, cr, uid, ids, context=None): raise osv.except_osv(_('Error'), _('You can not remove a lot line !')) - + def action_traceability(self, cr, uid, ids, context={}): """ It traces the information of a product @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in - @param ids: List of IDs selected - @param context: A standard dictionary + @param ids: List of IDs selected + @param context: A standard dictionary @return: A dictionary of values """ value={} @@ -636,7 +636,7 @@ class stock_picking(osv.osv): 'invoice_state': fields.selection([ ("invoiced", "Invoiced"), ("2binvoiced", "To Be Invoiced"), - ("none", "Not from Picking")], "Invoice Control", + ("none", "From Ordered Quantities")], "Invoice Control", select=True, required=True, readonly=True, states={'draft': [('readonly', False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True, select=True), } @@ -682,7 +682,7 @@ class stock_picking(osv.osv): picking_obj = self.browse(cr, uid, [res], context)[0] for move in picking_obj.move_lines: move_obj.write(cr, uid, [move.id], {'tracking_id': False,'prodlot_id':False}) - return res + return res def onchange_partner_in(self, cr, uid, context=None, partner_id=None): return {} @@ -1087,14 +1087,14 @@ class stock_picking(osv.osv): if move.state not in ('cancel',): return False return True - + def allow_cancel(self, cr, uid, ids, context={}): for pick in self.browse(cr, uid, ids, context=context): if not pick.move_lines: return True for move in pick.move_lines: if move.state == 'done': - raise osv.except_osv(_('Error'), _('You cannot cancel picking because stock move is in done state !')) + raise osv.except_osv(_('Error'), _('You cannot cancel picking because stock move is in done state !')) return True def unlink(self, cr, uid, ids, context=None): move_obj = self.pool.get('stock.move') @@ -1182,7 +1182,7 @@ class stock_picking(osv.osv): # Record the values that were chosen in the wizard, so they can be # used for inventory valuation if real-time valuation is enabled. - move_obj.write(cr, uid, [move.id], + move_obj.write(cr, uid, [move.id], {'price_unit': product_price, 'price_currency_id': product_currency}) @@ -1355,7 +1355,7 @@ class stock_production_lot(osv.osv): 'prefix': fields.char('Prefix', size=64, help="Optional prefix to prepend when displaying this serial number: PREFIX/SERIAL [INT_REF]"), 'product_id': fields.many2one('product.product', 'Product', required=True), 'date': fields.datetime('Creation Date', required=True), - 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, method=True, type="float", string="Available", select=True, + 'stock_available': fields.function(_get_stock, fnct_search=_stock_search, method=True, type="float", string="Available", select=True, help="Current quantity of products with this Production Lot Number available in company warehouses", digits_compute=dp.get_precision('Product UoM')), 'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'), @@ -1375,8 +1375,8 @@ class stock_production_lot(osv.osv): @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in - @param ids: List of IDs selected - @param context: A standard dictionary + @param ids: List of IDs selected + @param context: A standard dictionary @return: A dictionary of values """ value=self.pool.get('action.traceability').action_traceability(cr,uid,ids,context) @@ -1510,7 +1510,7 @@ class stock_move(osv.osv): if context.get('move_line', []): if context['move_line'][0]: if isinstance(context['move_line'][0], (tuple, list)): - return context['move_line'][0][2] and context['move_line'][0][2].get('location_dest_id',False) + return context['move_line'][0][2] and context['move_line'][0][2].get('location_dest_id',False) else: move_list = self.pool.get('stock.move').read(cr, uid, context['move_line'][0], ['location_dest_id']) return move_list and move_list['location_dest_id'][0] or False @@ -1871,7 +1871,7 @@ class stock_move(osv.osv): """ Return the accounts and journal to use to post Journal Entries for the real-time valuation of the move. - + :param context: context dictionary that can explicitly mention the company to consider via the 'force_company' key :raise: osv.except_osv() is any mandatory account or journal is not defined. """ @@ -1911,13 +1911,13 @@ class stock_move(osv.osv): default_uom = move.product_id.uom_id.id qty = product_uom_obj._compute_qty(cr, uid, move.product_uom.id, move.product_qty, default_uom) - # if product is set to average price and a specific value was entered in the picking wizard, + # if product is set to average price and a specific value was entered in the picking wizard, # we use it if move.product_id.cost_method == 'average' and move.price_unit: reference_amount = qty * move.price_unit reference_currency_id = move.price_currency_id.id or reference_currency_id - # Otherwise we default to the company's valuation price type, considering that the values of the + # Otherwise we default to the company's valuation price type, considering that the values of the # valuation field are expressed in the default currency of the move's company. else: if context is None: @@ -1959,7 +1959,7 @@ class stock_move(osv.osv): move_obj = self.pool.get('account.move') for j_id, move_lines in account_moves: - move_obj.create(cr, uid, + move_obj.create(cr, uid, {'name': move.name, 'journal_id': j_id, 'line_id': move_lines, @@ -2017,10 +2017,10 @@ class stock_move(osv.osv): def _create_account_move_line(self, cr, uid, move, src_account_id, dest_account_id, reference_amount, reference_currency_id, context=None): """ - Generate the account.move.line values to post to track the stock valuation difference due to the + Generate the account.move.line values to post to track the stock valuation difference due to the processing of the given stock move. """ - # prepare default values considering that the destination accounts have the reference_currency_id as their main currency + # prepare default values considering that the destination accounts have the reference_currency_id as their main currency 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 debit_line_vals = { 'name': move.name, @@ -2044,7 +2044,7 @@ class stock_move(osv.osv): } # if we are posting to accounts in a different currency, provide correct values in both currencies correctly - # when compatible with the optional secondary currency on the account. + # when compatible with the optional secondary currency on the account. # Financial Accounts only accept amounts in secondary currencies if there's no secondary currency on the account # or if it's the same as that of the secondary amount being posted. account_obj = self.pool.get('account.account') @@ -2312,7 +2312,7 @@ class stock_move(osv.osv): # Record the values that were chosen in the wizard, so they can be # used for inventory valuation if real-time valuation is enabled. - self.write(cr, uid, [move.id], + self.write(cr, uid, [move.id], {'price_unit': product_price, 'price_currency_id': product_currency, }) @@ -2385,7 +2385,7 @@ class stock_inventory(osv.osv): 'state': 'draft', 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c) } - + def _inventory_line_hook(self, cr, uid, inventory_line, move_vals): """ Creates a stock move from an inventory line @param inventory_line: diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index 1b308f0ec27..357e944b44e 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -38,7 +38,7 @@ class stock_location_path(osv.osv): 'invoice_state': fields.selection([ ("invoiced", "Invoiced"), ("2binvoiced", "To Be Invoiced"), - ("none", "Not from Picking")], "Invoice Status", + ("none", "From Ordered Quantities")], "Invoice Status", required=True,), 'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"), 'auto': fields.selection( @@ -77,7 +77,7 @@ class product_pulled_flow(osv.osv): 'invoice_state': fields.selection([ ("invoiced", "Invoiced"), ("2binvoiced", "To Be Invoiced"), - ("none", "Not from Picking")], "Invoice Status", + ("none", "From Ordered Quantities")], "Invoice Status", required=True,), } _defaults = { From 8f0095a006d3d40057737d23baeca48aaef04c81 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 28 Oct 2010 12:50:11 +0530 Subject: [PATCH 5/6] [FIX] avoid negative wording lp bug: https://launchpad.net/bugs/666362 fixed bzr revid: ron@tinyerp.com-20101028072011-19v0gxf5dr3kqbpa --- addons/stock/stock.py | 2 +- addons/stock_location/stock_location.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 3a53a4c030a..4b3aa5d1667 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -636,7 +636,7 @@ class stock_picking(osv.osv): 'invoice_state': fields.selection([ ("invoiced", "Invoiced"), ("2binvoiced", "To Be Invoiced"), - ("none", "From Ordered Quantities")], "Invoice Control", + ("none", "Not Applicable")], "Invoice Control", select=True, required=True, readonly=True, states={'draft': [('readonly', False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True, select=True), } diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index 357e944b44e..01d3b906d29 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -38,7 +38,7 @@ class stock_location_path(osv.osv): 'invoice_state': fields.selection([ ("invoiced", "Invoiced"), ("2binvoiced", "To Be Invoiced"), - ("none", "From Ordered Quantities")], "Invoice Status", + ("none", "Not Applicable")], "Invoice Status", required=True,), 'picking_type': fields.selection([('out','Sending Goods'),('in','Getting Goods'),('internal','Internal')], 'Shipping Type', required=True, select=True, help="Depending on the company, choose whatever you want to receive or send products"), 'auto': fields.selection( @@ -77,7 +77,7 @@ class product_pulled_flow(osv.osv): 'invoice_state': fields.selection([ ("invoiced", "Invoiced"), ("2binvoiced", "To Be Invoiced"), - ("none", "From Ordered Quantities")], "Invoice Status", + ("none", "Not Applicable")], "Invoice Status", required=True,), } _defaults = { From 70d2b044c4085582ad1d36be45b347914255a3c7 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Thu, 28 Oct 2010 13:52:04 +0530 Subject: [PATCH 6/6] [FIX]Invoice Control in Purchase Order: change Tooltip lp bug: https://launchpad.net/bugs/667324 fixed bzr revid: ron@tinyerp.com-20101028082204-1ishats06a14b5p1 --- addons/purchase/purchase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 91b361c19ee..6f50a5ef386 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -34,7 +34,7 @@ from osv.orm import browse_record, browse_null # Model definition # class purchase_order(osv.osv): - + def _calc_amount(self, cr, uid, ids, prop, unknow_none, unknow_dict): res = {} for order in self.browse(cr, uid, ids): @@ -42,7 +42,7 @@ class purchase_order(osv.osv): for oline in order.order_line: res[order.id] += oline.price_unit * oline.product_qty return res - + def _amount_all(self, cr, uid, ids, field_name, arg, context=None): res = {} cur_obj=self.pool.get('res.currency') @@ -186,7 +186,7 @@ class purchase_order(osv.osv): 'invoice_method': fields.selection([('manual','Manual'),('order','From Order'),('picking','From Picking')], 'Invoicing Control', required=True, help="From Order: a draft invoice will be pre-generated based on the purchase order. The accountant " \ "will just have to validate this invoice for control.\n" \ - "From Picking: a draft invoice will be pre-generated based on validated receptions.\n" \ + "From Picking: you manually have to generate the invoices based on the receptions.\n" \ "Manual: no invoice will be pre-generated. The accountant will have to encode manually." ), 'minimum_planned_date':fields.function(_minimum_planned_date, fnct_inv=_set_minimum_planned_date, method=True,store=True, string='Expected Date', type='date', help="This is computed as the minimum scheduled date of all purchase order lines' products."),