Commit Graph
161175 Commits
Author SHA1 Message Date
gawa-odoo dba7056c71 [FIX] analytic: allow filtering based on analytic distribution
Currently, the field `analytic_distribution` does not appear in
the filters, while it should (to be able to filter `account_move_line`
for example).
We added Json to the filterable fields. If not overriden, it will
search on it like a String.

We also have to add a non-stored field to be able to define a search
function for `analytic_distribution`, to be able to search based
on the keys of the json.

closes odoo/odoo#121223

X-original-commit: 3d3e6847230d5cc9cd61a9bf83bef403a5b4b3ec
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-12 20:52:06 +02:00
Horacio Tellezandchevalierv 216fa84fbe [ADD] sale: add a products catalog view on the sale order
Currently, Fields Sales are struggling to create quotations or sale
orders directly from the customer place. One of the issues is that it
is not easy to quickly add products to the SO. Products must be added
one by one and, in mobile, it requires completing a form with
quantities, ... for each new line.  

This commit introduces a catalog view that allows users to select
products in a faster and easier way than before, both in desktop and
mobile view.

Task - 3062080

closes odoo/odoo#106382

Related: odoo/enterprise#37915
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: chevalierv <vcr@odoo.com>
2023-05-12 20:51:51 +02:00
hote-odoo 19e2e15027 [IMP] sale: stop tracking changes for draft orders
When tracked changes happen on a sale order, they are logged in the
chatter. These changes are not relevant to be shown in the chatter as
they can be excessive when the sale order is in a draft state,
especially for e-commerce orders since they are modified step-by-step
by the customer.

After this commit, changes will be logged only if the sale order is not
in a draft state.

Task - 3062080

Part-of: odoo/odoo#106382
2023-05-12 20:51:50 +02:00
Ivan Yelizariev 547274edd1 [FIX] event: properly handle non-existent template
This commit modifies `execute` method to avoid `MissingError` on reading
`template_ref` field.

`template_ref` is a Reference field, which may have id of a deleted record.

https://github.com/odoo/odoo/blob/927890d0178c361ef8d80fe6a1ec2ffaefaf73fd/addons/event/models/event_mail.py#L53

Method `execute` is used by cron.

https://github.com/odoo/odoo/blob/fba13477843d4d36e3e7a9ddd4b0812c9726e20c/addons/event/data/ir_cron_data.xml#L4-L8
https://github.com/odoo/odoo/blob/927890d0178c361ef8d80fe6a1ec2ffaefaf73fd/addons/event/models/event_mail.py#L247-L256

Getting the `MissingError` means blocking processing the whole batch of tickets.

Fix it by ignoring such tickets and logging a warning

https://online.sentry.io/issues/4089773378

closes odoo/odoo#121199

X-original-commit: c61a8fbb7d4338ca362a3d2093e7aa2f973b289c
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-05-12 19:55:10 +02:00
Mathias Mathy (MAMA) 874fa51dbe [FIX] stock: Warning on replenish max Qty change
Change the rules for the activation of the unwanted replenish warning.
Before :
    Verification for unwanted replenish were only done if the
    stock_orderpoint have a max qty >= 1

After :
    Verification for unwanted replenish are done if the
    stock_orderpoint have a max qty  >= 0

task : 2918947

closes odoo/odoo#121144

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-05-12 19:55:08 +02:00
tsm-odoo b07085ef21 [IMP] mail,*: remove server data key in thread insert
*: im_livechat, website_livechat.

Before this commit, the `thread.insert` method received an arbitrary
`serverData` key. This was cumbersome since we needed to create this
key manually at each insertion.Moreover some attributes where coming from
dedicated keys, some from the  serverData key, some from both which led
to a bug-prone, hard to maintain code.

This commit removes the `serverData` key in order to solve those
issues.

closes odoo/odoo#121117

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-12 19:55:05 +02:00
Samuel Degueldre 3fb24aa05e [REF] pos*: use fine grained reactivity instead of deep renders
*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos,
l10n_in_pos, point_of_sale, pos_discount, pos_hr, pos_loyalty,
pos_mercury, pos_restaurant, pos_sale, pos_six

The code of the pos was one of the first adopters of owl 1, as such, the
code was not initially written to take full advantage of the owl
reactivity system that would eventually make its way into owl 2. In
order to convert the code quickly when migrating to owl 2, a big
shortcut was taken: whenever something in the state of the pos changed,
the entire UI would be rerendered. While this works decently well in
practice, it can create confusing situations because the mental model
needed to understand how components work in the pos is different from
the rest of the code base.

This commit changes the existing code to use the typical fine-grained
reactivity model used everywhere else: components individually subscribe
to the pieces of state that they use and will rerender on their own when
this state changes. In order to achieve this, the pos global state has
been removed from the environment and should now be access through the
use of the custom hook `usePos` which will subscribe the component to
the state that it reads. This also has some minor performance benefits
as we only render the parts of the UI that actually need to update
whenever there is a state mutation, instead of the entire UI which can
be expensive in some cases (eg, the product screen will filter all
products during rendering to find only the products that match the
search, which is expensive when there are a lot of loaded products)

closes odoo/odoo#120992

Related: odoo/enterprise#40873
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-05-12 19:54:57 +02:00
thsh-odoo 9f388174f3 [FIX] event_sale: attendee count stat button
The attendee count was moved with the preview button. We make it a stat button
as it makes more sense for the purpose it serves, and will prevent further
unintended re-locations of the button.

task-3300746

closes odoo/odoo#120760

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-05-12 19:54:52 +02:00
Xavier Bol (xbo) 8a286e89cc [FIX] project: fix the width of state and priority columns in list view
Before this commit, when the list view is rendered and is empty then
the state and priority columns are relatively big just to display a
button.

This commit fixes the width of those columns to 40px when the list
view is empty. If the list view is not empty then those columns will
have a min-width set to 40px.

task-3248592

closes odoo/odoo#120508

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-12 19:54:50 +02:00
Xavier Bol (xbo) 96c11f3e9c [FIX] project: avoid autofocus the state field
Before this commit, when the user goes to the form view of a task
and when to add a subtask into it. When he clicks on `Add a line`
on the subtree view of subtasks the state field is focused because
it is the first field focusable in that list view.

This commit removes the state field in focusable elements to directly
focus the next focusable element who is the name field.

task-3248592

Part-of: odoo/odoo#120508
2023-05-12 19:54:49 +02:00
Xavier Bol (xbo) 45376e4b11 [FIX] project: translate additional text in name_with_subtask_count widget
Before this commit, the additional text added next to the task name
when `name_with_subtask_count` widget is used on the task name field
was not translated.

This commit correctly translates the additional text added in that widget
by moving the text defined in JS code into the template of that widget.

task-3248592

Part-of: odoo/odoo#120508
2023-05-12 19:54:49 +02:00
Xavier Bol (xbo) 93b90a3ff3 [IMP] project: update closed_subtask_count when state of subtask changed
Before this commit, when the user displays the subtasks list on a kanban
card and change the state of a subtask to set to Done then the
`closed_subtask_count` field does not changed in the kanban card.

This commit updates the `closed_subtask_count` when the subtask will
be closed or opened on the subtask list displayed in the kanban card.
Also, the `this.props.record.activeFields` is no longer used to fill in
the activeFields of Record component because the `activeFields` will
change in the future.

task-3248592

