openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #05739
[Bug 922427] [NEW] [6.1/trunk] invoice upon picking: re-attached service lines have wrong fiscal position
Public bug reported:
Hello,
in trunk addons, if you create a sale order with both stockable products and service. Set invoicing method as "from picking".
Set some specific fiscal position.
Then validate and create the picking.
Then create an invoice from the picking.
The invoice line corresponding to the service line will have the fiscal
position of the sale order partner (if any), not the one specifically
set on the sale order (can be different).
This is because of the following code in sale/stock.py around line 188:
account_id = fiscal_position_obj.map_account(cursor, user, picking.sale_id.partner_id.property_account_position, account_id)
In fact, the fiscal position could have been set different on the sale order.
On the contrary, the creation of an invoice line from a sale order gets it right, with the following code in sale/sale.py:
fpos = line.order_id.fiscal_position or False
I'm about to propose a merge proposal factoring those two invoice line
creation method in a single method with no such bug, so stay tuned.
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/922427
Title:
[6.1/trunk] invoice upon picking: re-attached service lines have wrong
fiscal position
Status in OpenERP Addons (modules):
New
Bug description:
Hello,
in trunk addons, if you create a sale order with both stockable products and service. Set invoicing method as "from picking".
Set some specific fiscal position.
Then validate and create the picking.
Then create an invoice from the picking.
The invoice line corresponding to the service line will have the
fiscal position of the sale order partner (if any), not the one
specifically set on the sale order (can be different).
This is because of the following code in sale/stock.py around line 188:
account_id = fiscal_position_obj.map_account(cursor, user, picking.sale_id.partner_id.property_account_position, account_id)
In fact, the fiscal position could have been set different on the sale order.
On the contrary, the creation of an invoice line from a sale order gets it right, with the following code in sale/sale.py:
fpos = line.order_id.fiscal_position or False
I'm about to propose a merge proposal factoring those two invoice line
creation method in a single method with no such bug, so stay tuned.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/922427/+subscriptions
Follow ups
References