Commit Graph
157157 Commits
Author SHA1 Message Date
clesgow e08799dcd7 [FIX] mrp: avoid mixing up route_info
Take the following BoM :
Final_product
    Semi_final_1 (Subcontracted)
        Component_1 (Dropshipped to subcontractor)
    Semi_final_2 (Manufactured by us)
        Component_1 (Bought then put in stock)

Component_1 is used in both semi_finals, but in different contexts. For
Semi_final_1, it's directly dropshipped to the subcontractor, while for
Semi_final_2 we resupply our stock and then use it from there.

Problem is, since both components are the same, there was no distinction
made when fetching the data for the resupply methods. So if the first
case encountered was the dropship (like here), then for Semi_final_2 the
dropship would be used as well, while we're not in a subcontracting
context anymore.

Now we consider the parent_bom when fetching and storing the resupply
data, as different boms can have different contexts.

Part of task-2985735

X-original-commit: 9ceb6b4f5996f962689ea671ea79ba81deeee763
Part-of: odoo/odoo#106935
2022-12-01 11:54:56 +01:00
clesgow 82956a97ff [FIX] mrp{,_subcontracting}: Detect subcontracting rules
Before this commit, the rules were checked related to the currently
selected warehouse. Doing this didn't allow to check the subcontracted
locations for their related rules (like Drophip subcontractor on order).

The point here is that when no rules are found within the warehouse, it
checks the subcontracted location of the parent if the parent is
subcontracted itself.

Part of task-2985735

X-original-commit: feeef868093042ae4cb788d513c02244b8c36623
Part-of: odoo/odoo#106935
2022-12-01 11:54:56 +01:00
clesgow 96fece1ff6 [FIX] mrp{,_subcontracting}: Add parent_product in bom overview
Before this, when working on a bom with variants, when checking the
parent from the component / child_bom, it would always take the first
variant since it used the bom's product_template.

This could lead to incorrect data when working with subcontracting, as
when another variant from the first would be selected, when fetching
quantities no parent info would be found as it would seek info from the
first variant of the bom instead of the correct one.

By doing this, we can now have the right variant and fetch the right
informations.

Part of task-2985735

X-original-commit: c855038c73e2c964ef78b41090c35e3a07d30f9b
Part-of: odoo/odoo#106935
2022-12-01 11:54:55 +01:00
clesgow 0289fd45b2 [FIX] mrp: BoM Overview filters display
Since the pager div doesn't appear anymore in the DOM when it would be
empty, the filters buttons (warehouse and display) would be pushed back
to the end of the flex div.

Part of task-2985735

X-original-commit: 4ee3875a6d6faf5563c720fa399eca5b4a1d0e4f
Part-of: odoo/odoo#106935
2022-12-01 11:54:55 +01:00
Touati Djamel (otd) 5741ade043 [FIX] product: hide cost label from the view if product with variant
The group `“base.group_user”` is added in the view for the field
`standard_price` while it is already set on the python side:
https://github.com/odoo/odoo/blob/16.0/addons/product/models/product_template.py#L76
this causes an issue in the case of a product with variants,
the invisible attrs is ignored, the `standard_price` and
`uom_name` field are hidden, but the label will still be displayed

opw-3076827

closes odoo/odoo#106925

X-original-commit: 206e88b0ad9fdb6e1767c93b3eca8feeecddd3da
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-12-01 10:56:48 +01:00
Dossogne Bertrand 13f6d26cd9 [FIX] hr_contract: fix tooltip warning
When the contract has a working schedule different
from the employee's, a red triangle appears with a tooltip
explaining the reason. That tooltip was implemented in the
arch view using data-tooltip, which is not intended.
This commit adds an owl widget replacing that issue.

In order to test that tooltip warning, it's only needed
to go on any running contract and change the resource_calendar
so it's different to the one on the employee's page.
Same process on the employee form.

closes odoo/odoo#106760

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-01 09:11:48 +01:00
Touati Djamel (otd) 9c4c8e112f [FIX] stock_picking_batch: put in pack move lines from different picking
Steps to reproduce the bug:
- Enable “package” option in the settings
- Create a storable product “P1”
- update the stock to 100
- Create a picking:
    - product : P1
    - Qty: 1
    - operation type: delivery
    - go to additional info > add a carrier
    - Mark as todo
    - update the qty done to 1
- Create a second picking with the same steps