Part-of: odoo/odoo#120508
2023-05-12 19:54:49 +02:00
Julien Van Roy af69310b38 [IMP] account[_edi_ubl_cii]: new setting to uncheck the UBL/CII formats by default
Currently, the UBL/CII format (if enabled on the invoice) is checked by
default, which will trigger the validation checks upon generation. This
can be annoying (feedback: "error message when we want to send invoices
to customer. For some customer, there is a problem with the xml file. To
be able to send the invoice, we uncheck the box for the xml invoice. See
video:
https://drive.google.com/file/d/12IkhqQtHw0EUF3srqRX8uZjCXU2DYpns/view?usp=sharing)

To solve the issue, we add a new field `invoice_is_ubl_cii` to check or
uncheck the UBL/CII checkbox by default.

In addition, rename the field `invoice_is_print` to
`invoice_is_download` since it corresponds to the checkbox 'Download'.

Finally, make the `company_id` of account.move.send a computed field
instead of using the `_default_get`. Indeed, when creating the wizard
and passing a `move_ids` key, this key will not be detected as missing
by the `default_get`, and we will not enter the statement in the
`default_get` in `account_move_send.py` to set the `company_id`. As a
consequence, the `company_id` will not be set, and the subsequent
computed fields will not be correct (e.g.
`wizard.company_id.invoice_is_ubl_cii` will always be False inside
`_compute_checkbox_ubl_cii_xml` if `company_id` is not set).

task-3297308

closes odoo/odoo#119397

Related: odoo/upgrade#4581
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-12 19:54:42 +02:00
Bastien (bvdn) 3e6821e215 [FIX] project: sort kanban header/renderer functions
the deleteGroup method in the header opens the confirmation dialog then calls the kanbanrenderer deleteGroup method so no need to override it
the editGroup canEditGroup and canDeleteGroup methods must be placed and overrided in the kanbanHeader
as well as the onWillStart the sets the this.isProjectManager, which will be used in the canEditGroup
the canCreateGroup and isProjectTasksContext should stay in the renderer

Task-3276463

closes odoo/odoo#119096

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-12 19:54:40 +02:00
Bastien (bvdn) 1b35c5eb3d [FIX] project: change personal stage edit display
in the edit stage of the personal stage we should only display the name of the stage and the folded bool

Task-3276463

Part-of: odoo/odoo#119096
2023-05-12 19:54:40 +02:00
rhe-odoo 5e55758d66 [IMP] point_of_sale: load default demo data
When loading the pos without demo data, before we had a wizard that allowed the user to load data before the pos starts.
Now, we let the user go to the frontend without preloading products and categories in the database.
In the front end, when no products and categories are loaded, we let the user press buttons to load the default products and categories.

The user can also be redirected to the back end to add new products.

closes odoo/odoo#117823

Task-id: 3054477
Related: odoo/upgrade#4523
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-05-12 19:54:35 +02:00
Jérémy Hennecart (jeh) 8b64f9dd4e [IMP] calendar: add resources and capacity info on template
Add the list of resources and the capacity when booking an appointment type.

task-2453291

closes odoo/odoo#120023

Related: odoo/enterprise#37220
Related: odoo/upgrade#4585
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-12 19:54:28 +02:00
Julien Alardot (jual) 25ac24361a [ADD] l10n_es_edi_facturae: Add Facturae governmental EDI
Add an implementation to allow companies
to use the Facturae governmental EDI,
by generating and signing the XML

closes odoo/odoo#108350

Task: task-2793440
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-12 19:54:23 +02:00
Julien Alardot (jual) a171597d19 [IMP] base: Add a dummy VAT number to demo partners
This just sets a dummy VAT number for all the demo partners

We need to access the demo partners vat number in
l10n_es_edi_facturae, and overriding data in the
other module could lead to different behaviours in
the future

Task: task-2793440
Part-of: odoo/odoo#108350
2023-05-12 19:54:22 +02:00
Julien Alardot (jual) e7683b3778 [IMP] l10n_es: Add a zipcode to demo company
We need to access the demo company zipcode in
l10n_es_edi_facturae and we already have a city set

This just adds that city zipcode in the zip field

Task: task-2793440
Part-of: odoo/odoo#108350
2023-05-12 19:54:22 +02:00
Julien Banken c93ca58d2a [IMP] web: add "fs" size option for dialog
This commit will add a new size named "fs" for the Dialog component. It
will force the dialog to have a width of 100%.

task-2796157

closes odoo/odoo#114401

Related: odoo/enterprise#34663
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-12 19:54:19 +02:00
Carlos ValverdeandBenoit Socias 54f246f9c7 [IMP] website_hr_recruitment: add pager + search and improve filters
1. Pager + search

Before this commit the jobs list had no pager, and the search parameter
was neither used for filtering nor propagated to the rendering.

After this commit the jobs list supports pager and the search parameter
is passed through all layers.

2. Filters

Before this commit, filters were displayed as a set of `nav-pills` items
in a column on the left of the main template.

After this commit, filters have been moved to the top as dropdown
elements, displaying counts inside badges, which are obtained from the
list of filtered jobs.

Filters have also been adapted to requested change: each filter content
must be based on results that would be obtained if that filter was not
applied.

Additionally, `Remote` filterable location has been included, and can
be set either by using the backend or directly with the website builder.

task-2406626

closes odoo/odoo#67913

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
2023-05-12 19:54:08 +02:00
d3b7e1c127 [IMP] website_hr_recruitment, *: improve pages design
*: website

Old 'website_hr_recruitment' templates looked outdated, so they have
been improved in terms of usability and design, by applying the
following changes:

- Old images used in `/jobs` and `/jobs/detail/` have been replaced by
new ones, taken from the Odoo official profile in social media.

- A `Connect with us` section has been added to the right column of
`/jobs`, including a separator, links and social media icons.

- Job entries in `/jobs` now show the city of the office, its country
and its department, as shown in the filters.

- In `/jobs/*`, old header with a breadcrumb has been replaced by
the topbar seen above, including a link to previous page in the
navigation flow.

- Design in `/jobs/detail/` has been improved, including a redesign of
the `Our Product` block or the image gallery at the end of the page.

- Header in `jobs/apply/*` has been improved and includes a column with
the address of the job position.

- In `jobs/apply/*`, the design of the form group has been revamped and
also has been added a right column including a snippet with the contact
information of the recruiter tracking the job application process.

- Overall design has been improved in the `/job-thank-you` view,
including the recruiter snippet seen above.

- Job description is now editable and not truncated. Additionally, a
default job description has also been added.

- Every new job entry has now a default short description, editable.

- If there is either no available job or not any valid job after the job
search, the `No jobs available` view has also been improved.

- Illustrations with dynamic colors have been included in
`/jobs/detail` (`Our Product` block) and `/job-thank-you`.

- `boolean_toggle` widget used in `website_hr_recruitment`'s
backend, in its job entry kanban has been improved.

- Syntax has been adapted to BS5.

- Tests have also been updated to the changes in the templates.

task-2406626

Part-of: odoo/odoo#67913
Co-authored-by: Benoit Socias <bso@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-05-12 19:54:08 +02:00
Benoit Socias 4978d2d107 [IMP] *: allow empty frontend m2o and deselection in the editor
*: base, web_editor

The Many2oneUserValueWidget does not allow the user to reset it
to blank if it already contains a selection. This commit makes it
possible to select an empty value by specifying a `null_text` option.

task-2406626

Part-of: odoo/odoo#67913
2023-05-12 19:54:08 +02:00
Carlos ValverdeandBenoit Socias 0c8484652e [IMP] website: make fuzzy test more robust
New data will be introduced that involve the "product" word... while
this is a word a fuzzy test is based on. This commit adapts the test so
that its results are based on words that are less likely to appear in
default data.

task-2406626

Part-of: odoo/odoo#67913
Co-authored-by: Benoit Socias <bso@odoo.com>
2023-05-12 19:54:08 +02:00
yhu-odoo 8b09cd722f [FIX] mrp: duplicate lot when auto-generate serial
Previous commit 1b840d066999bde1f05563567f439967770701ca tried to fix
the issue action_generate_serial may try to generate a existing lot.
But it made the lot number completely product specific. This change is
too big for stable, we revert the change in this commit.

Also to fix the issue, when action_generate_serial tries to generate a
lot, we always try the result from ir.sequence frist, only when the lot
already exists, we then try create one based on the product's lastest
lot number.

Task-3187003

closes odoo/odoo#121214

X-original-commit: 95214ab6c133553371926804e788766edab2b8ca
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2023-05-12 13:00:50 +02:00
Arnold Moyaux 6a4fd60d75 [FIX] purchase_stock: clean non deterministic test
test_reordering_rule_1 try to ressuply 10 from RR.
However since 15.0 the picking `action_confirm` will
launch himself the required orderpoints to order the
missing quantity. So the run scheduler is useless but
should not order the quantity again since it's already
process.

But in the test the cache for the orderpoint is not
always consistent with the data. It happens that the
quantity forecast remains -10 even after the RFQ creation.

It happens due to the savepoint. It will flush the data
and take a random env. However in the enviroment, the
active_test key could be there. And it will recompute
all the fields. So it goes through `_compute_rules` that
call `search_rule`. There is an archived route from supplier
to stock. So it will pick this rule instead of the buy route.
`_compute_lead_days` will not have the supplier delay as
a result and a wrong forecasted date. `_compute_quantities`
on product will check the virtual available for this date and
will only have the out move and not the in since the domain
is incorrect with the wrong lead days date...

I can't do much since it's due to the orm.
- Remove the savepoint but it will require a global refactoring
- Fix the ORM, it's planned but difficult.

So for now I just remove the context key form the context in the
compute.

Note: this could happens outside the test when there is more than
1000 RR.

closes odoo/odoo#121106

Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-12 13:00:47 +02:00
Mathieu (mano) b7b05a2d1c [IMP] web_editor: new shapes full height menu
This commit replaces the `we-select-pager` for a full-height version
allowing better sorting and visibility of the shapes and background
shapes.

The new UI now has a navbar inside the pager which allows to scroll to
anchors inside the menu. To do so a new attribute `data-scroll-to` is
added on the button element allowing to scroll to the class contained
in the attribute with the new function `_onClickScrollPage`. Thanks to
ard the Selection widget now activates the corresponding menu section
of the new pager whenever the data-scroll matches a section that has
passed the middle of the container.

The menu being full width, the angle with the class `.o_pager_nav_angle`
triggers the `_onClickCloseMenu` to close the menu.

To avoid duplication, the label for the devices now uses the same Js
logic as the Animated label for the shapes. This frees the :before and
:after which allows to use the alpha-background extended class on the
we-button for both types of shapes. The devices label information now
shows an aspect ratio rather than full dimensions.

For the new pager to appear full-height and the content being scrollable
inside the proper section of the menu, two new containers are added
one for the pager's navigation (`o_pager_nav`) and one for the shapes
pages (`o_pager_container`). This allows to have the parent div in fixed
positioning and keeping a scrollable section on the `o_pager_container`
under its inner navigation.

The previous shapes are back to their original ratio of 800x600
since switching them in square makes them less recognizable.

Finally, in the `we-toggler` when no elements are selected or when it is
empty, we now display `None` instead of `/`.

task-3266751

closes odoo/odoo#118253

Related: odoo/design-themes#653
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-12 11:17:41 +02:00
Antoine Guenet a6568a69db [FIX] mass_mailing: restore save on blur
Commit [1] defined a value for the `onWysiwygBlur` option of `Wysiwyg`
in the `mass_mailing` `html field`. This had the side effect of
overriding the value set by its parent `html field`, which was to call
`commitChanges`. As a result, the `mass_mailing` `html field` was not
saving its content on blur. This restores that behavior by explicitly
adding the call to `commitChanges` where it was missing.

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

task-3288881

closes odoo/odoo#121231

X-original-commit: 817d494e4eaa29983f75d4f3d6754ef3c3cc6e51
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2023-05-12 09:21:55 +02:00
Patrick Hoste 8e8f1be6a7 [FIX] website_slides: fix multiple course review bug
Before this commit, it was possible for one to post
multiple reviews when all the already posted reviews
had the 'Employee Only' state. A traceback was also
thrown when trying to update an 'Employee Only'
comment. It was also possible to edit a log note.
This commit fixes all these issues.

Task-2810085

closes odoo/odoo#121052

X-original-commit: 2e4f8ff553b11ecae444933aa2b9fab6175e64ef
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-12 09:21:52 +02:00
Maximilien (malb) 52ba78e07d [IMP] l10n_vn: taxes
We want to invigorate a Tax Name Taxonomy so that tax names are as codified as possible. This allow for a better display on Invoice Description, and allowed us to implement a smart name_search.

In this PR, we change the taxes name so that it's more clear for the users

closes odoo/odoo#115093

Task-id: 3052677
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-05-12 09:21:49 +02:00
Laurent Smet 09af1764a8 [FIX] account: Fix _compute_linked_attachment_id
When the record is a draft record (with a NewId), the attachment is not retrieved correctly.
Indeed, `move_vals` contains the real ids.

closes odoo/odoo#121224

X-original-commit: 34ff1d66d5352f36d8d982d868e0b01c929c3c88
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-12 08:17:04 +02:00
Nshimiyimana Séna 63d7e39a09 [FIX] account: prevent sequence number gap in Accounting Firms mode
When modifying the accounting date of an invoice in Accounting Firms
mode, Odoo always generates a new invoice sequence number. This behavior
can introduce gaps in the sequences.

1. Activate Accounting Firms mode.
2. Create a new Draft Invoice and save it.
3. Create a second Draft Invoice and save it.
4. Modify the accounting date of the first invoice and save it.
5. Observe that the first invoice's invoice sequence number is updated
   to the next sequence, creating a gap.

Recompute the sequence only when the new date falls into a different
fiscal year.

opw-3164537

closes odoo/odoo#121215

X-original-commit: 28c5c37c420eda8f916dc0f031521313ac18ec08
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-12 08:17:01 +02:00
Christophe Simonis 0a159622c2 [FIX] core: ensure odoo.upgrade __path__ contains real directories
mimic what is done for `odoo.addons` __path__.

closes odoo/odoo#121211

X-original-commit: 2a981e6a561f572742202d9c964d3b1f3aecacf9
Signed-off-by: Christophe Simonis <chs@odoo.com>
2023-05-11 19:21:14 +02:00
qsm-odoo b3b8dbb858 [FIX] mass_mailing: restore website snippets demo page
When mass_mailing was installed, the website snippets demo page did not
work anymore. This is due to a combination of two factors:

A. [1] marked views for removal just before the release of the 16.0 (so
   that they could be removed via an upgrade script later on after
   runbot things) but we forgot to remove them before the release.

B. The views that [1] tweaked and should have been removed contain an
   apparently simple `<div>` with a comment... but it actually acts as
   an xpath looking for a div as it is an extension view. Unfortunately,
   there is a bug in the t-call/inheritance system regarding this: when
   the main view containing this xpath is rendered directly, there is no
   issue (that's what edit mode works: a div is found and nothing is
   added inside). But when it is t-call'ed (as it is the case in the
   snippets demo page), the div cannot be found anymore (it seems to
   look for `/data/div` instead of `/t/div`).

The bug described at B (if it is really a bug) could be worth checking
but this is probably not worth the time until a real usecase occurs. For
now, this commit fixes the broken demo page by removing those useless
xpathing views.

[1]: https://github.com/odoo/odoo/commit/3201eba9fd31602d709b962965e9c1411d1eeb6f#diff-b26221e9411fb6f3725ce5a30c4659a22d81a9a69f666bdbd6daa77e03ec3253R302-R308

task-3233465

closes odoo/odoo#121202

X-original-commit: 10497b96c067c234553bf44d735e51414087bca9
Related: odoo/upgrade#4668
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-11 19:21:09 +02:00
Chong Wang (cwg) 1e7d24dbbb [FIX] mail: reset template translation
Before this commit:
when reset template, the strategy is
1. write the template value from the data file with_context(lang=None)
  (some legacy translations may be kept, if their en_US values were not changed)
2. use the translations in the po file to override current translations
But when a term is not translated in the po file
(for example, all en_UK terms, since we don't have en.po),
the old translation of the term cannot be overridden and reset

After this commit:
Thanks to the new feature introduced in #109858, the translation for a term can
be voided before the step 2
As a result, translations for model translated fields can be correctly reset

opw-3241014

closes odoo/odoo#121201

X-original-commit: 43afdc20d2fc01668ae2665240fc2be26b45ebf5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
2023-05-11 19:21:03 +02:00
Jonathan Castillo (jcs) a42fb9b4a9 [IMP] account , base_vat: add links to documentation in the settings
This commit adds buttons to existing documentation pages next to the
features' labels in the settings.

task-3297635

closes odoo/odoo#121155

X-original-commit: f184594a5e202fa12903304cc32cb0c4fccf6434
Related: odoo/enterprise#40943
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2023-05-11 19:20:58 +02:00
Guillaume (gdi) 18ea3b389d [FIX] website_blog: prevent the use of blog sidebar select
Before this commit, the user could use the blog publication date
selector situated in the blog sidebar even when he was in edit mode.
This date selector should behave like a link, it should not work in edit
mode. This commit prevents the user from using this selector while he is
in edit mode.

Steps to reproduce the bug:
- Go to /blog
- Edit the page
- Enable the sidebar option
- Click on the select in the sidebar
- Click on a date

=> An error is displayed.

task-3213851

closes odoo/odoo#121142

X-original-commit: 7e8e12c40b03d923b17831d95a5fe94410c2a56e
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
Signed-off-by: Dieleman Guillaume <gdi@odoo.com>
2023-05-11 19:20:55 +02:00
Victor Piryns (pivi) 6510215902 [FIX] sale_project: confirm SO w/ milestones on SO with set project_id
Current behaviour:
If we confirm an SO with a service with a delivery based on
milestones, that creates both a project & task, and we set a project
on the SO, the project for the milestone should be the one set on
the SO, a ValidationError is raised for missing project on milestone.

Expected behaviour:
No ValidationError, the milestone should use the project set on the SO.

Steps to reproduce:
- Install Sales, Project
- Check Milestones in Settings
- Create a new project.
- Create a new product, type service, delivery milestones, on
  confirm create project & task
- Create an SO, add a line with the new product.
- Set a our new project on the SO (In the "Other Info" tab)
- Confirm the SO, you are met with a ValidationError.

Reason for the problem:
Since we are not *generating* a new project, `project_id` on the
sale_order_line is empty, and we base ourself on it when creating
the milestone in `_generate_milestone`, leading to the non-null
validation error, because this field is `required=True` on milestones.

Fix:
When creating the milestone in `_generate_milestone`, if the line
doesn't have a `project_id`, we take the one set on the order.
We don't set the `project_id` to the *determined_project*
(`_determine_project`) at line 305
(after: `so_line._timesheet_create_task(project=project)`) because
the `project_id` on the sale_order_line is marked as "Generated
Project", which is not true in our case (the project isn't generated
by the sale order line).

Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- master

