Quang Nguyen c4f42b813e [FIX] stock_account: Correctly pass ID rather than record
When trying to prepare account move line, we are unexpectedly browsing a record instead of the record's ID. This causes
psycopg2.ProgrammingError: can't adapt type 'stock.valuation.layer'

Step to reproduce:

1. Set up product

	storable
	Average cost
	Automated Inventory Valuation
	set a standard price e.g $27
2. Create a purchase order for 1 unit in another currency E.g Eur

3. Confirm the purchase order and validate the transfer.

4. Go on the transfer and create a return. Change the return quantity to be more than what received E.g 100

5. Process the return.

6. Go back to the purchase order and create a vendor bill

7. Now try to create a new purchase order and receive the item.

Fix:

pass in vacuum_svl.id instead of just vacuum_svl into _prepare_account_move_line

opw-3555146

closes odoo/odoo#142798

X-original-commit: a5cdbbc3c0a8b617cb6efe151621ad06216e812c
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-12-05 12:18:52 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-12-01 19:25:36 +00:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%