From 2b7a6e29330deb18e8de7fb7f2118bf6b28fee9d Mon Sep 17 00:00:00 2001 From: Monica Date: Thu, 19 Mar 2015 00:29:50 -0400 Subject: [PATCH 01/11] [FIX] purchase_requisition: avoid errors on service based requisitions When the product type is Service, the procurement doesn't have stock move. Confirming the purchase order linked to such procurement would fail. --- addons/purchase_requisition/purchase_requisition.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/purchase_requisition/purchase_requisition.py b/addons/purchase_requisition/purchase_requisition.py index 2d3708b6710..c66af2c8e55 100644 --- a/addons/purchase_requisition/purchase_requisition.py +++ b/addons/purchase_requisition/purchase_requisition.py @@ -221,7 +221,8 @@ class purchase_order(osv.osv): if po.requisition_id and all(purchase_id.state in ['draft', 'cancel'] for purchase_id in po.requisition_id.purchase_ids if purchase_id.id != po.id): procurement_ids = self.pool['procurement.order'].search(cr, uid, [('requisition_id', '=', po.requisition_id.id)], context=context) for procurement in proc_obj.browse(cr, uid, procurement_ids, context=context): - procurement.move_id.write({'location_id': procurement.move_id.location_dest_id.id}) + if procurement.move_id: + procurement.move_id.write({'location_id': procurement.move_id.location_dest_id.id}) return res purchase_order() From 3cae2c51555f931d8a27ef83483fc386e33b10cb Mon Sep 17 00:00:00 2001 From: Rifakathusen Haradwala Date: Fri, 5 Sep 2014 17:36:52 +0530 Subject: [PATCH 02/11] [FIX] account: wrong tax amount for manual tax line On an invoice, tax lines are generated in tax_line field. When modifying manually the tax amount, the recomputed tax_amount field was incorrect in multicurrency environment, leading to an entry with different tax amount and debit value. opw 611474 --- addons/account/account_invoice.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index f90c9661c09..7b5d8b818a0 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1696,13 +1696,10 @@ class account_invoice_tax(osv.osv): cur_obj = self.pool.get('res.currency') company_obj = self.pool.get('res.company') company_currency = False - factor = 1 - if ids: - factor = self.read(cr, uid, ids[0], ['factor_tax'])['factor_tax'] if company_id: company_currency = company_obj.read(cr, uid, [company_id], ['currency_id'])[0]['currency_id'][0] if currency_id and company_currency: - amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount*factor, context={'date': date_invoice or fields.date.context_today(self, cr, uid)}, round=False) + amount = cur_obj.compute(cr, uid, currency_id, company_currency, amount, context={'date': date_invoice or fields.date.context_today(self, cr, uid)}, round=False) return {'value': {'tax_amount': amount}} _order = 'sequence' From 0a1f52ccb5b3704d65760e392f123fab15e3847f Mon Sep 17 00:00:00 2001 From: han-odoo Date: Mon, 6 Oct 2014 11:41:14 +0530 Subject: [PATCH 03/11] [FIX] account: prevent removing closing entries for closed period As the target period is closed, should not be able to delete closing entries. opw 610428 --- addons/account/wizard/account_open_closed_fiscalyear.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account/wizard/account_open_closed_fiscalyear.py b/addons/account/wizard/account_open_closed_fiscalyear.py index 3b5d956d381..145b805c95f 100644 --- a/addons/account/wizard/account_open_closed_fiscalyear.py +++ b/addons/account/wizard/account_open_closed_fiscalyear.py @@ -38,6 +38,9 @@ class account_open_closed_fiscalyear(osv.osv_memory): if not period_journal: raise osv.except_osv(_('Error!'), _("You have to set the 'End of Year Entries Journal' for this Fiscal Year which is set after generating opening entries from 'Generate Opening Entries'.")) + if period_journal.period_id.state == 'done': + raise osv.except_osv(_('Error!'), _("You can not cancel closing entries if the 'End of Year Entries Journal' period is closed.")) + ids_move = move_obj.search(cr, uid, [('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)]) if ids_move: cr.execute('delete from account_move where id IN %s', (tuple(ids_move),)) From e311a423cd95ade8c2af01b36654198e50405b9d Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 31 Mar 2015 10:58:43 +0200 Subject: [PATCH 04/11] [FIX] product: ratio help tooltip according to type in UOMs In the form view of a unit of measure, if the unit of measure was of type "Bigger than the reference unit" The help in the tooltip of the ratio field was wrong Besides, this help message was contradictory with the formula written just below the field. opw-631672 --- addons/product/product_view.xml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index f0908ddc46e..47fdcbdd51c 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -419,23 +419,20 @@ -