Commit Graph
157346 Commits
Author SHA1 Message Date
joda-odoo 241ee24b40 [FIX] l10n_id_efaktur: Fix a TypeError exception on efaktur
When a user that doesn't have to right on "Multi company", efaktur will crash
when creating a new entry to e-Faktur.

This is due to a missing permission on the field "company".
This fix to set "company" to invisible when the user is not in the
base.group_multi_company group

opw-3052775

closes odoo/odoo#109082

X-original-commit: 3e389564601928737647472a36056246209d05b9
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-01-09 12:22:49 +01:00
Joseph Caburnay 84d9cb9271 [IMP] web: auto-select content on focus for autocomplete (e.g. m2o) fields
On first focus in an autocomplete field, the text content of the input element
is automatically highlighted.

closes odoo/odoo#109025

Task-id: 3117420
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-09 12:22:46 +01:00
Adrien Guilliams (adgu) 5c8cc3551f [FIX] pos_sale: can't open SO management screen
The press of the SO button in the ProductScreen of a PoS config returns an error when pressing it.

The fix changes the import made to PosContext and the use of this import
in the SaleOrderManagementScreen.js file so that the press of the SO button works as it should.

closes odoo/odoo#108923

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-09 12:22:41 +01:00
Alvaro Fuentes b21ecab391 [FIX] mrp: avoid MemoryError in _get_orderpoint_products
`super()._get_orderpoint_products()` returns more than 1 million
products. Applying _bom_find to all of them is too much.
https://github.com/odoo/odoo/blob/55e327705deed2aa31c1fc9eca49a8a66135c020/addons/stock/models/stock_orderpoint.py#L567-L568

Issue observer on menu Inventory > Operations > Replenishment during
upgrades to 16.0

closes odoo/odoo#109311

X-original-commit: 263cb8eafb3ac0db5cb950e66dba3c924e52f187
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
2023-01-09 10:11:27 +01:00
niyasraphy 60cfa55448 [IMP] crm: remove updating same name for the menu
Before this commit the name assigned for the res_partner_menu_config menu from
contacts and crm module is the same. Thus we remove the writing of same name
again from crm module. Moreover this allows easier update of the
name.

closes odoo/odoo#109307

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-09 10:11:24 +01:00
Loan (LSE) 9995dce823 [FIX] point_of_sale: better error when missing nomenclature
Before this commit:
If the PoS config have no "Barcode Nomenclature" set, the PoS
session can't start and a cryptic JS traceback will be shown:
```js
TypeError: Cannot read properties of undefined (reading 'message')
at Chrome.start
```
This happen as the barcode rejected Promise request doesn't contains
an error message. More details in:
https://github.com/odoo/odoo/pull/108797

After this commit:
A more user friendly error is displayed

Note: the issue does not happen in previous Odoo's versions
as the field was required before.

opw-3110204

closes odoo/odoo#109191

X-original-commit: fae1f0e363587ac743cac2a7102528f1db4ec83b
Signed-off-by: Loan (LSE) <lse@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-01-09 10:11:21 +01:00
smdc-odoo 3ffb54becc [IMP] account: Add the option to see the total amount in currency in a mono-currency DB
Currently, when a company is in a mono-currency environment, they can't
display the total amount in currency when looking at invoices, payments,
vendor bills...
This could be a problem in a situation where the company currency is,
for example dollars; at one point in time, transactions were made in both
dollars and euros and now only the dollar currency is activated. The user
wouldn't be able to differentiate between those transactions anymore.

task-3097112

closes odoo/odoo#107717

Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-09 10:11:19 +01:00
Victor Piryns (pivi) 2753236aaa [FIX] project: display inline image from email in task description
Current behaviour:
When sending an email with an inlined image to an alias of a project,
the image is broken in the task description.

Expected behaviour:
The image should be rendered correctly.

Steps to reproduce:
- Install Project
- In Settings add a custom email server and set a domain alias
- Create a new Project and in it's settings create an email alias
- Send an email with an *inlined* image. (not attachment)\
- Image is not rendered correctly in the newly created task.

