Amit Dodiya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw-573828-ado into
lp:openobject-addons/6.0.
Requested reviews:
Xavier ALT (OpenERP) (xal-openerp)
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-573828-ado/+merge/102434
Hello,
"[FIX] Payment term of a supplier is not transferred when creating the invoice
with invoicing control is from picking"
Steps to reproduce:
1). Add Payment term in a supplier(Ex:Axelor)
2). Create purchase order with invoicing control = from picking
3). Confirm the purchase order, complete the reception and create invoice from
picking
You will see the payment term you select in supplier is not in the created
invoice, Payment term should be there.
Regards,
Amit
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-573828-ado/+merge/102434
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw-573828-ado.
=== modified file 'purchase/stock.py'
--- purchase/stock.py 2012-03-26 14:26:25 +0000
+++ purchase/stock.py 2012-04-18 05:34:18 +0000
@@ -131,6 +131,7 @@
context=context)
picking_ids = result.keys()
invoice_ids = result.values()
+ payment_term_id = False
invoices = {}
for invoice in invoice_obj.browse(cr, uid, invoice_ids,
context=context):
@@ -143,6 +144,12 @@
purchase_lines = picking.purchase_id.order_line
invoice_created = invoices[result[picking.id]]
+ if picking.purchase_id.partner_id.property_payment_term:
+ payment_term_id = picking.purchase_id.partner_id.property_payment_term.id
+ else:
+ payment_term_id = picking.purchase_id.partner_address_id.partner_id.property_payment_term.id
+ invoice_obj.write(cr, uid, [invoice_created.id], {'payment_term': payment_term_id}, context=context)
+
if picking.purchase_id.fiscal_position:
invoice_obj.write(cr, uid, [invoice_created.id], {'fiscal_position': picking.purchase_id.fiscal_position.id}, context=context)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp