Commit Graph
165674 Commits
Author SHA1 Message Date
David Monnom (moda) dcae390faf [IMP] point_of_sale, pos_self_order: save custom product attribute
Previously, the custom value of an attribute was not saved in the
database when selected via the point of sale or Self Order. The only way
to see this value was via the product name.

Now, this custom value is saved via the `product.attribute.custom.value`
template, in order to follow the behavior of the Sale module.

Others fix in this PR:
- Prevent to pass to payment page when we are in mobile mode. Only kiosk
mode is allowed to do so.
- Hide "Modify" button in the cart page when the line is already sent to
the server.
- Make the language popup behaviour available in mobile mode too.

closes odoo/odoo#136612

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-10-02 14:12:49 +00:00
Julien Carion (juca) 0792200c9d [IMP] web: add include archived to domain selector
This commit introduces a new feature to the domain selector that allows
to toggle a new "include archived" option that alters the domain in a way
such that archived records are included or not. This domain part is naive
and may overlap with custom parts of the domain. The special domain part
which includes archived records (['&', <previous_domain>, '|', ('active'
, '=', True), ('active', '=', False)]) is invisible inside the domain
tree but remains visible in the domain code editor.

Also rename the "Match records with xxx of the following rules" statement
to "Match xxx of the following rules".

task-3482381

closes odoo/odoo#135861

Related: odoo/enterprise#47599
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-10-02 14:12:47 +00:00
Guillaume (gdi) 2cede25222 [IMP] website: add Instagram page snippet
This commit adds a new snippet to display an Instagram page on the
website using an iframe that embeds the Instagram page.

task-2603045

closes odoo/odoo#133905

Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-10-02 14:12:46 +00:00
Brieuc-brd b5b94857e7 [IMP] website: add thumbnail for Instagram page snippet
This commit adds a thumbnail for the incoming Instagram page snippet.

task-3495454

Part-of: odoo/odoo#133905
2023-10-02 14:12:46 +00:00
Triet Ngo d05372eb7b [IMP] purchase, sale, stock: add packaging in reports
Several reports don't include product packing info on them. This is
useful for customers to see that what they bought matches what they
expected and for pickers who need to know which product packaging they
should be selecting from stock. Reports this was added to are:
- Sales orders,
- purchase orders (including RFQs),
- picking operations,
- delivery slips.

Note that we purposely exclude backordered moves since they weren't
deemed to be necessary at the time this feature was created.

Also includes light refactoring to remove repeated code for conversion
of product qty to packaging qty and to make it easier to do this
conversion in the future (i.e. can pass product.packaging without
original record that it was assigned to)

Task id 2927379

closes odoo/odoo#96858

Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-10-02 14:12:45 +00:00
Louis (loco) f2ea69a8cf [FIX] web_editor: show dropzones at an over after an over event
Steps to reproduce the bug:
- Add a "Text-Image" snippet on the website page.
- Take an "Inner content" snippet from the right panel and drag it from
a dropzone to another. It has to be fast so that the order of the "over"
and "out" dropzone events is "over" > "over" > "out" and not "over" >
"out" > "over" as usual.

-> The exited dropzone is not correctly displayed.

The problem is that since [1], the website is inside of an iframe. Due
to that, the snippets menu does not have a direct access to the
dropzones. To solve the problem, the already defined `$dropZones`
variable is used instead of searching the dropzones inside the DOM. For
the snippet editor, the problematic line has been deleted at it is
already handled by `_outPreviousDropzone()`. This is acceptable since
the commit that introduced `_outPreviousDropzone()` ([2]) and the commit
that introduced the removed line ([3]) were both introduced to handle
the case of an "over" after an "over". In other words, as
`self.droppped` will always be `true` when
`self.dragState.currentDropzoneEl` is set and it will always be `false`
when `self.dragState.currentDropzoneEl` is not set, the problematic line
can be removed as it is already handled in `outPreviousDropzone()`.

[1]: https://github.com/odoo/odoo/commit/31cc10b
[2]: https://github.com/odoo/odoo/commit/c6886410603a16b6a3c5fe459d273dd883c110c7
[3]: https://github.com/odoo/odoo/commit/fed5854e32bcddf8b14b8311b2fe542eed990f77

task-3522552

closes odoo/odoo#137255

X-original-commit: 06fde42d3ba0e8be2128cda8e695c5def917f391
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-10-02 12:58:53 +00:00
Bruno Boi bf954def41 [FIX] web: close popover on pointerdown
**Preliminary note**
The fix mentioned in this commit is already done
in another commit [1].
The below commit message stayed the same for history's sake.

**Before this commit**
A popover would close on outside mousedown event.

This is not sufficient enough, has for instance all the draggable stuff
makes use of the pointer events instead of the mouse events.

This lead to some unwanted behavior, i.e.:
- Open the DomainSelectorDialog
- Open a ModelFieldSelectorPopover
- Try to drag the modal
- The popover remain open and its position is not updated.
  The dialog's dragging is fine.

**After this commit**
The popovers will close on pointerdown away events.
Now:
- Open the DomainSelectorDialog
- Open a ModelFieldSelectorPopover
- Try to drag the modal
- The popover is closed and the dragging still works as expected.

[1]: 76665eb400168a6fd6e2b5f5fe099c8c4e9c8a5e

closes odoo/odoo#137247

X-original-commit: c63dbc4ed0a04e34571c2929f43812873b62fd16
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-10-02 12:58:52 +00:00
Maximilien (malb) 01666d9c21 [IMP] account_report: trade account rework
Before this PR, the trade partner filter was using a boolean instead of a
selection field. This PR will change the type of the field to a selection.

closes odoo/odoo#135129

Task-id: 3499156
Related: odoo/enterprise#47288
Related: odoo/upgrade#5135
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-10-02 12:58:49 +00:00
Chenyun Yang dd357f2f6a [IMP] spreadsheet: mark _t function to be hidden
This commits hides a function in spreadsheet that are not supposed to be
used by end users: `_t`. It can only work with static strings in the source
code.

task 3102309

closes odoo/odoo#109863

Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-10-02 12:58:46 +00:00
Jinjiu LiuandRodolpho Lima 80b3edea0c [FIX] web_editor: restore popover edit link focusing on URL
Reproduction:

1. Install website
2. Change to edit mode and click a link on the main page, for example,
“contact us” at the bottom
3. click "Edit link" in the popover

Fix: use the variable `shouldFocusUrl` for link tool props update

task-3514360

closes odoo/odoo#137246

X-original-commit: af035687c57f8b34261beff121669ee044d9b7df
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Co-authored-by: Rodolpho Lima <rcdl@odoo.com>
2023-10-02 11:42:58 +00:00
Jigar Vaghela d5bc5eb8ec [IMP] l10n_in_edi: Only Send E-invoice if is under GST and include receipts
if GST related tax is selected then we send E-invoice else not needed

task - 3360018

closes odoo/odoo#137187

X-original-commit: 2d59d7506ef00db0e8a1c641634179e56dc423dd
Related: odoo/enterprise#48196
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Jigar Vaghela (jva) <jva@odoo.com>
2023-10-02 11:42:56 +00:00
Alexandre Kühn b526078ae9 [REF] mail: set data immediately on discuss model relational field
With this commit, instead of `Record.insert()` before setting
relation with records, we can immediately pass record data.
For example:
```js
message.author = { id: 3, type: "partner", name: "Admin" };
thread.messages.add({ id: 10, body: "some-text-content" })
```

This is supported on all relational fields that define a target
model.

To make this work while drastically avoiding cyclic dependencies
in code, whenever data have to be inserted in relation, they are
pre-inserted with essential data, and then they are fully inserted
after being registered in the relation.

closes odoo/odoo#136539

Related: odoo/enterprise#47854
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-10-02 11:42:55 +00:00
Alexandre Kühn 485bcb82bf [REF] mail: make store service a model
This simplifies managing relations on the store, and gives
incentive to define them there instead of another prop that
is a record, e.g. `discuss`.

Part-of: odoo/odoo#136539
2023-10-02 11:42:55 +00:00
Flotchet ab93449323 [IMP] website_hr_recruitment: Enhance UI/UX
Previously, applicants could submit job applications without providing a
resume or LinkedIn profile URL. Additionally, there was no notification
for applicants if they had recently applied for the same job or another
position, and no checks or notification were in place for malformed
LinkedIn URLs.

This commit addresses these issues by:
- Requiring at least one of Resume or LinkedIn profile for an applicant
  to apply.
- Notifying applicants about prior applications for the same job or
  different positions.
- Adding a LinkedIn URL an notifying the applicants that he has
  probably made a mistake if the regex doesn't match his input.

task-3446696

closes odoo/odoo#131308

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-10-02 10:39:42 +00:00
Valentin Vallaeys (vava) 612d85b92c [IMP] sale_management: hook for optional products domain
closes odoo/odoo#137053

Related: odoo/enterprise#48138
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-10-02 09:11:18 +00:00
Andrea Grazioso (agr-odoo) 7ee07bc8c8 [FIX] l10n_cl: relocate timbre electronico in invoice
With an L10n_cl company
Create invoice
Send&Print

Issue: Invoice report does not correctly print the electronic stamp.
It is in the wrong position (on the right, it should be on the left) and
it is shrinked.

In commit
https://github.com/odoo/odoo/commit/3764914c8616bf59d299e6279cc6fc93321cdacb
the 'total' section of the invoice report has been
moved into a right column as floating element.
This commit reposition the stamp on the left column

opw-3474173

closes odoo/odoo#136987

X-original-commit: 37cce94c200f05ee66b9577b95d2eb478134148f
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-10-02 09:11:16 +00:00
Benjamin Vray ce9b350403 [FIX] website, web: fix dropdown hidden in mobile menu
Steps to reproduce the bug:
- Modify the website's menu to include only two items: a link to a page
and a dropdown menu.
- Switch to mobile preview.
- Open the "Hamburger" menu.
- Click on the dropdown toggle.
- Bug: The dropdown menu is hidden and requires scrolling the navbar to
see it.

Since commit [1], dynamic positioning of dropdowns within a navbar has
been enabled (before that, Bootstrap disabled it) but this change
introduced this bug.

To fix this, we disable dynamic positioning of the dropdowns when they
are inside a "Hamburger" menu.

[1]: https://github.com/odoo/odoo/commit/8689241f86e2d4ddb4e4510951f92b80e115b914

opw-3493512

closes odoo/odoo#137165

X-original-commit: 55bc21c9503bf3b319d94e10d73bf672385b455c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-10-02 08:03:45 +00:00
Xavier Morel 5dd8159e13 [REM] website_event_track: pwa registration success log
Not very useful to the average user, and can fill up logs during
tests (mostly 16.1 onwards for some reason but might as well square
up everything).

closes odoo/odoo#137149

X-original-commit: 4461d90e534d7568e6b676913c959d9d083f88fc
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-02 08:03:45 +00:00
Rodolpho Lima c74d01279e [IMP] web_editor: add document parameter to parseHTML
This commit changes the public `parseHTML` utility function's signature,
in order to allow the use of the editor's document to create a document
fragment.

This aims to avoid mismatches in the prototype chain of HTML elements
created by such util and the ones present in the editable when the
editor is mounted in an iframe. This is of particular relevance for the
'insert' command, in which the node to be inserted is tested for
`instanceof` the editor's document global `Node` object.

task-3526134

closes odoo/odoo#136984

Related: odoo/enterprise#48108
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-02 08:03:44 +00:00
diagnoza 19aa9c9ebd [REF] base: introduce hierarchical structure of menus
Introduces a hierarchical structure of some menus. Reasons:

1. Allows testing the child-parent relation of specifically those menus
that do not have `parent` or `parent_id` attribute in the source xml
using standard menus. It's likely a rare use case, but that's precisely
what we currently need in https://github.com/odoo/upgrade/pull/5163
2. Provides a unique example usage of menus written in this manner
as opposed to using the `parent` attribute

closes odoo/odoo#136069

Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
2023-10-02 08:03:41 +00:00
vishal padhiyar edafb60248 [FIX] mass_mailing: remove unwanted classes from mass_mailing templates
Before this commit:

There are some extra classes used in the mass_mailing_theme_template.Those
classes are not supported by mail clients.

After this commit:

Those extra classes has been removed.

task-3347902

closes odoo/odoo#130178

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-10-02 08:03:40 +00:00
Xavier Morel 6c59eea421 [REM] base: use of PyOpenSSLContext in mail server
The mail server mostly doesn't use the intrinsic features of
`PyOpenSSLContext`, instead it pretty much just uses the underlying
`OpenSSL.SSL.Context`, just through the wrapper.

The only thing it actually uses from `PyOpenSSLContext` is
`load_cert_chain`, and since we are using a keyfile and are not using
a password this is equivalent to *two* function calls. Just perform
those two calls directly, remove all the indirections, and remove the
unnecessary import.

Bonus content: since 2.0 `load_cert_chain` reraises the inner errors
as `ssl.SSLError` which we don't handle, so we avoid this extra issue.

This was discovered because from 2.0.0 to 2.0.4 the
`contrib.pyopenssl` module was marked as deprecated (it was
undeprecated in 2.0.5) but regardless its use is an unnecessary
complication here.

closes odoo/odoo#137198

X-original-commit: e534bbed78a80d1ba0c8edd22e039e5cfb50e613
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-02 06:54:42 +00:00
David (dafr) 3b22c2c340 [FIX] purchase_mrp: convert kit price unit to correct currency
How to reproduce:
 - Create Product 'Kit': storable, avco
 - Create Product 'CMP': storable, avco
 - Create BoM => type: kit | product: 'Kit' | Components: 3 units of 'CMP'
 - Create mock currency (or update existing one), with a rate of 'Unit per USD' = 100
 - Create purchase order in Mock Currency for 1 unit of 'Kit', with a unit price of 3,000.00 MOC
 - Confirm Purchase Order and receive products
 => Go to the created valuation layer: Unit price for CMP is $1.000,00 instead of $10.00

 OPW-3453703

closes odoo/odoo#137183

X-original-commit: ca05e3993fd0d8bd2b7333a9be15dc042f95fe6e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David Fesquet (dafr) <dafr@odoo.com>
2023-10-02 06:54:41 +00:00
Xavier Morel beb0c25a94 [IMP] core, bus: future werkzeug compatibility fixes
- `Response.charset` is deprecated since 2.3, `Response.set_cookie`
  accesses the currently-extent internal `_charset` directly until
  this too gets removed in Werkzeug 3.0. Add a `_charset` to
  `FutureResponse` so this does not crash.
- Bytes response headers are deprecated since 2.3, and will get
  removed in 3.0, passing bytes in websocket is completely unnecessary
  happenstance which is trivially fixed.

closes odoo/odoo#137145

X-original-commit: 66e3040d4ad9e03aabefebd4799f699ad30fca45
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-02 06:54:39 +00:00
Odoo's Mergebot 4c0de8db17 [MERGE][FIX] base(_automation), mail, sms: fix automation / server actions usage and model sync
Fix various issues after last refactoring of base automation. Various
usability issues arose when trying to configure some server actions
and automated actions during some tests.

Fixes mainly cover model check on server action, as well as checks
and synchronization with automated rule model. Some additional checks
are added. See sub commits for more details.

Followup of odoo/odoo#114352

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

closes odoo/odoo#137133

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-02 06:54:38 +00:00
Thibault Delavallée 42958e2f5e [IMP] base, mail, sms: directly limit available models depending on usage
Add a computed m2m field giving allowed models for the action. It allows to
avoid choosing the wrong models when designing server actions.

Remove a test that has no use: it checks a model_id field is available on
server action view while we don't want to display it as it is imposed by
the rule itself.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée 84b8ca626e [FIX] base_automation: avoid wrong server action view choice
When creating new primary views you should always specify the priority to
avoid having the specific view used as default. This one is specific to
base automation usage of server actions.

Also move view in its own file to respect guideines. RIP JEM.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée 5462b30b4f [FIX] mail, sms: fix {mail/sms}-specific server actions model check
Effectively check that mail-specific server action types are triggered only
on mail-enabled models that are not transient.

Check that mail and sms templates models match their action model by adding
constraints.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée 5f0d3e805c [FIX] mail: fix activity-based server actions summary computation
Summary should be taken from activity types when possible.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée b05e7e4da0 [FIX] base, mail, sms: fix server actions naming computation
Fix name compute method:

  * correctly call super in batch;
  * correctly filter records;
  * remove dependency on context key (which was missing in triggers);

In this commit we also consider the name update should always be done even
outside of automated rules context. Having a whole compute method relying
on a context key does not makes sense. As server actions are technical
records, having the name always being correctly updated is better.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée 2f9d5258fb [FIX] mail: translate server action names
Following the recent server action refactoring, it seems translations have been
forgotten in the review process.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Thibault Delavallée a8b08b8e92 [FIX] base_automation: check server actions model match rule model
New implementation of automated rules does not check if rule model matches
models of its children server actions. This can easily lead to updating
records of another model which have nothing in common with the automation
rule.

Also better write the reset when changing model.

Task-3527758 (Base Automation Refactor Fiximp)
Part of Task-3527752 (Mail: The Pre-Major Freeze FixImpLint)

Part-of: odoo/odoo#137133
2023-10-02 06:54:38 +00:00
Xavier Morel a92e88d547 [IMP] base: make tests less sensitive to babel / CLDR updates
Babel's named / implicit formats (short, medium, long, ...) come from
the CLDR, which can get tuned as debates get settled, cultures shift,
etc... as a result using these formats can break tests on any babel or
even CLDR release (technically nothing stops distros from updating
their bundled babel with new CLDR data).

b77eb98bbf6bc937efb7941802c0794ae3622094 previously did some
mitigation of this issue, but even if they're not yet in distros
further Babel updates (e.g. 2.12) already affect some of the patterns
we're using.

Proactively mitigate this issue more by only using explicit datetime
patterns (and time patterns, date is fine because it retrieves the
pattern from the lang rather than default to babel patterns) in the
date/time formatting tests. This means only specific terms still vary,
and those should be a lot more stable / reliable than e.g. futzing
with separators and minor formatting issues.

closes odoo/odoo#137181

X-original-commit: 3547e980428cc1dd11c8e82446e7d7f824b9f6f8
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-02 05:56:06 +00:00
Chrysanthe (chgo) c91c221c4c [FIX] web: reintroduce CSS variables for navbar entries
This commit aims to reintroduce CSS variables to handle the different
states of our navbar entries.

Recently, the way we handle the navbar entries changed. Previously, we
used to set CSS variables in Community, which would allow us to control
the color of ours nav entries at every state.

On the Enteprise side, this would allow us to use the different colors we
use for these buttons and style them differently

This approach was also very helpful because we could override these CSS
variables once again to handle the colors of the Studio navbar elements.

Recently, the approach used to control these elements changed :

- On Community, we make use of CSS variables ;
- On Enterprise, we use the Bootstrap `btn-light` class.

Using `btn-light` was a very good approach to ensure that no issues would
appears on our buttons and also to reduce the amount of code needed, but
unfortunately, using `btn-light` directly affects Studio, causing contrast
issues. It was also a bit weird to have CSS variables + Bootstrap classes
being set at the same time.

To fix these issues, we reintroduce CSS variables in Enterprise and Studio,
to fully control the color of our elements and ensure everything is
readable. Most of these variables are defined in Community, inside the
`navbar.scss` file, and we simply override them in Enterprise and Studio.

task-3418936
part of task-3326263

closes odoo/odoo#137140

X-original-commit: af6d914c379953d2deec9833579399f126076194
Related: odoo/enterprise#48174
Signed-off-by: Stefano Rigano (sri) <sri@odoo.com>
Signed-off-by: Chrysanthe Gomrée (chgo) <chgo@odoo.com>
2023-10-02 05:56:04 +00:00
Walid f55824ce17 [FIX] delivery: long trackingRef form view
Steps to reproduce:
- Create a transfer with a delivery method.
- Add a lot of characters in the tracking reference field.

Bug:
after saving the field overflows in the view

opw-3370813

closes odoo/odoo#137176

X-original-commit: 707ae95d32836296e57540cdbdf78a2b3a7c7117
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-29 20:48:45 +00:00
Gurupreet Singh a3c4cb6ba2 [FIX] project: fix project tour
When we run the project tour manually, even if we select the assignee, the tour
does not move to the next step, so we have clicked the input button manually.

task-3302315

closes odoo/odoo#137152

X-original-commit: 99f13f2e2c9d30f829c3eba3d16d23ae203d0754
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 18:16:14 +00:00
tsm-odoo df57ab6221 [IMP] im_livechat: restrict operator assignation during call
This PR changes the operator allocation algorithm so that operators
in a call with already two ongoing chats are not prioritized over
more occupied operators that are not in a call.

part of task-2900771

closes odoo/odoo#135113

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-29 17:15:39 +00:00
Pedram (PEBR) 020f5061d1 [FIX] point_of_sale: Prevent adding archived products by barcode
When limited product loading is enabled, archived products can still be
added to orders by scanning their barcode, because
`get_pos_ui_product_product_by_params` loads archived products to
prevent errors when refunding orders.

This allows adding archived products via barcode even though they are not
visible in the POS interface.

To prevent this, we exclude archived products from the product_by_barcode
when adding products to it. This ensures archived products cannot be
added by barcode when limited product loading is enabled.

opw-3502136

closes odoo/odoo#137119

X-original-commit: 95c3807d541afe0581b636eb8394cd8f79bb770e
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-09-29 16:08:48 +00:00
David Monnom (moda) cfe0a6f463 [IMP] pos_self_order: add search bar
After the merge of kiosk and mobile self, the search bar had not been
reimplemented.

In this commit, we add it.

closes odoo/odoo#137063

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-29 16:08:47 +00:00
rajh-odoo ed47260648 [FIX] lunch: fix traceback when we product add to cart
Description of the issue:
This commit addresses a traceback error that occurred when adding a product to
the cart with an empty cart. The issue was related to accessing values for
'topping_ids_1', 'topping_ids_2', and 'topping_ids_3' without proper validation

Fix:
In this fix i have added checks to ensure that the values are present before
accessing them this prevents an 'index out of range' error and resolves the
traceback problem, additionally, the code now considers the values in
'topping_1_values', 'topping_2_values', and 'topping_3_values' to determine
 whether to access the values or fall back to default values from the order.

Desired behavior after PR is merged:
traceback will fixed and work properly

task-3511953

closes odoo/odoo#135942

Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-29 16:08:46 +00:00
shag-odoo dd5e3b97f0 [IMP] fleet: improve length of model field
Improvement:
Following this commit the length of model field inside form view of vehicle is
expanded.

closes odoo/odoo#133431

Taskid: 3477830
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-29 16:08:44 +00:00
Mayurrajsinh Rathod 68ddd3c3a0 [FIX] website_slides: prevent content title overflow
This commit resolves the issue of content title overflow in both fullscreen
and non-fullscreen views by cropping the title and adding '...' at the end.

Task-3384661

closes odoo/odoo#137112

X-original-commit: 2275279a74757d47b3138587793aef67f6b5e7ef
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-29 14:48:22 +00:00
Hugo Carlier (Huca) 5098f4e2f4 [FIX] project_todo: remove filter on project when converting a to-do
Before this commit, the conversion of to-do to task is performed through
a form view on the project.task record. This view let the user pick a
project for the current record. A domain is applied on the project_id
field to only let the user select a project from the current selected
companies. This commit removes that filter to only rely on the ir.rule
of project.project instead.

task-3458909

closes odoo/odoo#137111

X-original-commit: 8adc4e2f08e6e704c314cda21494bb3486a32fd2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 14:48:20 +00:00
Benoit Socias f35de1bd5a [FIX] web_editor: only pre-convert webp images when within image fields
Since [1] when webp support was introduced, pre-converted images
(resizes and jpgs) are automatically created so that the images can be
used in PDF reports.
This only needed to be done for image fields - which can be referenced
in reports.

This commit limits the pre-conversion of images to images that are set
in image fields.

