[6.0] Error related with analytic accounts creating a sales invoice from picking that come from sales order with services
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Environment: at stable 6.0 version, with installed modules "base", "stock", "sale", "purchase" and "analytic". Important: the modules "account_
If you try to create a sales invoice from picking that comes to a sales order that contains services and stockable products, the next error occurs: Field 'purchase_line_id' does not exist in object 'browse_
The origin of this error really is the "sale" module, when try to add the services lines into invoice, at method "action_
But the solution involves:
(1) the module "purchase", because also inherits the method "_get_account_
(2) the module "account_
These are the corrections that I've applied to fix the bug:
(1) At file "stock.py" from addon "sale", at function "def action_
- account_analytic_id = self._get_
+ account_analytic_id = self._get_
2) At file "stock.py" from addon "purchase", at function "def _get_account_
- if move_line.
+ if move_line and move_line.
3) At file "account_
- rec = self.pool.
+ product_id = False or move_line and move_line.
+ rec = self.pool.
I hope it's useful for you.
Hello,
I have tested the scenario but did not able to meet with the traceback. I have attached the screen shot for the reference, So please refer it and notify us if problem still persists at your end.
Thanks.