Commit Graph
155970 Commits
Author SHA1 Message Date
Hubert Van de Walle (huvw) a11033d42c [FIX] mrp: division by 0 when computing the production capacity
Steps to reproduce
==================

- Create a BOM
- Add a line with a product of type product
- Set the quantity to 0
- Save and click on overview

-> ServerError: Division by 0

Cause of the issue
==================

Lines with a quantity of 0 should be excluded from the computation

opw-3053167

closes odoo/odoo#104980

X-original-commit: b0f5170252ed73d31543b8d1dcf114ae6f0b65bc
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-11-04 13:00:55 +01:00
Joseph Caburnay c144ac4cf0 [FIX] web: un-stored m2m field is not valid custom groupby
Even if a many2many field is forcely set to be sortable, it should
not be included in the list of custom groupby options if it's
an un-stored field.

closes odoo/odoo#104978

X-original-commit: 9ba52387481bb0720c5d4f5d8a86c3ad6e801137
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-04 11:59:08 +01:00
Joseph Caburnay 80318050ef [FIX] web: take into account 0s when aggregating
**Issue:** The aggregate row of the list renderer doesn't take into
account the fields with zero values. As a result, average values are
not correctly computed. E.g. average of [2, 0] => 2 instead of 1.

**Solution:** Make sure 0s are included in the valid values to
aggregate.

**Change note:** We took the opportunity to make a simple refactor
in the affected test. Instead of asserting contents of the row
with multiple strictEquals (one per cell), we use deepEqual to
check the cells in the aggregate row.

closes odoo/odoo#104968

X-original-commit: 2dcb71aab911a47d8d3a5db6f68a28d1c6d8c9fb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-04 11:59:05 +01:00
Paolo Gatti 7d61b12bc7 [FIX] l10n_it_edi: self-invoices require fiscal regime RF18
When the seller is foreign, the Fiscal Regime of the seller must
be set to 'RF18', as per:
https://www.fattura24.com/manuale/altri-documenti/autofattura-fornitori/

Task: https://www.odoo.com/web#id=3010849&model=project.task
opw-3010849

closes odoo/odoo#104903

X-original-commit: 07747178a230071f9ca3cd7202ad571f80a330c0
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-11-04 11:59:03 +01:00
Guillaume (guva) 99a7a48b84 [FIX] account: add hook to get payment_mthod_code
Related to https://github.com/odoo/enterprise/pull/32020
Add a hook to return the account payment method code.

opw-2985984

closes odoo/odoo#104875

X-original-commit: 66be2aff7ae519725ce2e9f027cabc24c46d787a
Related: odoo/enterprise#33573
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2022-11-04 11:58:59 +01:00
Denis Roussel d81e83907d [IMP] stock: Add a void button box on Package Types form view
closes odoo/odoo#103979

X-original-commit: de87a78e0988cd7a1aa05f10ef7bc9170d9dad14
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-04 11:58:54 +01:00
gawa-odoo 2769d08b02 [IMP] project_purchase, project_hr_expense: change groupby of counts
We could do the Group By directly with sql instead of doing the computations by hand afterwards.
As we're already doing a sql query, we can include it here.

closes odoo/odoo#104933

X-original-commit: 3cec95d0a18f3c343db36bb0700936833e98f7fc
Related: odoo/enterprise#33594
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2022-11-04 10:54:57 +01:00
gawa-odoo 972171968d [FIX] account: wrong computation smart button on analytic account
The smart buttons were computing the number of aml instead of the number
of invoices/bills with the account.

We now compute back the number of moves.
We also changed it so it is consistent with the view,
so it computes the number of moves with move lines that have the distribution
instead of the analytic lines with the account.

X-original-commit: 84f3ee28156721cea0b530b92ede36fad58c5db8
Part-of: odoo/odoo#104933
2022-11-04 10:54:56 +01:00
JordiMForgeFlow 2ad702f239 [FIX] mrp: ensure only active BoMs are considered on product2bom
When executing the product2bom method it is possible that an active_test
context is present in self. However, the method should not consider
archived BoMs.

closes odoo/odoo#104919