opw-3236235

closes odoo/odoo#121141

X-original-commit: 811bbf05722bc69d461306a8890235541c571457
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-11 19:20:53 +02:00
Maximilien (malb) 7f9cba90da [IMP] l10n_at: taxes
We want to invigorate a Tax Name Taxonomy so that tax names are as codified as possible. This allow for a better display on Invoice Description, and allowed us to implement a smart name_search.

During the previous pr to modify the taxonomy, some taxes (with same tax type)
had the same name, which is obviously wrong. Now every name is unique.

closes odoo/odoo#121126

Task-id: 3052677
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-05-11 18:25:38 +02:00
Jay Savaliya be32787832 [FIX] base: partner creation from name
In  https://github.com/odoo/odoo/commit/6371565e6933d6ede88fa85992f4acbc2cb5327b we expect required fields to throw  ValidationError when not set,
we thus correct res_partner to raise that error when the email is implicitly
required, so after this commit if we can try to create a new partner from the
name directly then It will give a validation error and wizard will open for the
creation of a new partner.

Task-3297388

closes odoo/odoo#121127

X-original-commit: 98aca8f76f7509b143263100384a2f2ed644124b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-11 18:25:36 +02:00
Thomas Lefebvre (thle) 7bb7cdcb98 [FIX] website_sale: clear old pricelist in the session
On the ecommerce, we want the pricelist to be adapted
to the user who is connected.
If no user is logged in, the 'Public Pricelist' is used.

