Ethan Vincent 4b2286bd5b [FIX] sale{,_expense}: bad conversion distr. keys
**Current behavior:**
Trying to post journal entries for an expense report sheet
contianing an expense that has:
  A) an associated analytic distribution with
     both a Project and Department, and
  B) a customer to be re-invoiced (requires the expense
     to be for a product which permits this operation),
attempting to post the journal entries for the approved expense
sheet will raise a ValueError.

---

**Expected behavior:**
The entries get posted to their respective accounting journals.

---

Steps to reproduce:
0. Install the Project, Accounting, Sales, Expense apps
   and enable analytic accounting in the db settings

1. Create a new expense with:
   A) an analytic distribution which has
      both available fields filled out, and
   B) a category that permits a customer to be re-invoiced
      (then enter a customer)

2. Create the report, submit it to the manager, approve it,
   then attempt to post the journal entries

3. This should cause the traceback, if the process was blocked
   try again after deleting any tax rules in the expense

---

Cause of the issue:
The analytic_distribution field in the hr.expense module is
stored as a dictionary. During the process of recording the
journal entries, the keys are converted from a string to
integers. However, when multiple keys are in the dict, the
conversion is set up improperly and fails.

---

Fix:
Modify the conversion sequence so that multiple dict keys are
accounted for.

---

opw-3663082

closes odoo/odoo#147985

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2024-01-31 01:31:53 +00:00
2023-11-02 21:02:44 +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%