Reason for the problem:
Email with an embedded/inlined images are multipart, one is containing
the base64 encoded image and has a `content-id`, another one is the
html body that has an `<img/>` which source is a `cid` that references
the `content-id` of the encoded image. When parsing the email when
creating the task, we only take into account the `html` part of the email,
which becomes the `message.body` which is used to fill in the description.
Therefor we have an `<img src="cid:..."/>` that references nothing.

Fix:
Use the already parsed and sanitized `message.body` from the message's thread,
which converts the `content-ids` into relative links to web images.
We fill with that the description's body.

Affected versions:
- saas-15.2
- saas-15.3
- 16.0
- master

opw-3062444

closes odoo/odoo#109354

X-original-commit: 3c805400045f2ccc8ad4228eb5718af0e22a8027
Related: odoo/enterprise#35543
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-01-09 09:07:12 +01:00
damr 5bddc1eac9 [FIX] project: fix traceback when opening a task in shared project
When a project is shared as editable and the url keeps the access token,
it causes a traceback when a task is open. This is due to owl trying to
evaluate a the access token value as a string.
This commit fix it by wrapping the value so the owl component can
evaluate it and get the access token value as a value and not as a
string.

task-3073965

closes odoo/odoo#109351

X-original-commit: 865a45bd170ad15a10b3a3572471f4bf6b5648e4
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-09 09:07:10 +01:00
Thomas Lefebvre (thle) c61a1a4789 [FIX] base: inherit the industry field from parent
Steps to reproduce:
   - install "contacts" and "sale_management" module;
   - create a company contact with a value for "Industry" (Sales & Purchase tab);
   - create an employee who works in this company;
   - create two orders (one with the company and one with the employee);
   - go to sales reporting tab and select the pivot view;
   - filter by "Customer Industry" and then by "Customer";

Issue:
   The employee is not placed in the right category of industry. He should be in the same category as the company he works in.

Cause:
   When creating a contact, the `industry_id` field is not passed from parent to children.
   (Moreover, this field being invisible for an "individual" contact, it is not possible to give it a value without using the studio application.)

Solution:
   Add `industry_id` to `_commercial_fields`.

opw-3085032

closes odoo/odoo#109313

X-original-commit: 60962062aefd34c911385f671c56b03836b3025a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-01-09 07:57:38 +01:00
Romain Derie 0d8222c7c8 [FIX] website: prevent crash for non admin publisher when click on form
When editing a website form, a `search_read` request is fired on
`ir.model` model to get the list of possible form actions (create
ticket, create opportunity, etc.).
But since commit [1] in Odoo 15, non-admin users don't have read access
anymore on this model, leading to a traceback when clicking on a form in
edit mode.

Steps to reproduce (as designer):
- Install only website and login as admin
- Make "portal" user an internal user and give him "Editor and Designer"
  rights
- Login as "portal" user
- Enter edit mode on any page and drag & drop the form snippet, or
  simply go to /contactus page which already has one
- Click on the form -> Traceback

Steps to reproduce (as publisher/restricted editor):
- Install website_hr_recruitment
- Make "portal" user an internal user and give him the following rights:
  - Website: Restricted Editor
  - Recruitment: Administrator
- Login as "portal" user
- Go to a job page like /jobs/detail/experienced-developer-4
- Enter edit mode and drag & drop the form snippet
- It will crash

[1]: https://github.com/odoo/odoo/commit/5dc4cff60a557e14b08440c227423291c407899b

opw-3098097
opw-3101884

closes odoo/odoo#109339

X-original-commit: 054c216e93b818794316bfd4b8ce56d6853a61d3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-01-08 15:01:12 +01:00
Stefan-Calin Crainiciuc (stcc) 56813501ea [FIX] hr_timesheet: correctly propagates project
Steps to reproduce:

- Create 2 projects: 'Project1' and 'Project2'
- Enable sub-tasks
- In Project1 create a task, name it '1'.
- In task 1 add a subtask, name it '1:1'.
- In task 1:1 add another subtask, name it '1:1:1'.
- Go to Timesheet app > add lines for each task.
- The lines display name are "Project1 / 1", ...
- Go back to task 1, edit the task project to Project2 and save.
- The subtasks will have their project_id also set to Project2.
- Go to Timesheet app.

Issue:
Tasks 1 and 1:1 will have their display names updated to "Project2 / 1"
and "Project2 / 1:1". However, task 1:1:1 is displayed as
"Project1 / 1:1:1", meaning it's project_id was never updated.

This happens because of the way changed fields propagate to immediate
children, but not to grandchildren, which is intended behaviour.

Solution:

`_compute_project_id` is also called onchange, meaning that we can use it
to update account lines with an outdated project value with the new value.

opw-3018301

closes odoo/odoo#109352

X-original-commit: 91b42c806ce2029d9ef678d145ced3138e35bec0
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2023-01-07 09:39:00 +01:00
MerlinGuillaume 6059a7e20c [FIX] hr_expense: mark expense paid by company as paid
Expenses paid by company are marked as paid but the related journal
entry is not paid and cannot be paid

Steps to reproduce:
1. Install Expenses and Accounting
2. Create an expense payable to company and set an amount
3. Create report
4. Submit report
5. Approve report
6. Post journal entries
7. Open the related journal entry
8. Attempt to register payment: an error is raised

Solution:
Mark the journal entries created for the expense as paid if the expense
is paid by the company

opw-3075818

closes odoo/odoo#109375

X-original-commit: f5dd4e3326a17c1f6d06630503d1ede8cc6c59fe
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-06 20:49:43 +01:00
Jeremy Kersten 6cf1e722e3 [FIX] website: remove outdated bs3 retro-compatibility code
Cannot be used in v16 since some mixin don't exist anymore.

After 4 odoo versions, and now that we use bootstrap 5, we drop the
support of bs3.

closes odoo/odoo#109359

X-original-commit: 2c34fd4f031b006451305c46b99a790540c5e902
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-01-06 19:50:43 +01:00
Adrien Widart (awt) f62b2bcc96 [FIX] product_expiry: apply dates on inventory adjustment
When creating a new lot in an inventory adjustment, the removal date,
the best before date and the alert date are not always defined.

To reproduce the issue:
1. Create a product P
    - Type: Storable
    - Tracking: By Lots
    - Expiration Date: True
      - Expiration Time: 2
      - Best Before Time: 0
      - Removal Time: 0
      - Alert Time: 0
2. Update the on hand quantity of P:
    - 1 x P with lot L01
3. Open L01

Error: Only the expiration date is defined. The other dates
(removal, best before and alert) should be defined too.

Considering the definition of the fields set on step 1:
https://github.com/odoo/odoo/blob/221ee0cdc362e1958f9a5326c1966de9dfb47c48/addons/product_expiry/models/product_product.py#L23-L35
The times defined on Best Before, Removal and Alert are the number of
days before the Expiration Date. So, if for instance the user
defines the best before time to 0, it means that the best before
date must be the same as the expiration date.

OPW-3072000

closes odoo/odoo#109353

X-original-commit: 8b06046379e6cfa62bd5b2df261a7ab22d5e2c3b
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-01-06 18:41:46 +01:00
Josse Colpaert ec172b74fe [FIX] l10n_*: fix tests + don't decorate test class with freeze_time
*: l10n_fr_fec, l10n_account_edi_ubl_cii_tests

Fix two failing tests in: - l10n_fr_fec: Add missing factor_percent in
the creation of a tax in the test for FEC - account_edi_ubl_cii: The
invoice name supposed the old convention per month while this was
changed to on a per year basis anyways for customer invoices.

These two tests were ignored by runbot for a while and began to fail
only after the runbot exception was removed (see:
https://runbot.odoo.com/runbot/build/22172258).

In addition, tests in `TestItEdi` started to fail as well when the
exception was removed ! In particular, if an exception was raised in the
`setUpClass` of `TestAccountFrFec`, the tests in `TestItEdi` were
failing.

This is because `TestAccountFrFec` is decorated with
`freeze_time('2021-05-02')`. Indeed, when one decorates a subclass of
`unittest.TestCase` with freeze_time, if the `setUpClass` raises an
Exception, `_freeze_time.stop()` is not called, and the frozen date is
propagated in the other test classes. As a consequence, when an
exception was raised in the `setUpClass` of `TestAccountFrFec`, the
freeze_time set in `TestAccountFrFec` (2021-05-02) was kept in
`TestItEdi`, thus causing tests to fail in `TestItEdi`.

As a conclusion, `freeze_time` should never decorate an Odoo test class.

closes odoo/odoo#109324

X-original-commit: 531270666ec5a6582d4a0a68ea534f2a3a6852ff
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-01-06 18:41:38 +01:00
roen-odoo 44ce99ec9a [FIX] point_of_sale: Prevent multiple cash payment method in PoS
Current behavior:
When creating a PoS config, it is possible to have multiple cash payment
method. Wich is not supported by the PoS.

opw-3030125

closes odoo/odoo#109331

X-original-commit: 7ba362b60a38a993fdeec920e6c90a754ddeb910
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-01-06 16:34:23 +01:00
Louis (loco) de7392a1b8 [FIX] website: fix deleting a page from the page manager in debug mode
Before this commit, trying to delete a page from the page manager in
debug mode would throw an error of type "Got duplicate key in
t-foreach".

As explained in this commit [1] and as per the [owl documentation]:
"Owl requires the presence of a t-key directive, to be able to properly
reconcile renderings." and "A key should be a unique number or string."

In our case, "dependency_value" is an array. Due to that, the current
item of the "t-foreach" iteration is the current value. The bug is
fixed by ensuring that the value of "t-key" is the current value index
and not the value itself.

[1]: https://github.com/odoo/odoo/commit/0d1c263298ca6724a6fe6c31e2a2d3221c5e8c75
[owl documentation]: https://github.com/odoo/owl/blob/master/doc/reference/templates.md#loops

task-3082345
opw-3100483
opw-3111671

closes odoo/odoo#109329

X-original-commit: f56d5906f845cb45f88d9729b73aa2ed08c551f3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-01-06 16:34:21 +01:00
Louis (loco) 2b3cb263bc [FIX] website: fix deleting a page from the page manager
Steps to reproduce the bug:
- Install the "Surveys" application.
- Go to the "Website" application.
- Go in the page manager ("Site" > "Pages").
- Select a page (typically "Home").
- Try to delete it.
- Error of type "'survey.survey' object has no attributes 'name'".

The error comes from the fact that records do not necessarily have the
attribute called "name". To fix this error, this commit uses
"display_name" that is defined in all models.

task-3082345
opw-3100483
opw-3111671

X-original-commit: d5aa5d7ebf9cd17a6df054252a1313ec8b85e83e
Part-of: odoo/odoo#109329
2023-01-06 16:34:20 +01:00
Arnold Moyaux c0a6246390 [FIX] delivery, stock: no propagation of carrier on MTO products
Usecase to reproduce:
- Create a product with replenish on order route
- Create a SO for this product and add a shipping method
- Confirm the SO

The shipping method is not on the product.

It's due to the MTO delivery rule that miss the propagation of carrier
option. It's not set by default while it's is on the classic delivery
rule on the warehouse.

To avoid confusion we add it by default on both rules

opw-3112455
opw-3113180

closes odoo/odoo#109328

X-original-commit: c02df957d9f04c911f330aaaadd80fe97a601509
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-06 15:33:03 +01:00
ノウラ 3873bae651 [FIX] stock: fix js traceback when selecting all locations
Steps to reproduce:
- Install stock
- Activate storage locations
- Switch to French language
- Go to stock/analyse/emplacements
- Select all locations

A javascript traceback pops up because the names 'Set' and 'Count Sheet'
are not translated, therefore we use _t function to translate the terms.

opw-3113275

closes odoo/odoo#109261

X-original-commit: 719a6e6223bbde3cdeb0ade5665d95681c436521
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-01-06 15:33:00 +01:00
Denis Ledoux d814c9bee4 [IMP] base: constraint to check view root node is matching the view type
This PR follows odoo/odoo#108073

Just ensure the root node of the view architecture matches
the view type.

e.g.

Valid:
```xml
<form>
...
</form>
```

Invalid:
```xml
<data>
  <div>
    ...
  </div>
  <form>
    ...
  </form>
</data>
```

closes odoo/odoo#108525

Related: odoo/upgrade#4155
Related: odoo/enterprise#35501
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-01-06 15:32:55 +01:00
Aaron Bohy 7fd5cec72b [IMP] base: view validation: detect js implementation details
This commit adds checks in the view validation, to detect the use
of implementation details in archs. The goal is to prevent people
from using owl directives in archs (e.g. t-on-click). Recall that
a view arch isn't an owl template, it must follow the DSL of the
given view type.

In kanban, gantt and activity archs, using `t-xxx` attributes is
forbidden, except for directives historically supported by qweb
(e.g. `t-esc`).

In other views, using `t-xxx` attributes is forbidden (except for
`t-translation`).

In all views, using attributes `data-tooltip`, `data-tooltip-template`
and `data-tooltip-info` is forbidden.

Task 3085357

closes odoo/odoo#107083

Related: odoo/enterprise#35352
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-06 15:32:47 +01:00
Yolann Sabaux 299d4921c8 [FIX] account: render rounding line
Steps to reproduce:
- create a cash rounding
- create an invoice
- in Other Infos, select the created Cash Rounding Method

Issue:
Accounting wise, everything works fine but the back-end view and the Invoice Reports do not take into account the rounding
(except wen you create a partial payment, the amount due is correct of course)

Solution:
Make sure the value `formatted_amount_total_rounded` is returned by the method `_prepare_tax_totals` so it can be used in the templates

opw-3090556

closes odoo/odoo#109312

X-original-commit: 5724858a374c894bf787b4381bdcd466b4cc2816
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-06 14:31:52 +01:00
zyzcss 3ac3d78e21 [CLA] Sign Odoo CLA
closes odoo/odoo#109304

X-original-commit: a659ab39dff48d2871ff8f0751fbad220b152854
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-06 14:31:50 +01:00
zyzcss cf9233cf2a [FIX] l10n_cn: fix def _count_attachments
X-original-commit: b1a3afabf2c9b1e7f5645ca5f4ca4beed4b2c661
Part-of: odoo/odoo#109304
2023-01-06 14:31:49 +01:00
Adrien Widart (awt) 1e372dac79 [FIX] purchase_{mrp,stock}: run procurement with buy route
In multi-steps receipt, when running a procurement, using "Buy" as
preferred route does not always work because the route is not
correctly configured

To reproduce the issue:
1. In Settings, enable "Multi-Step Routes"
2. Edit the warehouse:
   - Incoming: 2 steps
3. Create a product P:
    - Type: Storable
    - Vendors: a vendor V
    - Routes:
        - Manufacture
        - Buy
4. Update on hand quantity:
   - -1 at WH/Stock
5. Open the Replenishment page
   - There should be a line with 1 x P
6. Set the Preferred route to "Buy"
7. Order Once

Error: a user error is displayed "There is no Bill of Material of
type manufacture [...] Please define a Bill [...]". This is
incorrect, it should generate a PO

The problem is simple: the Buy route is composed of one rule:
- Action: Buy
- Source Location: /
- Destination Location: WH/Input

But, when running the procurement, we first look for a rule to
fulfill the need at WH/Stock. We prioritize the rules of the
preferred route, but as explained above, the route does not contain
such a rule. Therefore, we use the other routes of the product:
https://github.com/odoo/odoo/blob/ba3bb9b701a382c4052ddb57392baeee32625937/addons/stock/models/stock_rule.py#L461-L466
And, because of step 3, it then finds the manufacture rule. This is
the reason why it tries to create a MO and why an error is raised
because of the missing BoM

OPW-3006960

closes odoo/odoo#109302

X-original-commit: 40a20d995d8613d3c82b7a2d62cde80eaad85bad
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-01-06 14:31:46 +01:00
Csaba Tóth 7265228f20 [FIX] project: translate error message in Project Sharing
Before this commit, when the user cannot write on a certain field
an error is occurred to notice the user, he cannot write on that field.
The problem is the `on` is never translated.

This commit fixes the issue to be sure the whole error message is
translated.

closes odoo/odoo#109288

X-original-commit: 5098c59cc6d1a853210f8c4f5340f0d4ee8dd883
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-06 13:31:01 +01:00
Đặng Văn Lộc 29c275c117 [FIX] hr_presense: name of view not translated
in python code is missing '_' so name of view cannot be exported
translated

closes odoo/odoo#109287

X-original-commit: 6a8c0e68d3d1ce6d700a3e4e145199292234e2f4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-01-06 13:30:59 +01:00
niyasraphy f61201fc76 [FIX] repair: show uom only when multi uom is activated
before this commit in the repair orders tree view, the unit of measure field is shown always without respecting the multi uom feature.

after this commit, the field will be shown only once the uom feature is activated in the settings.

closes odoo/odoo#109252

X-original-commit: 0796f8ee68c74e10b8f72531b64932e52b86cbef
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-06 12:29:43 +01:00
niyasraphy 807415ef3d [FIX] stock: remove grouping with non stored category field
exception is raised on grouping by non stored category field in stock quant model.

 "Field stock.quant.product_categ_id is not a stored field, only stored fields (regular or many2many) are valid for the 'groupby' parameter"

 Issue:  https://github.com/odoo/odoo/issues/107933

closes odoo/odoo#109207

X-original-commit: 4e280643aa6fdd8cf964f0e18e1ed6cd97d26cda
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-06 12:29:41 +01:00
William Henrotin 2e8dcad061 [FIX] stock: domain optimization
'State' field on stock move is indexed. Some domains on stock move state
are expressed like (state, not in, ('a', 'b', 'c')) instead of (state,
in, ('d', 'e', 'f', NULL)). The 'not in' domain won't the index and thus
will be relatively slower

closes odoo/odoo#109201

X-original-commit: 96f8321e894a9b7284cca8f201e5a2877b0b3a76
Signed-off-by: Rémy Voet <ryv@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-06 12:29:38 +01:00
William Henrotin 5eba1ff07e [FIX] mrp: add index on created_production_id
in sale_mrp module, the method `get_sale_order_count` get all stock move
with created_production_id = the current production order. Without
index, this request is significantly slow.

X-original-commit: 4c17020fb452f639d9395dccdd5fcefee109ed01
Part-of: odoo/odoo#109201
2023-01-06 12:29:38 +01:00
niyasraphy a6917c4630 [IMP] purchase: add uom in purchase settings
closes odoo/odoo#107218

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-06 12:29:25 +01:00
duongnguyen b17533c9f9 [FIX] base: fix test failing when sources are not in a folder named
'odoo'

-EX: odoo addons path is '~/odoo15/odoo/...' or '~/15.0/odoo/...'
Basically not start with 'odoo' it will get error when running tests
case on this file

closes odoo/odoo#109135

X-original-commit: 336b966f7959b4a5e716b58b25ab13d7e3f92691
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-01-06 11:25:02 +01:00
Florian Charlier b35af33ffb [FIX] onboarding: prevent crash with multiple progress records
Multiple progress records for the same onboarding and company_id (False)
were allowed to be created in several databases which resulted in crashes.

As simple stable fix, we'll select only the latest `onboarding_progress`
records created per onboarding when trying to compute the current_progress_id
and similarly for progress steps.

This will be cleaned with an upgrade script in master so that this code should
not be necessary for long.

Task-3101666

closes odoo/odoo#109257

X-original-commit: 06f2bd985c8b98e708120226daf66b20832000bc
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-06 08:09:07 +01:00
Nishant Jain (niai) 0f55e6a773 [ADD] l10n_in_upi: added qr code for upi payment in invoice report
Currently, there is no facility for UPI payment for the invoice.

So in this commit, there will be a QR code for UPI payment in the invoice report.

closes odoo/odoo#109237

X-original-commit: e8e75678ee64fd9e4150ab7c9a9836d69b06c4db
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Jigar Vaghela (jva) <jva@odoo.com>
2023-01-06 05:48:11 +01:00
Bastien (bvdn) 8bac2f8136 [FIX] project: decrease task title width
This commit will reduce the width used by the task name in form view to 75% of the
space available, except when in mobile view where it'll take full width.
The title doesn't need to take the whole space but only about 3/4 of it in form view

Side note: this may need to change once the mark-as-done 2 task is merged
because a new wider widget will replace the kanban_state widget

closes odoo/odoo#109258

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-05 23:45:52 +01:00
Niyas Raphy d6af14a15a [IMP] web: open privacy page in new tab
closes odoo/odoo#109256

X-original-commit: af98b08945ddf33412187247059bc290650908a8
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-01-05 22:54:03 +01:00
Julien Castiaux e7b0e0bd70 [FIX] base: missing MIME-Version header
Send an rich HTML email from Odoo, it lands in spam whereas it would
land in inbox in 13.0.

The problem is due to a missing "MIME-Version: 1.0" header on the email.
This header is correctly set on both the html and text alternatives of
the messages but it should be set on the enveloppe too.

The problem is present in the newer EmailMessage mail API of python that
is used since 14.0. Using the newer API, it doesn't set the header on
the enveloppe itself.

This reverts commit 8663f1e20727c315924bb20fc1de1accf3014c61.

opw-3098621

closes odoo/odoo#109212

X-original-commit: c480d2bf1de7b70892130e74bb7a8d4003a8a783
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-01-05 19:41:04 +01:00
Claire Bretton (clbr) ddbc61a711 [FIX] l10n_fr: add migration to version 2.1 of the module
This will allow to get the latest taxes.

closes odoo/odoo#109222

Task: 3111528.
Related: #84918, #107158
X-original-commit: 521c80477f9a664bb732ec54d18bdcf1b828072b
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-05 16:52:18 +01:00
Logeshkumar1595 06789b34a8 [CLA] signature for Logeshkumar1595
closes odoo/odoo#109209

X-original-commit: b401fbaf4848a5667f544d30a1bfcd0f67c2201e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-05 16:52:16 +01:00
Antoine Guenet 2f196d1eb1 [FIX] web_editor: properly paste pre in pre
Commit [1] attempted to fix unexpected behavior when copy-pasting from a
<pre> to a <pre>, where the pasted text was smaller the intended, and
preceded and followed by new lines. The chosen approach had uninteded
side effects though as it removed any empty paragraph after the <pre>.
The source of the issue it tried to fix was that the pasted <pre> was
inserted as a new <pre>, splitting the existing element in two in the
process, instead of simply inserting the text content.

[1] 449cacf

task-3086603

closes odoo/odoo#109208

X-original-commit: dfcc3abe3396eaf764c3c3c8510b654649ed82f8
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-05 16:52:10 +01:00
Antoine Guenet 759d6972c2 [FIX] web_editor: prevent selection in root after insert
The insert command ends with setting the selection to the "right" of the
last inserted node. However, it did this without checking if that
position was valid for the selection, so we could end up with the
selection directly within the root of the editor. This corrects it if
such is the case.

X-original-commit: 722cf3bf11fcc9839677837018c1389d65b3f4fa
Part-of: odoo/odoo#109208
2023-01-05 16:52:10 +01:00
Guillaume (gdi) 2efece9884 [FIX] portal: fix portal title for the salesperson data
Before this commit, if the helpdesk module was installed, the title of
the salesperson data was changed from "Your contact" to "Salesperson"
for portal users. This did not add any value and the title of the tab
also became "Salesperson" which we do not want. This commit allows to
keep the title "Your contact" above the salesperson information and to
not change the tab title.

Steps to reproduce the problem fixed by this commit:
- Run Odoo enterprise with helpdesk and sales installed.
- As the admin, create a helpdesk ticket with Joel Willis (portal user)
as the customer and save.
- Click on Joel Willis, select the "Sales & Purchases" tab and set a
salesperson.

=> Log in as Joel Willis and on /my, you will have "Salesperson" as the
title of the tab. This bad behavior is due to [this commit] that added a
title above the salesperson information. But with this change the title
of the tab was also impacted. Then [this other commit] added a default
title above the salesperson information. We can be satisfied with this
default title which does not alter the title of the tab.

[this commit]: https://github.com/odoo/enterprise/commit/700e9dec4a5c9fca354e063d6a85b0514832c84c
[this other commit]: https://github.com/odoo/odoo/commit/d5c66ca1fa5d0f364241636bd502342c1d4ee9ac

opw-3103718

closes odoo/odoo#109138

X-original-commit: 1ebeec9dc2ea9c4a2051b06118f47a440dd5e470
Related: odoo/enterprise#35444
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-01-05 16:52:04 +01:00
Valentin Vallaeys (vava) 90af85c2e4 [IMP] payment(_*): show available currencies for payment providers
Before this commit, the lists of supported currencies by payment
provider were hard-coded in the Python scripts, which made them
unavailable to the users.

With this commit, the implemented initial lists of supported currencies
are displayed on the form view and are editable, because Odoo lists may
not be up-to-date. Empty lists do not trigger any filtering on the
payment providers to access payment methods.

For Authorize.net and Asiapay payment providers, the specific
`(authorize,asiapay)_currency_id` are removed and the generic payment
provider field `available_currency_ids` is restricted to a single-item
list when one of those providers is enabled.

task-2926016

closes odoo/odoo#101018

Related: odoo/enterprise#34158
Related: odoo/documentation#2788
Related: odoo/upgrade#4069
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-05 16:51:56 +01:00
Ricardo Gomes Rodrigues (rigr) 8726fcf822 [FIX] account: preview not displayed when uploading a pdf
Steps to reproduce:
1. Customer invoices
2. Upload button
3. Choose a PDF
4. The created invoice does not display the pdf preview

Related commits: a644766 and 0ab0a92

closes odoo/odoo#109166

X-original-commit: 7cf3f11d5072c2655802e38757b63293a9cf9d48
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
2023-01-05 15:37:37 +01:00
Guillaume (gdi) bc1b242021 [FIX] web_editor, website: debounce we-range events
This commit allows to debounce the events of the RangeUserValueWidget so
that the user can use this widget with the left and right arrows without
having a lag effect (especially on the image quality option).
In addition, steps were added in the website_gray_color_palette tour to
let the time for the debounce to trigger the changes.

task-2601533

closes odoo/odoo#109165

X-original-commit: dddec7489f5cb4e48368684a8783015517c394ee
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-01-05 15:37:34 +01:00
niyasraphy 619042a23a [FIX] hr_expense: reason field too compact in refuse expense form
currently in the expense refuse form view the reason field is too compact to enter a reason in the field.

Expenses -> My Expenses -> My Reports , open any submitted expenses and click Refuse button.

closes odoo/odoo#109157

X-original-commit: 5fda586cc9f738471c6b34fd982bb80e5dd259d3
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-01-05 15:37:27 +01:00
Rémy Voet (ryv) 2f5eaedd2e [REM] purchase_stock: remove avg_receipt_delay field
Since https://github.com/odoo/enterprise/pull/31641, this field
is not used anymore. Then remove it and remove
the override of read_group linked to.

odoo/upgrade#4162

closes odoo/odoo#108977

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-05 15:37:25 +01:00