X-original-commit: a5f923859fad37e1fc52a3a4bcce5cce4cf69c87
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-04 09:53:02 +01:00
Andro Gvivradze 01703e3ac8 [FIX] base: send correct report paperformat to wkhtmltopdf
Prior to this commit get_paperformat function in ir_actions_report.py file
was trying to get a paperformat_id of an empty report and as there was none
was automatically returning company paperformat_id. After this commit said
function will try to get a paperformat_id of the report with specific
report_ref value.

Task-2980708 (Fix Ticket Reports)

Closes odoo/odoo#100199
Closes odoo/odoo#104561
Closes odoo/odoo#100715

closes odoo/odoo#104915

X-original-commit: 78e2c6456d2f9f06d42c18d7b1849d5fad4deb46
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-04 09:52:59 +01:00
niyasraphy 22a2847aec [FIX] account: invoice report duplicated values
closes odoo/odoo#104871

X-original-commit: 56d00814fed92782dca9425c4471382d26004198
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2022-11-04 09:52:57 +01:00
Tommy (tong) 74229f7d83 [ADD] l10n_my
- Create Malaysia Accounting localisation

task-2870449

closes odoo/odoo#104734

X-original-commit: de3b2f13eed4505efbb28e0b866494bf4fc50b63
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-11-04 09:52:54 +01:00
Tommy (tong) 9ed41b2bd7 [IMP] base: add Malay language
Purpose
=======
Add Malay language for Malaysian Localisation.

X-original-commit: 9dcb35a62b7d23249442a9ab045e88cb57165208
Part-of: odoo/odoo#104734
2022-11-04 09:52:54 +01:00
Achraf a167b3e7b5 [FIX] web: Allow user to download binary file in always edit mode
Steps:
- Open studio in any form view
- Add Binary Field
- Close Studio
- Upload a file in the previously added binary field
- We can't download it because of always edit

This commit adds a new download button near edit and clear button

opw-3028094

closes odoo/odoo#104961

X-original-commit: 73a2329b8bf4e887890cae7669bc568ae0be7147
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-11-04 08:58:44 +01:00
Laurent Stukkens (LTU) 623ecff069 [FIX] {hr,sale}_timesheet: prevent default project_id on non timesheets
Prior to this commit and since odoo/odoo#94144, a default project_id is
provided event for non timesheets.

This commit fixes this issue by setting a context key in the `account.analytic.line`
actions that are related to timesheets and by setting the default project_id only
when this key is set to `True`.

This commit also removes `encoding_uom_id` from 'default_get' as it is any
computed as the field is compute (not stored).

closes odoo/odoo#104901

X-original-commit: 5768a5f25b62ce9f07212adbf6584e0b874c64ea
Related: odoo/enterprise#33581
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:57:13 +01:00
Xavier BOL (xbo) 8873581323 [FIX] project: add default project when user wants to add subtask
Before this commit, the f3974bea4b adds
the project as filter in the search view when the user wants to add a
subtask on a task in the form view. This feature has been broken due to
a change on the search view. The main search has no longer the
display_project_id field, only the one inherited the main one has that
field. (commit da868d28e2)

This commit changes the search view to use to correctly have the project
of the parent task as default project when the user wants to search a
subtask to add on the task displayed in the form view.

closes odoo/odoo#104878

X-original-commit: 4e1ee0f9ae6f39154a528fec2c16943df807ab7f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:57:05 +01:00
Eteil Djoumatchoua (etdj) 3c526229c6 [FIX] project: ensure cost are subtracted when calculating margin
steps to reproduce the bug:
- Create a service product with "invoicing policy" set to "Based on timesheet" and "create on order" set to "project and task"
- Create and invoice with the product and confirm it
- Type in some hours on timesheets for the invoice
- Go Project -> Project update of the project, The margin value is incorrect

Solution: As the cost are always negative, changed the operation of the calculation to have the good value.

opw-3029869

closes odoo/odoo#104474

X-original-commit: a39a1a6a3bc276177f9f4c95495153bbb5818ed5
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:04:45 +01:00
Xavier BOL (xbo) bea0a09e1d [FIX] sale_timesheet: adapt JS tour of sale_timesheet for always edit
Before this commit, the sale_timesheet tour sometimes fails because it
cannot click on the save button. Since the always edit feature, the form
view is automatically saved when the user leaves the view, so it is now
not necessary to click on the save button and then leave the form view.