To determine the pricelist that will be used (by default):
https://github.com/odoo/odoo/blob/a3169ede4f609b56c83da04756d20b1c7a07251f/addons/website_sale/controllers/main.py#L350-L354

Therefore, if we have been to the shop as a 'Public user' and we decide to log in,
we already have a pricelist in `request.session.get('website_sale_current_pl')`.

So we have to clear the pricelist when we connect to determine the new pricelist
of the user.

opw-3228998

closes odoo/odoo#121074

X-original-commit: 71b2d817df93f0cc8c1f5c424a3555bcadf33b2d
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-11 18:25:28 +02:00
Maruan Aguerdouh (magm) c50ae28374 [FIX] stock: set location as replenishment posible without warehouse
Steps to reproduce:

- Install purchase, inventory and manufacturing.
- Now create a subcontractor, with it's corresponding location, it's set
by default.
- Go to this new location and set it as replenishment location.
- Now create a Request for Quotation using this subcontractor.
- We will receive a traceback whent trying to access replenishment.

Issue:

We got a traceback caused by the fact that we are trying to set
as replenishment location, a location that doesn't have a warehouse.

Solution:

We need to add the handling of this case, so we won't always need
a warehouse for the orderpoint.

opw-3164276

closes odoo/odoo#121065

X-original-commit: 874e42463c2077980b9b4ce3903030c980285d51
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-05-11 18:25:26 +02:00
Valentin Vallaeys (vava) 77daee9178 [IMP] sale: add a cancel button for discount pop-up
When applying a discount to the first SO line, a pop-up appears asking
if the user wants to apply it on every line of the SO.
This commit adds a cancel button for a better UX.

