Nasreddin Boulif (bon) 7df349883d [FIX] account: Fallback on self.env.user language if not user_id on PO
Steps to reproduce:

  - Install purchase and accounting apps
  - Set the database to a language that is not English
  - Create a purchase order
  - Remove purchase representative from PO (otherwise, no issue)
  - Action -> Create Vendor Bill
  - From the vendor bill, print invoice

Issue:

  The pdf is in English (country names, date labels, etc...)

Cause:

  If invoice type is `in_invoice` or `in_refund`, it will use the
  `invoice_user_id` language (object.invoice_user_id.sudo().lang).
  In the above case, there is no invoice_user_id on invoice.

Solution:

  While preparing invoice values, set invoice_user_id to
  self.env.user.id if not user_id on PO.

opw-2510134

closes odoo/odoo#74671

X-original-commit: 4b7569ce641a6fb20d5df676bf0b315d9b9d485d
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-08-03 18:00:53 +00:00
2021-08-02 07:53:17 +00:00
…
…
…
2020-09-28 14:07:25 +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%