- Create a batch picking:
    - Add the picking 1 and 2
    - Confirm
    - Go to “Detailed operation” tab
    - Click on “Put in pack”
    - add a “Delivery packaging”
    - Save
    - Click a second time on “Put in pack”
    - Select the same “Delivery packaging”
    - Save

Problem:
Traceback is triggered: “tuple index out of range”

When the “Put in pack” button is clicked, the “action_put_in_pack”
function is called, the move_line_ids which has no package or with
a 0 quantity done are filtered, in this case the 2nd move_line with
the product “P2” will be used, but the `_pre_put_in_pack_hook` function
is not called with its picking:

https://github.com/odoo/odoo/blob/14.0/addons/stock_picking_batch/models/stock_picking_batch.py#L229

But rather with the first picking, it will have no move_line because the
first move_line already has a quantity done at 1 and a package.
So we try to get a record in an empty array:
https://github.com/odoo/odoo/blob/14.0/addons/stock/models/stock_picking.py#L1312

opw-3067921

closes odoo/odoo#106943

X-original-commit: 1b6208a2db00ed387bcd0833787fa05416a426ba
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-12-01 08:13:38 +01:00
Julien Van Roy 09ba08741d [FIX] l10n_fr: tax report - fix box_16 formula
In the 2022 Tax report, box 16: 'Total de la TVA brute due (lignes 08 à 5B)'.
The formula is missing tags P1, P2, I1 to I6.

opw-3036679

closes odoo/odoo#106948

X-original-commit: 67a4538e4c9ff3c2df895dfd43843154af728997
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2022-11-30 21:43:15 +01:00
Ricardo Gomes Rodrigues (rigr) 13c13dfb8b [FIX] l10n_pt: tax report translation to English
This commit fixes a non-English line of the Portuguese tax report.
Moreover, it also adds `l10n_multilang` as a dependency of the module such that the CoA can automatically be translated to Portuguese if the user chooses to without installing it manually.

closes odoo/odoo#106929

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-11-30 20:03:40 +01:00
tsm-odoo 3cf5828af0 [FIX] mail: chatter attachments overflow
Before this PR, posting a message containing an attachment with a long
name in the chatter would result in the chatter overflowing the main
window. This is due to the fact that flex items cannot be smaller than
their content.

This PR fixes the issue by adding the `overflow-auto` class to the
chatter container in order to override the default `min-width: auto`
of flex items thus allowing them to be smaller.

closes odoo/odoo#106927

X-original-commit: 73fb78e75b6126586385ea7621b6d71fae715305
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-30 20:03:37 +01:00
Stefan-Calin Crainiciuc (stcc) c41c303ec3 [FIX] base: cannot specify 24-hour clock format and meridian
- Settings > manage languages > english > Set time format to `%H:%M:%S %p`
> Save
- Install Planning app > go to list view > Try modifying a time manually
(without using the widget which pops up).

Issue:
When trying to save the new time, an error pops up: `Can't include meridiem
when specifying 24-hour format`.

While parsing the new date, the `luxon` library throws this error to
prevent wrong hour values, such as `17 AM`.

Fix:
Prevent the user from inputting both `%H` and `%p` in the same time format
and display a warning notification.

opw-3038797

closes odoo/odoo#106926

X-original-commit: c2b8faa1c89dc16094c1ebec397e935a3b46fac4
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2022-11-30 20:03:34 +01:00
Victor Piryns (pivi) 0f841c07e0 [FIX] sale: not change the package type when setting the package qty
Current behaviour:
Changing the package quantity may change the package type,
leading to an incoherent product quantities in the SOL.
(For ex: 20 uom in 2 packages of 20)

Expected behaviour:
When setting the package quantity, don't change the
package type. If the user wants to change the package type
they can do it by manually setting it or changing the product_uom.

Steps to reproduce:
- Install Sale and Inventory
- Activate Packages in settings
- Create 2 package types for a product of choice, one of 10, another of 20
- Create a new SO with that product
- Set the quantity to 10 (a new package_qty=1 and packaging type of 10 should appear)
- Save
- Edit package_qty to 2
- Observe that we have 20 units of the product, 2 packages of 20,
  instead of 2 packages of 10

Reason for the problem:
When setting the `product_packaging_qty`, the `product_uom_qty` compute is triggered.
When `product_uom_qty` changes, it triggers `product_packaging_id`'s compute.
When `product_packaging_id` is computed, it doesn't trigger `product_package_qty`,
because it is protected, since we are writing to it.