This commit removes the steps in which they simulate the user clicks on the
save button to avoid any indeterminate errors when that tour is launched.

closes odoo/odoo#104305

X-original-commit: 14999db237e9f61474f9ba886182fdfda20864dc
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-04 01:04:43 +01:00
Soukéina Bojabza c75f5d11f0 [FIX] web_editor: reallow the grid images to be replaced
In commit [1], a check was added to see if a media is editable in order
to prevent its edition if it is not the case. However, this also had as
effect to block the edition of some grid images. Indeed, as the columns
in grid mode containing only an image have their `contenteditable`
property set to `false`, the images don't pass the check because their
parent is therefore not editable.

This commit removes the `contenteditable` property from these columns
in order to make their images pass the check and therefore allow their
edition.

Tests are also added, ensuring that these grid images can be correctly
replaced.

[1]: https://github.com/odoo/odoo/commit/ddade4346347266b7f699d05865578dc96e2bf98

opw-3028116

Fixes #103234

closes odoo/odoo#104899

X-original-commit: d8c374e3e6b31bf88aa42952aadf3379936f7600
Related: odoo/design-themes#617
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-11-03 23:35:10 +01:00
Hoang The Vuong 9f49c5e8e0 [FIX] mail: Improved live chat feature when entering help command
closes odoo/odoo#104877

X-original-commit: 4bf6cd0cc26268442dfc5201eb8b49af98648c49
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-03 22:39:49 +01:00
vishal padhiyar e774cac767 [FIX] web_editor: fix attributes missing from cleanForSave
Before this commit:

When we try to add html data in translated email templates then it does not
remove those extra classes from the html code.

After this commit:

Now those extra classes will remove from the html code.

Task-2985072

closes odoo/odoo#104859

X-original-commit: 5e192a3ccd93c3aafda26abdcfae50ab8f0e053e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-03 19:40:55 +01:00
Sébastien Theys 2994a3da0d [IMP] mail: give space to field list rather than their details
This allows to more easily browse and see all existing fields rather than
seeing a lot of details.

closes odoo/odoo#104839

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-03 18:12:16 +01:00
niyasraphy c48a211fb7 [FIX] website_event_track_quiz: field alignment
closes odoo/odoo#104874

X-original-commit: da4cc5ee525fb2e8cffd416b3783c2358b1064b8
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-11-03 16:43:45 +01:00
Joseph Caburnay 6785784702 [FIX] web: allow custom grouping with a stored m2m field
Custom grouping by m2m field is introduced here: https://github.com/odoo/odoo/pull/74985.
However, after refactoring in https://github.com/odoo/odoo/pull/73311,
users are unable to add custom groups based on stored m2m fields.
This is because the stored m2m fields are not included in the list of
"Add Custom Group" options.

In this commit, we are now again including the stored m2m in the options
for "Add Custom Group".

closes odoo/odoo#104873

Task-id: 3046183
X-original-commit: 5087d9011be7f46a4a3e05b1e951f2556f254b4c
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-03 16:43:42 +01:00
Nicolas Bayet e3ed896fbd [FIX] web_editor: prevent some class to be used in history
When a change was added within a field like adding a class (eg. o_dirty,
o_transform_removal, or oe_edited_link), it triggered the
`_observeOdooFieldChanges` mechanism that replace all identical fields
from the first mutated field in the set of identical fields.

The bug appeared when there were two identical in the pages
- field A: first to appear in the document
- field B: second to appear in the document

When clicking on a link inside field B, multiples class could be added
(o_dirty, o_transform_removal, or oe_edited_link) within the fields.
Field A and field B were mutated. This activated the mechanism
`_observeOdooFieldChanges` and replaced the innerHTML of field B with
innerHTML of field A.
That replacement of innerHTML made the reference of the anchor node
in the link tool being outdated and changes made inside that link tool
ineffective.

Step to reproduce:

- Install website
- Go to any page and enter edit mode
- Click on the navbar and in the right panel select Vertical header
- Activate the CTA option in that navbar right panel (should already be)
- Click on the CTA button
- Try to edit the URL in the right panel or any link option (style etc)

The link will not update properly and the history undo create a new
link.

This commit add the ability in the editor to prevent classes from being
taken into consideration in the filterMutationRecords and in undo/redo
and when receiving external steps.

