openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #06779
lp:~openerp-dev/openobject-addons/trunk-addons3-account-sale-hr-project-pso into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind
Priyesh (Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-addons3-account-sale-hr-project-pso into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons3-account-sale-hr-project-pso/+merge/60907
Fixed
1. type=code in tax was not working for address
2. Put exception for canceling sale order with service type product
3. multi chart account wizard digits more than 64
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons3-account-sale-hr-project-pso/+merge/60907
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/trunk-addons3-account-sale-hr-project-pso into lp:~openerp-dev/openobject-addons/trunk-bugfixes-Ind.
=== modified file 'account/account.py'
--- account/account.py 2011-05-05 14:43:40 +0000
+++ account/account.py 2011-05-13 12:18:30 +0000
@@ -2699,6 +2699,8 @@
todo_dict = {}
#create all the tax code
+ if obj_multi.code_digits > 64:
+ raise osv.except_osv(_('Error !'),_("You cannot configure digits more than 64!"))
children_tax_code_template = obj_tax_code_template.search(cr, uid, [('parent_id','child_of',[tax_code_root_id])], order='id')
children_tax_code_template.sort()
for tax_code_template in obj_tax_code_template.browse(cr, uid, children_tax_code_template, context=context):
=== modified file 'account/invoice.py'
--- account/invoice.py 2011-05-03 09:03:54 +0000
+++ account/invoice.py 2011-05-13 12:18:30 +0000
@@ -1246,7 +1246,7 @@
cur_obj = self.pool.get('res.currency')
for line in self.browse(cr, uid, ids):
price = line.price_unit * (1-(line.discount or 0.0)/100.0)
- taxes = tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, price, line.quantity, product=line.product_id, address_id=line.invoice_id.address_invoice_id, partner=line.invoice_id.partner_id)
+ taxes = tax_obj.compute_all(cr, uid, line.invoice_line_tax_id, price, line.quantity, product=line.product_id, address_id=line.invoice_id.address_invoice_id.id, partner=line.invoice_id.partner_id)
res[line.id] = taxes['total']
if line.invoice_id:
cur = line.invoice_id.currency_id
=== modified file 'project_mrp/project_procurement.py'
--- project_mrp/project_procurement.py 2011-02-02 13:24:37 +0000
+++ project_mrp/project_procurement.py 2011-05-13 12:18:30 +0000
@@ -20,8 +20,8 @@
##############################################################################
from osv import fields, osv, orm
-
import tools
+from tools.translate import _
class procurement_order(osv.osv):
_name = "procurement.order"
@@ -50,9 +50,24 @@
'state': 'draft',
'company_id': procurement.company_id.id,
},context=context)
- self.write(cr, uid, [procurement.id],{'task_id':task_id})
+ self.write(cr, uid, [procurement.id],{'task_id':task_id})
return task_id
procurement_order()
+class sale_order(osv.osv):
+ _inherit = 'sale.order'
+
+ def action_cancel(self, cr, uid, ids, context=None):
+ res = super(sale_order, self).action_cancel(cr, uid, ids, context=context)
+ for order in self.browse(cr, uid, ids, context=context):
+ for line in order.order_line:
+ if line.procurement_id.task_id and line.procurement_id.task_id.state not in ('draft', 'cancelled'):
+ raise osv.except_osv(
+ _('Could not cancel sales order !'),
+ _('You must first cancel all task related to this sales order.'))
+ return res
+
+sale_order()
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
Follow ups