task-3300071

closes odoo/odoo#121053

Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-05-11 18:25:23 +02:00
Om Rabara b4a2479033 [FIX] web: file uploading state after failed upload
when file uploading is failed that time file uploading state does not change.

sentry - 3957419658

closes odoo/odoo#120818

X-original-commit: https://github.com/odoo/odoo/commit/1493ec2fedf7070882f3497f214f39c862432a2b
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-11 18:25:20 +02:00
Om Rabara f42f5324fd [FIX] spreadsheet: check valid json data file while uploading
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
This error occurs when we try to upload an invalid json data file.

sentry- 3957419658

X-original-commit: https://github.com/odoo/odoo/commit/1a60a19a1c001c12cf933dd8c82332167b609038
Part-of: odoo/odoo#120818
2023-05-11 18:25:20 +02:00
Odoo c6af10ff34 [FIX] web_editor: deleteing content from a link throws traceback
Before this commit:

When a new link a created on a new sentence, and clicked on it opens a popover,
when your start hitting backspace then as your reach the extreme left it throws
a trace-back error.

After this commit:

Trace-back error is not thrown while deleting backward it does not throw
back.

closes odoo/odoo#120578

Task-id: 3252709
X-original-commit: 843d1be63140b8cdb00e3f18c67ad7803d998a21
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-05-11 18:25:17 +02:00
anhe-odoo bb9bedc707 [IMP] spreadsheet: add icons for "see records" and "set as filter" action
Task Description

This PR aims to add two new icons in the context menu of the spreadsheet, for
the see records/see properties and the set as filter actions

closes odoo/odoo#120543

Related: odoo/enterprise#40713
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-05-11 18:25:14 +02:00
qsm-odoo 46b271ac9e [FIX] website: set proper async value for google tag manager script
W3C validation does not like async="1", there is not supposed to have
any value for this boolean attribute. "async" as value should be
accepted as a value is needed in this XML definition.

closes odoo/odoo#120311

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-05-11 18:25:08 +02:00
qsm-odoo 755e0a47b5 [FIX] website: remove spaces in tel: default links
Website default templates contain phone number links using the `tel:`
syntax as "href". That syntax is not allowed to contain spaces (even
if it works, W3C validator does not like it).

This commit focuses on fixing the default values in default templates.
Extra work should be done to prevent user entered numbers to be used as
`tel:` without removing the spaces (either via backend fields or via
the website builder).

Part-of: odoo/odoo#120311
2023-05-11 18:25:08 +02:00