[1]: https://github.com/odoo/odoo/commit/0449fe85cb0e1d639a4e1aeba26e90906f79254d

task-3510621

closes odoo/odoo#137109

X-original-commit: cd0164339e5179177aaaf21b69615a71a8982da8
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-09-29 14:48:18 +00:00
rajh-odoo 9b2ca51df7 [FIX] hr_timesheet: fix project kanban remaining hour field visibility
Description of the issue:
remaining hour field was visible to all users

Desired behavior after PR is merged:
remaining hour will only visible to that user who have timesheet access this
field will invisible if user doesn't have timesheet access

task-3484290

closes odoo/odoo#137082

X-original-commit: e737f0934f8a83cd02a4a79fbf174b95b524a4e7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 14:48:17 +00:00
Maruan Aguerdouh (magm) 30290b592f [FIX] point_of_sale: ticket cashier does not change after order finished
Steps to reproduce:

- Install PoS and activate Multi Employees per Session (Add atleast 2
employees)
- Open a session in the PoS shop and create a new order.
- Follow the steps until the ticket screen of the order.
- Here change the cashier of the PoS, and see the ticket cashier.

We don't want to change the ticket cashier of an order that has already
been done, since then the cashier of the order is not going to match the
cashier of the ticket.

opw-3483405

closes odoo/odoo#137019

X-original-commit: 819dfa288cf13111fd483cafc1a77b8c68ad06ce
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-09-29 14:48:17 +00:00
Rodolpho Lima bfe0c5fedf [FIX] web_editor: use Node from editable's document
Steps to reproduce:
- In website, paste a URL like "odoo.com" as plain text.

The expected result is a transformed link, just like it happens when
pasting is done in an html field (ex: project.task description), but
a simple text node is inserted instead.

The reason for this is that an element created by the iframe document's
`createElement` method has in its prototype chain the iframe context's
global `Node` constructor, which is a distinct constructor object from the
main window's `Node` constructor.

task-3521152

closes odoo/odoo#136597

X-original-commit: 392d78dab632f67721ec2ba8810d5c8053640b86
Related: odoo/enterprise#48136
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-09-29 14:48:14 +00:00
Rémy Voet (ryv) a9dd388a11 [IMP] *: use private _read_group for efficiency/consistency.
Since https://github.com/odoo/odoo/pull/110737, it is better to use
`_read_group` instead of `read_group` in the backend. In fact, the
public method is less efficient (it computes display_name of relational
groupby, extra order, ...) and more verbose.

This commit replaces these new uses of `read_group` with `_read_group`.

closes odoo/odoo#136381

Related: odoo/enterprise#47826
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-29 14:48:13 +00:00
Rémy Voet (ryv) afef0b390f [FIX] mail: allow searching on message_partner_ids for portal
Because we now check groups in the domain, some searches raise
`AccessError` when using `message_partner_ids` in the domain for the
portal user:
- https://github.com/odoo/odoo/blob/4d1a1f1c99d6055b60921ce464b72f0f4d9bbfe2/addons/sale/controllers/portal.py#L35
- https://github.com/odoo/odoo/blob/4d1a1f1c99d6055b60921ce464b72f0f4d9bbfe2/addons/sale/controllers/portal.py#L41
- https://github.com/odoo/odoo/blob/ba1a5509fa49fd846739252d16083dd8cb334b53/addons/website_forum/models/forum_post.py#L831
- https://github.com/odoo/odoo/blob/86b43bcfa6c9a5b6ac1b3ac9ba0c308f1169ea3b/addons/hr_timesheet/models/hr_timesheet.py#L41

Since there are many invalid domains and it is impossible to sudo only
part of the domain, it is easier to override `_flush_search` to allow
`message_partner_ids` in search domain leafs with some restriction.

closes odoo/odoo#135111

Related: odoo/enterprise#47822
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-29 14:48:09 +00:00
Rémy Voet (ryv) eb0ba7f79b [IMP] core: check field groups for search domain and order
In order to boost the read security of groups on field, we now
check groups of field used in search domain and search order.

Part-of: odoo/odoo#135111
2023-09-29 14:48:09 +00:00