closes odoo/odoo#104872

X-original-commit: e07e149e01646cc2e59c8ac205a5047fd74ae0ba
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-03 16:43:39 +01:00
lejeune quentin f4a95639d4 [FIX] pos_stripe: Improves error handling
Currently if an error occurs on the server side it is not
reported to the POS interface and therefore to the user.

With this commit all responses to requests to the Stripe
server are managed in the POS so that the cashier is correctly
informed of any errors that may occur

closes odoo/odoo#104870

X-original-commit: a9c794ed31cfe1527f0e480729212859338bca60
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-11-03 16:43:36 +01:00
niyasraphy 3fbb79f62c [FIX] base: update app list wizard text alignment
closes odoo/odoo#104869

X-original-commit: cea6974f35289d1ed47dfcf822a4dc25b0e8494c
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-11-03 16:43:34 +01:00
Adrien Schoffeniels 3bee8ae039 [FIX] mass_mailing: fix alert in full-width form view's header
Purpose:
--------
In the full-width form view of mailing, the alert-info message was not
displayed correctly: it did not fill the whole empty space in the header

This message is now always filling the gap between the buttons and the
status widget of the header.

Task-3010933

closes odoo/odoo#104868

X-original-commit: f216b7e6cf607e18fd54655aca1a0df5a951ce76
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2022-11-03 16:43:29 +01:00
Solan Delvenne (sode) 9b0c42574c [FIX] snailmail: Fix name not appearing on snailmail cover
closes odoo/odoo#104556

X-original-commit: 1d35394f260e5ffa9fc6af834e9c429909ab29ae
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
2022-11-03 15:42:50 +01:00
Tom De Caluwé 1ab006ffcb [FIX] purchase_stock: ignore tax calculations in tests
The tests in the purchase_stock module include some tests that make sure or
depend on the fact that the price_unit from the generated move lines equals the
price_unit from the purchase order line from which they were created.

However, the price_unit in the move lines exclude taxes (at least those that
have an account set, it uses the total_void computed from the purchase order
line). This means some tests will fail if an installed localization defines
taxes that are included in the price.

The problem is resolved by explicitly creating the test product used in those
tests without supplier taxes.

opw-3033340

closes odoo/odoo#104825

X-original-commit: 70f7e2d70d04df989d3ff8039d3bae7ebdb73a6b
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: De Caluwé Tom (tdc) <tdc@odoo.com>
2022-11-03 14:11:32 +01:00
Cindy Nguyen 0a536cbc29 [I18N] stock: Add missing translation part
- The `Returns` word should be translated but it has not been
initialized via xml
data so i added.

closes odoo/odoo#98966

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-03 14:11:29 +01:00
Dhaval Baraiya 2f8cb75f0d [FIX] web_editor: specify a custom color in the text input of the color picker.
Before this commit:

It's impossible to specify a custom color in the text input of the color picker
for the selected text.

After this commit:

It's possible to specify a custom color in the text input of the color picker
for the selected text.

Task-2896109

closes odoo/odoo#104560

X-original-commit: f1f3fcef6cc471fc01da574da26712e643315da6
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-11-03 13:10:46 +01:00
Aurélien (avd) a8ab288276 [FIX] mrp: add new computed field to speedup workcenter form view
When the mrp_routing_workcenter table is big, the domain
[routing_line_ids, =, []] in the workcenter FormView can
lead to significant slowness. This comes from
the ORM having to retrieve the mrp_routing_workcenter
records in the read.

To avoid such issue, adds a new boolean computed field
to check if a given workcenter has Operations.

opw-2954461