Fix:
When we are writing the `product_packaging_qty` and the `product_uom_qty`
we remove the compute for `product_packaging_id`.

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

opw-3010703

closes odoo/odoo#106924

X-original-commit: acfa94b7aeea9f8efdc1886b094697ae3f0f1d2a
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2022-11-30 20:03:31 +01:00
qsm-odoo 3f08483a50 [FIX] website: update comment in user_custom_bootstrap_overridden file
The comment became outdated:
- For 14.0 and above: mentioned the "Customize dialog" which does not
  exist anymore.
- For 16.0 and above: mentioned "Bootstrap 4" instead of "Bootstrap 5".

Related to opw-3056683

closes odoo/odoo#106916

X-original-commit: fe90329ee32f9608c143a9fd658fe2a00712f9e4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-30 20:03:20 +01:00
Denis Ledoux 59e3269988 [FIX] base, web: transfer readonly/required modifiers for kanban/tree
Since odoo/odoo@69c3d5aa25
the readonly and required modifiers were no longer passed
for non-editable views. Which means:
- kanban: never passed,
- tree: passed only when `editable="1"` or `multi_edit="1"`,
- form: always passed.

The rationale behind that is that a view which is considered
as readonly doesn't need to know if its field are readonly or required,
as by definition, if the view is readonly, the user shouldn't
be able to modify anything in the view.
This was to make the views sent to the web client more light-weight,
not sending unused information, and save KB of transfers.

However, some widgets, used in the kanban and non-editable tree,
allow to modify fields, even in readonly considered views,
and therefore need to know these readonly/required modifiers
from the field definition in the Python model.

e.g. the `widget="color"`, odoo/odoo#103478

Ideally, these readonly/required modifiers should be transferred
only when the widget requires it, to avoid transferring the
readonly/required modifiers
when they are not useful in kanban/tree views
(which is 99% of the time).
However, this would require a bigger refactoring,
which is considered too risky compared to the added value
for a stable release.

task-3013110

closes odoo/odoo#106838

X-original-commit: 5a68d254949f1d0ff545023cfd14890efff10f5f
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-11-30 20:03:15 +01:00
Kartik Chavda 98285b7ee1 [IMP] sale_project: display price unit in SOL name
This commit display price unit in SOL name_get for timesheet views.

task-2893556

closes odoo/odoo#96330

Related: odoo/enterprise#29650
Related: odoo/upgrade#3704
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-11-30 20:03:12 +01:00
Kartik Chavda 53f2913f11 [IMP] sale_{project,timesheet}: add placeholder to tasks' sale order line
This commit:
- Adds the placeholder `Non-billable` on the sale order line
- Hides the sale order line if the project is not allow_billable

task-2893556

Part-of: odoo/odoo#96330
2022-11-30 20:03:12 +01:00
Kartik Chavda f483d9304f [IMP] hr_timesheet: improve the timesheet test case
In this commit, modify the test to avoid searching the contract if
hr_contract module is installed before this hr_timesheet module.

task-2893556

Part-of: odoo/odoo#96330
2022-11-30 20:03:12 +01:00
Kartik Chavda eb74950670 [IMP] hr_timesheet: use the approver word instead of manager in timesheet
In this commit, the approver word is used instead of a manager because someone
else approves the timesheet.

Technical:

Modified the field name and some strings.
-reminder_manager_allow -> reminder_approver_allow
-manager -> approver

task-2893556