closes odoo/odoo#99313

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-03 12:10:10 +01:00
Pierre Rousseau 122e5142da [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/7112f4d7 [IMP] autofill: draw autofill behind selection
https://github.com/odoo/o-spreadsheet/commit/363a5898 [IMP] demo: add production use warning
https://github.com/odoo/o-spreadsheet/commit/46f3adb5 [IMP] readme: add contribution guidelines
https://github.com/odoo/o-spreadsheet/commit/ddce160a [REF] model: remove useless else to dispatch
https://github.com/odoo/o-spreadsheet/commit/7795cee6 [FIX] linkDisplay: Hide edit/remove on readonly mode
https://github.com/odoo/o-spreadsheet/commit/5d574cf4 [IMP] xlsx: import and export data filters
https://github.com/odoo/o-spreadsheet/commit/580880af [FIX] topbar: empty space between dropdown and button
https://github.com/odoo/o-spreadsheet/commit/bbbd3739 [FIX] components: rename non-english import alias
https://github.com/odoo/o-spreadsheet/commit/852f7502 [IMP] spreadsheet: remove exposeSpreadsheet props

closes odoo/odoo#104790

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-11-03 09:37:08 +01:00
william 96b5b6b515 [FIX] hr_expense: expenses should be tax included
During a refactoring [1], the behavior of having the taxes included in
the price for all expenses was broken/removed.
All the fields related to taxes are computed should be computed with the
correct context key when computing entries related to expenses. This is
preferred to adding the context key only when creating because it will
then keep the behavior even when editing the document.

task-3043252

[1]: https://github.com/odoo/odoo/commit/d8d47f9ff8554f4b39487fd2f13c153c7d6f958d

closes odoo/odoo#104746

X-original-commit: 6e944ac5fe108d5f2bc2d3f41ab547efd88a5ede
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-03 09:37:03 +01:00
Amélie Dieudonné 34522d9ea5 [FIX] event: fix event type display
With new views, better use a standard label / content two-items display
instead of using a div + colspan + CSS class. Issue introduced by the
new from grid layout.

Task-2996467

closes odoo/odoo#104770

X-original-commit: ac14a6b5aa05d412d3b68bd731738cc7e94e3cf8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-03 08:42:52 +01:00
niyasraphy 678d7d6339 [FIX] website_slides_forum: fix wrong required attribute for privacy field
Description of the issue/feature this PR addresses

Currently due to the wrong condition the invisible field in the form is getting
the required field attribute and thus user is not able to do any changes in the
form view.

Steps to reproduce
  * Create a forum, from Elearning -> Forum -> Forums
  * Now go to course menu: elearning -> Courses -> Courses
  * Open any existing record or create new one
  * In the options tab of the courses, there is field Forum,
  * Set the newly created forum here(from step 1)
  * Go back to forum menu and open the forum we created before
  * Try editing in the form and try to save the record, it will show required
    field warning for invisible field

This is due to wrong required attribute set for the field. The issue exists
from version 14 but the end users is not affected as required wont work with
radio widget in 14 and 15.

Closes odoo/odoo#104580

X-original-commit: a436d5745bd98336af43546a4ba357aa2a41a29d
Part-of: odoo/odoo#104770
2022-11-03 08:42:52 +01:00
Amélie Dieudonné e914fe8532 [FIX] event: correctly align event form view checkboxes
With new views, better use a standard label / content two-items display
instead of using a div + colspan + CSS class. Issue introduced by the
new from grid layout.

Task-2996467

X-original-commit: 0b8ead6ade89371b31c0213dd7a3909ff3b56be7
Part-of: odoo/odoo#104770
2022-11-03 08:42:52 +01:00
niyasraphy eef004e254 [FIX] website_slides: fix content form view
In this commit we fix the display of fields for additional resource, questions
and course tags so that they take all available space.

Closes odoo/odoo#103868

X-original-commit: 08af6aaed4749ca967abdc8cd52360b8ae7592fe
Part-of: odoo/odoo#104770
2022-11-03 08:42:52 +01:00
niyasraphy 124e545820 [FIX] website_slides: fix settings display
They can take the whole available space.

Closes odoo/odoo#103863

X-original-commit: f1763af69f81050cb3b4867d11665a2403ee0ae3
Part-of: odoo/odoo#104770
2022-11-03 08:42:51 +01:00
niyasraphy 9477c471be [FIX] sms: fix sms template body display
It can take the available space.

Closes odoo/odoo#104463

X-original-commit: 210d01177cdc052cf9cdfe60a422c64b868c17b9
Part-of: odoo/odoo#104770
2022-11-03 08:42:51 +01:00
Thibault Delavallée 1f59ed030e [FIX] mail: fix mail template form view settings page display
Due to strange update, some fields are duplicated. Not sure why but having
fields displayed several times is not a good idea. Better cleanup the view.
Oversight of odoo/odoo@7c4da16b59

X-original-commit: 89a3583bbe3355c10b2d3b2df87b167460f6b5c4
Part-of: odoo/odoo#104770
2022-11-03 08:42:51 +01:00
Thibault Delavallée aa323c3e36 [FIX] base, snailmail: Swaziland is now Eswatini
Swaziland was renamed to Eswatini in 2018. Time to update naming in Odoo.
We choose to make it in 16 as

  * it is the newest stable, not much people are using it in production, aka
    most people will have the updated name;
  * there is no need to rename it for all production databases previously
    as if used, it is easy to update its naming from Odoo directly;

Cheers !

X-original-commit: 4f97baa5b4d01b4510f0adc7064ec2846612a481
Part-of: odoo/odoo#104770
2022-11-03 08:42:51 +01:00
niyasraphy 8aa43bd7e5 [FIX] mass_mailing: do not crash when importing a void contact list
Mass mailing has a wizard to import contacts from a text input. It currently
crashes when trying to import a void field, while it should not.

We fix that by two means
  * make field required in view (as model cannot be modified);
  * while it is not updated, simply consider a void input should not crash and
    is considered as an input without valid input found;

Task-3053031

closes odoo/odoo#104769

X-original-commit: aa183fa29d609d2b608fa451ee48a35e3d1549b2
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-03 08:42:44 +01:00
Ahmed Khalaf (ahkh) d89359c383 [FIX] web: parent access in button context broken
Before this commit, accessing parent in a button context broke the button
throwing `EvaluationError: Name 'parent' is not defined`.

to fix,the proxy object `params.evalContext` was passed to `evaluateExpr`
similar to examples seen in `list_renderer.js`

closes odoo/odoo#102293

X-original-commit: 90afb529969ce7de83a20060f5c35a64ce4cf971
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Ahmed Khalaf  <ahkh@odoo.com>
2022-11-03 08:42:41 +01:00
william e9b807366c [FIX] account: import invoice with tax
The import feature is using a `=` as the operator.

To reproduce:
Import a file like this
```
partner_id,journal_id,currency_id,date,invoice_line_ids/account,invoice_line_ids/name,invoice_line_ids/quantity,invoice_line_ids/price_unit,invoice_line_ids/taxes
Publiroute,Customer invoices,EUR,18/06/2021,700000,Prof services 05/2021,1,100,21%
```

In this case, the ORM would look for a tax with the name equal to `2%1`
instead of `21%`.

This of course valid for any other way of using the equality operator in
the domain.

closes odoo/odoo#104764

X-original-commit: af46d8a567215a07b18d00f7d513681d385a8e7b
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-02 22:20:40 +01:00
william eaa2e3b452 [FIX] base: import related field with name containing %
To reproduce, import and invoice containing one line with a tax of
i.e. `21%` on it.

Because the message is recursively expanded to follow the relation of
the field, the interpolation symbol needs to be escaped every time.
Otherwise the message will contain something like
> No matching record found for name '21%' in field '%(field)s/Taxes'

Where `'21%'` will try to be mistakenly interpolated.

X-original-commit: ceb3ce3030b47baa2aca128d364a823becb173ab
Part-of: odoo/odoo#104764
2022-11-02 22:20:40 +01:00
Alexandre Kühn 410ab5ae96 [IMP] mail, *: define template in models
*: snailmail, website_livechat

This commit adds definition of component template
in the models. This allows not defining JS of component
for most view models.

Task-3053061

closes odoo/odoo#104641

Related: odoo/enterprise#33491
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-11-02 21:16:56 +01:00
Alexandre Kühn 701351ca94 [FIX] mail: missing separator at end of emoji category bar
Before this commit, there was not visual separator between
end of emoji category bar and the rest of emoji picker header.

Task-3045141

closes odoo/odoo#104767

X-original-commit: d4b654c9322fd7c9f5a3bb94fa41d20fc5d8c998
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-02 20:12:52 +01:00
Sarika Shekhada e828c72b83 [IMP] project_timesheet_holidays: improve demo data timesheet
In this commit before, timesheets are not generated for approved time off. So we
have entered the timesheet regarding the approved time off.

task-2960247

closes odoo/odoo#103071

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-02 17:38:57 +01:00