Part-of: odoo/odoo#96330
2022-11-30 20:03:11 +01:00
Kartik Chavda 3e4b266fd1 [IMP] hr_timesheet_attendance: add the filters in the Timesheet/Attendance report
In this commit, add `My Team` and `My Department' filtes in the
Timesheet/Attendance report

task-2893556

Part-of: odoo/odoo#96330
2022-11-30 20:03:11 +01:00
Bruno Boi 66f60540c6 [IMP] web: update owl from 2.0.1 to 2.0.2
Release notes: https://github.com/odoo/owl/releases/tag/v2.0.2

- fix: compiler: do not look up ComponentNode in the context
- fix: t-model takes precedence over t-on-input
- fix: reactivity: fix issues with reactive objects in proto chain

closes odoo/odoo#106898

X-original-commit: a86a8544883aaaf5d530320c84706dde35d17ef6
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-11-30 19:05:56 +01:00
Florent de Labarre ab1e076224 [FIX] purchase, stock : datetime is not correctly converted in date
With this commit datetime of stock move are correctly converted with the current timezone.

closes odoo/odoo#106886

X-original-commit: 242da76b2763d5add36da6e23d4b1f7e640c72aa
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-30 19:05:53 +01:00
Touati Djamel (otd) c82e9d036c [FIX] delivery: raise a UserError if the total weight is 0
Steps to reproduce the bug:
- Install `delivery_dhl`
- Create a storable product “P1”:
    - make sure the weight of the product is equal to 0
- create a transfert:
    - Type: delivery orders
    - Add the product “P1”
    - Go to “Additional info” tab and select “DHL” in the carrier field
    - Mark as Todo
    - Validate

Problem:
A traceback is triggered, because in order to set the shipment details,
a package should be created, so the `_get_packages_from_picking`
function is called:
https://github.com/odoo/enterprise/blob/aed802ee17dba5ebe12b42594503732a2662be68/delivery_dhl/models/dhl_request.py#L166

But as the total weight of the products is equal to 0, the package is
not created:

https://github.com/odoo/odoo/blob/6b0ab28791f4a29254d294f8a116545d4c124e8b/addons/delivery/models/delivery_carrier.py#L324-L325

then, the result is used without checking if the package has been
created:
https://github.com/odoo/enterprise/blob/aed802ee17dba5ebe12b42594503732a2662be68/delivery_dhl/models/dhl_request.py#L185

Solution:
If the total products weight is equal to 0, raise a UserError

opw-3076826
opw-3075562

closes odoo/odoo#106894

X-original-commit: c18064d717312287f5acba2fabeb77b2e1c01fb9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-11-30 16:07:56 +01:00
Nshimiyimana Séna ad1c11b196 [FIX] crm_iap_enrich: correctly save 'Enrich lead automatically' setting
## Steps to reproduce
1. navigate to Settings -> CRM -> Lead Enrichment section
2. change the Lead Enrichment option to "Enrich leads on demand only"
3. click Save button
4. wait for system to save and refresh.

You should see that the change you made was not saved.

opw-3063639

closes odoo/odoo#106891

X-original-commit: 0803775e4a156aa6988453edbbaf799730c996b2
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-11-30 15:06:30 +01:00
Simon Genin (ges) 6d985bbae5 [FIX] test_lint: bump up eslint test to same version as tooling
closes odoo/odoo#106883

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2022-11-30 15:06:28 +01:00
FrancoisGe f953e91f43 [FIX] web: add Shortcut CTRL+K in user menu
Purpose:
Make the command palette easier to discover - indeed, unless you
know about CTRL+K, it's difficult to know you can use that elsewhere
than the home screen.

Solution:
Add CTRL+K next to the Shortcut menu in the user menu.

closes odoo/odoo#106820

Tackid: 3074492
X-original-commit: 536ea340ec1347a4a7598b5b51e2f2801521973f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2022-11-30 15:06:20 +01:00
Barad Mahendra ffdf10339f [FIX] hr_timesheet: fix the remaining hours label on project sharing
Before this commit, when remaining hours is negative then it the
label was displayed as muted instead of danger.

So in this commit, display the label danger when remaning hours
are negative.

task-3014420

closes odoo/odoo#106815

X-original-commit: c06aa5331eda0408453552a304170ee0bf027a4d
Related: odoo/enterprise#34504
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-30 15:06:14 +01:00
kais-odoo 42a371fc9d [FIX] project: fix the missing progress bar in project sharing view
Before this commit, the progress bar was missing since the progress bar CSS
wasn't loaded to the project sharing webclient.

So in this commit, the progress bar CSS path has been added to the manifest file
for the project web client.

task-3014420

X-original-commit: 84caa0bb2f8a3095c4b98b35ab72f85fd456943a
Part-of: odoo/odoo#106815
2022-11-30 15:06:13 +01:00
kais-odoo 4ef47a242a [FIX] hr_timesheet: fix the missing borders around the remaining hours widget
Before this commit, missing borders of remaining hours in project sharing
kanban view.

So in this commit, added border and respected color boder classes  like
'border-success','border-warning' and 'border-danger' on remaining hours.

task-3014420

X-original-commit: b73f3dd256d79cfb68432b73f13d5cf9e2d541ce
Part-of: odoo/odoo#106815
2022-11-30 15:06:13 +01:00
kais-odoo 4954fa7521 [FIX] hr_timesheet: remove the trash icon in project sharing view
Before this commit, there was a trash icon button in the project sharing view
to delete record.

In this commit, removed trash icon by adding 'delete=0' in  timesheet tree biew.

task-3014420x

X-original-commit: 396684f71c4ff7813bbdd3b44cc4ca1c16564a8f
Part-of: odoo/odoo#106815
2022-11-30 15:06:12 +01:00
fdardenne 1182fdebf7 [FIX] web: list: fix focus function for checkboxes
The input element properties `selectionStart` and `selectionEnd` method
applies only to inputs of types `text`, `search`, `URL`, `tel` and
`password`.

This specification is interpreted differently depending on the browser:
Accessing those properties in a `checkbox` input results in a crash in
Safari but not in Chrome/Firefox.

Current behaviour:
In a list view, in safari, press the arrowdown key -> it causes a crash

Expected behaviour:
Pressing the arrowdown key causes the next checkbox to be focused.

closes odoo/odoo#99050

Related: odoo/enterprise#34101
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2022-11-30 15:06:00 +01:00
Dardenne Florent (dafl) edd296da29 [IMP] web: list: select range of records with shift
Before, in the list view, the user could not select a record range easily. He had to
check/uncheck manually each checkbox in the range.

Now, the user can select a range of records in list view by hitting its first record
and and its last record while holding SHIFT for the second.

It's also possible to do it with the keyboard:
- pressing <SPACE> to select a record and <SHIFT+SPACE> to select a range of records.
- pressing <SHIFT+ARROW> to extend to current checkbox

task-2039894

Part-of: odoo/odoo#99050
2022-11-30 15:06:00 +01:00
fdardenne 8414b797c3 [FIX] web: hotkey_service: replace by space
Pressing `<space>` in browsers results in a ` ` event key.
We don't want this event key as ` ` is not recognized and not
whitelisted in the hotkey service.

Instead we want to use `space` because it is more readable in the
codebase.

Part-of: odoo/odoo#99050
2022-11-30 15:06:00 +01:00
roen-odoo 80656a2672 [FIX] point_of_sale: recompute reward after pricelist change
Current behavior:
In the PoS if you apply a coupon on an order that contains 2 products
with different taxes, it will create 2 discount lines on the order.
If you change the pricelist, the discount lines won't have the correct
values.

Steps to reproduce:
- Create 2 different products with different taxes.
- Create a pricelist with a discount on the 2 products.
- Create a coupon that apply a 100% discount on the order.
- Start a PoS session
- Add the 2 products to the order and apply the coupon.
- The order total is now 0€.
- Change the pricelist to the one with the discount.
- The order total is different than 0€.

opw-3049098

closes odoo/odoo#106835

X-original-commit: 36dc1fce19403935770eaaaf5c1177fc8c1ef2bb
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-11-30 14:05:46 +01:00
niyasraphy 72aab77331 [FIX] base, hr_recruitment_skills: fix typo
closes odoo/odoo#106839

X-original-commit: 4e85ee767f9cc0781823c0bfb4c79df8da1c6c2e
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-11-30 12:13:55 +01:00
niyasraphy c8f9a4ed6b [FIX] loyalty, pos_loyalty: fix typo in loyalty, pos_loyalty
closes odoo/odoo#106830

X-original-commit: 718fabf04247912df450974fad0da679007eb8e9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 12:13:52 +01:00
roen-odoo 728f41fb97 [FIX] pos_loyalty: fix typo in pos_loyalty
Current behavior:
If you create an empty Db and just create one coupon program for the PoS
, the `enter_code` button is not displayed. This happens because the
condition to show the button was looking for program type `coupon`
instead of `coupons`.

Steps to reproduce:
- Create an empty Db (Important)
- Install PoS and PoS Loyalty
- Create a coupon program for the PoS
- Open the PoS, the `enter_code` button is not displayed

opw-3078726

closes odoo/odoo#106824

X-original-commit: 1eaa36faf8447d6fbe80f4bcdb512dd4505827d8
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 12:13:50 +01:00
Fernanda Hernández f0790c63e9 [FIX] pos_restaurant: validate number of guest put by user
The user could make the mistake to put a large number in the `Guests`
input in the POS order and this is not validated, even an number more large
for the capacity of an integer, raising an uncontrolled error:

`psycopg2.errors.NumericValueOutOfRange: integer out of range`

this commit is adding a validation error in order to limit the number of `Guests`
with the maximum number for an integer:  2**31 - 1

closes odoo/odoo#106817

X-original-commit: 0ad071e5b132b8f24b8fccf1624ccf97778fe27b
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 11:09:01 +01:00
Dylan Kiss (dyki) b7e06b8c37 [FIX] l10n_be: translate Belgian tax report
The Belgian tax report was only available in French.
Now the tax report is available in English by default and there are official translations in Dutch and French.

Resources:
NL: https://financien.belgium.be/sites/default/files/downloads/165-625-formulier-2022.pdf
FR: https://finances.belgium.be/sites/default/files/downloads/165-625-formulaire-2022.pdf

[task-3074748](https://www.odoo.com/web#id=3074748&cids=1&menu_id=4720&action=4043&model=project.task&view_type=form)

closes odoo/odoo#106816

X-original-commit: cc3ab7609a20bd4ab61e8d929ce9050a85f69ca6
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2022-11-30 11:08:58 +01:00
roen-odoo 5786d8adee [FIX] pos_restaurant: correctly save splitted order
Current behavior:
When splitting the order in a pos_restaurant session, the order was not
correctly saved in the backend. It resulted in an order that still had
all the product of the original order and another order with the
correctly splitted products.

Steps to reproduce:
- Start a pos_restaurant session.
- Go to table A and add 3 products to the table.
- Go back to the floor screen
- Go back to the table A
- Split the order in 2
- Click on payment, and go back to the product screen without paying
- Click on the ticket button, and click on the order that was splitted,
  it still contains all the products from the original order.

opw-3061569

closes odoo/odoo#106813

X-original-commit: bf8acd51ffb96048a7123d1abd2f6865d27a41f9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-30 11:08:56 +01:00
Arnold Moyaux f613ce968d [FIX] base, stock, delivery: replace support datamatrix barcode printing
This reverts commit 3ebe1185a4.

The code ECC200DataMatrix already exist in reportlab (that is already a dependance).
Some differences:
- ECC200DataMatrix only supports a Type 12 (44x44) C40 encoded data matrix.
  (214 alphanumeric characters and 14 to 27% of error correcting rate)
- pylibdmtx support more type and add a default to 24x24. So it means a
  (52 characters and 20 to 35% error correcting rate). It's also smaller
  to display.

We consider the gain too small compare to maintain an extra lib.

It also fix blured datamatrix in stock report if they contains too much
data.

*If you want to test 001234560000000018 is a valid sscc for package

closes odoo/odoo#106620

X-original-commit: 54ef19f41ffc4a6f715474b65a4183a7fa75feea
Related: odoo/enterprise#34422
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-30 10:05:27 +01:00
Tommy (tong) 81076aa514 [FIX] delivery: unit test
closes odoo/odoo#106717

X-original-commit: a1afad5a70e57444955223aa5c362d87cae37d6c
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-11-30 09:07:52 +01:00
Julien Van Roy 5463c84669 [FIX] {l10n_}account_edi_ubl_cii{_tests}: handle price_include taxes
In Factur-X, there is no way to represent a tax "price_include" because
every amounts should be tax excluded.

Currently in Factur-X, a line with a tax price_include = True will be
incorrectly exported. Indeed, the Factur-X.xml is generated by setting the
GrossPriceProduct as the price_unit. In Factur-X, this amount (and the others
in the line details) should be tax excluded. Thus, it's wrong to set the
GrossPriceProduct as the price_unit.

To fix this, the GrossPriceProduct should be the price_unit if no tax
price_include = True is set, otherwise, the gross price = price_unit/(1+tax/100).

This way, the Factur-X file will be consistent with the norm.

Note that the import of a Factur-X xml will thus try to pick taxes with price_include = False,
and the price_unit will be tax excluded. If no matching tax with price_include = False is
retrieved, a tax with price_include = True is searched, if found, the price_unit is
recomputed accordingly. In both cases, the lines subtotals are the same.

opw-3032382

closes odoo/odoo#106718

X-original-commit: 7f93f72a4f874e7073c0fec8ab0a89ebbd13e029
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-11-29 17:22:56 +01:00
Antoine Vandevenne (anv) 78dee0874c [IMP] payment_demo: store a dummy provider reference on transactions
As provider references are included in the memo of `account.payment`
records, it makes sense to set one on demo transactions to mimic what
is done with other providers.

task-3063368

closes odoo/odoo#106486

X-original-commit: 73865f2bd03c7d224f0a64659652e8e40c4ba192
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Horacio Tellez Perez (hote) <hote@odoo.com>
2022-11-29 17:22:54 +01:00
Horacio Tellez 376ad4a429 [IMP] account_payment: Better reference for account payment memos
The Memo field in the form view of the `account.payment` model
(the `ref` field) was a little cryptic and did not supplied a lot
of information about the payment.
After this commit the Memo will (if available) provide information
about the sales order, the partner and the payment transaction.

Task - 3063368

X-original-commit: 414fb09b718a100cb96857725523e7a9109135cf
Part-of: odoo/odoo#106486
2022-11-29 17:22:53 +01:00
Dylan Kiss (dyki) 3f38d903e9 [FIX] account,l10n_{au,in,gcc_invoice}: distinguish credit note titles
Currently we distinguish customer invoice titles based on the state they are in: draft, posted or cancelled.
For the customer credit notes we did not have this dinstinction.

This fix makes sure that the title of a credit note is also adapted based on its state.

[task-3067251](https://www.odoo.com/web#id=3067251&cids=1&menu_id=4720&action=4043&model=project.task&view_type=form)

closes odoo/odoo#106692

Related: odoo/enterprise#34464
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-11-29 16:19:46 +01:00
Dossogne Bertrand 228c6401d4 [IMP] hr_contract: ease contract navigation
Before this commit, the contract smartbutton on the
employee page redirected to the contract history page.
After this commit, the user will be redirected to the running
contract or any contract if there is some, or towards a new
contract form otherwise. To access the contract history view,
a new smartbutton has been added on the contract form.

Also added some hr_responsible_id to contract in demo datas
to avoid having empty required fields for employee contracts.

task-3056891

closes odoo/odoo#105416

Related: odoo/enterprise#33799
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-11-29 14:22:59 +01:00
niyasraphy ef7005f524 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

auto_install is Falsy by default
author is Odoo SA by default
summary & description are empty strings by default
application is False by default
test, demo, depends and data are empty lists by default
This will reduce noise/inconsistencies between manifests specifications,
simplify analysis of manifests content.

closes odoo/odoo#106686

Related: odoo/enterprise#34462
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-29 13:20:31 +01:00
Didier (did) c9ea3d0fa7 [IMP] web: expose immediate in useDebounced hook
Expose all debounced param in the hook.

closes odoo/odoo#106762

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-11-29 11:34:03 +01:00
qsm-odoo e18a4324d3 [FIX] website: stop showing CSS variable assertion tour step to users
Commit [1] introduced a website tour util to assert the value of a CSS
variable. This was used at the start of theme tours to check we are in
fact on the right theme before starting the tour.

While it's great for those tours when they are started as a test, it was
not meant to be shown to users following that tour. This commit fixes
that. Notice that theme tours are currently broken so the issue was
probably hidden. Those will be fixed at [2].

[1]: https://github.com/odoo/odoo/commit/b29e17765f4e912b2dd472493b5be500b3a32c87
[2]: https://github.com/odoo/odoo/pull/106703

Related to task-3084175

closes odoo/odoo#106756

X-original-commit: 696c45b4e5917d086f60fd960590328b878014f0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-29 11:34:00 +01:00
qsm-odoo 91435ba499 [FIX] website: properly flag website test tours as test tours
Commit [1] and [2] introduced test tours but did not mark them as test
tours properly, thus showing them to users (who are in debug=tests mode)
by mistake.

Note that [2] was silently fixed in the 16.0 forward-ported version...
that is why nothing shows up in this diff starting from 16.0.

[1]: https://github.com/odoo/odoo/commit/7655bface7f9e9bae8579e14e9a87b4f4801cc33
[2]: https://github.com/odoo/odoo/commit/a0c33c5f896718d1c03a6a50c981d6d75ce0d169

closes odoo/odoo#106755

X-original-commit: 101d83d483a329644d2d6afa8757a3e6d8a6bfb9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-29 11:33:57 +01:00