Commit Graph
153725 Commits
Author SHA1 Message Date
qsm-odoo a7592986b7 [REF] website: remove useless proxys to reach page manager act_window
A model method was initially introduced at [1] to return an URL action
reaching the frontend page manager. Following [2] as part of the
"website in backend" merge, a second python method was created to
basically do the same and the first one was also adapted to reach the
backend page manager view.

In fact, both those methods can be removed and replaced by XML-defined
actions that can be triggered via the right XML definitions in views.

[1]: https://github.com/odoo/odoo/commit/553e24ccd191f7aaa13b70242703003e71a91b2b
[2]: https://github.com/odoo/odoo/commit/0db19449d00aab20c35218ab8108e731717cb0fe

task-2889981

Part-of: odoo/odoo#98937
2022-09-05 05:21:04 +02:00
qsm-odoo 91adbacc23 [MOV] website: move "page" list view files
task-2889981

Part-of: odoo/odoo#98937
2022-09-05 05:21:04 +02:00
Soukéina Bojabza cc406afcea [IMP] web_editor, website: add a grid layout
This commit adds the possibility to use a grid to move and resize
columns inside some building blocks.

More precisely, for the majority of the building blocks having columns,
it is now possible to toggle between the current layout (= normal mode)
and the grid layout (= grid mode). The grid mode can be triggered in
two ways:
	- by using the "Grid" button in the options (when available),
	- by dragging a column using the move handle.

The toggle places the different columns in the grid as close as
possible as how they were placed in normal mode.

The normal mode is toggled back by clicking on the "Cols" button (when
available).
Since the move handle is now used to trigger the grid mode, the columns
in normal mode are now moved using the arrows.

NB: to avoid any confusion with the word 'column' in the explanation
below, the BS column will be called 'grid item' and the grid column
will be 'column'.

When in grid mode, the building block is a grid with 12 columns and a
number of rows which depends on the height of the grid items.
This mode offers the following functionalities:

- Moving a grid item:
When a grid item is dragged, it can be placed anywhere in the grid. If
it is dragged towards the bottom, new rows are added in the grid to
increase its height and to place the grid item lower. These added rows
are removed when it is dragged towards the top.

A grid item can also be placed over an other item (-> they can overlap)
and their order can be changed using the two new buttons to place an
item in front of/behind all the others.

A grid item can be moved from a grid to another, and also from a grid
to a building block in normal mode.

- Resizing a grid item:
A grid item can be resized vertically, horizontally and diagonally with
the help of the grid. When resized towards the bottom, new rows are
added in the grid and they are removed if it is towards the top (like
with the drag and drop).

- Adding elements:
The "Add Elements" option allows the user to add as many images, text
blocks or buttons as wanted in the grid.

Inner contents can still be dragged and dropped inside a grid item.

- Changing the padding of the grid items:
The padding option allows to change the vertical/horizontal padding of
all the grid items at the same time.

- Mobile view:
When in mobile view, the grid items are not in a grid anymore (the
display is back to flex) but they keep their grid properties. They
cannot be resized, nor dragged and dropped but they can be moved using
the arrows. By moving this way, it does not impact the desktop view.

task-2825241

closes odoo/odoo#93144

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-04 19:25:43 +02:00
Soukéina Bojabzaandqsm-odoo ca215a5bdf [IMP] web_editor: update UI when clicking on mobile preview
Now trigger an UI update for all the options when clicking on the mobile
preview button. This is at least important for the next commit in this
PR to update the visibility of the different overlay elements as some
will be shown in desktop and some other on mobile.

task-2825241

Part-of: odoo/odoo#93144
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-09-04 19:25:43 +02:00
Soukéina Bojabza 815d1f775c [IMP] web_editor: add support for CSS variables to selectStyle
When adding an option, using data-select-style with a CSS variable in
data-css-property does not work. This commit adds the support for the
use of these variables.

task-2825241

Part-of: odoo/odoo#93144
2022-09-04 19:25:42 +02:00
Guillaume (gdi)andqsm-odoo c2f394253e [IMP] website, *: improve the "edit in backend" button
*: base, mrp_account, product, mail, website_blog, website_event,
   website_forum

This commit improves the button that allows to go to the backend view of
an object when you are on its corresponding page on the website. The
button is more visible and the user can see which object he is going to
edit. Note that this commit also:

- Changes the access key to translate a website page to ALT + T.

- Adds a new access key to edit an object in backend with ALT + E.

- Removes the possibility to duplicate a blog post (but this feature
will be reintroduced later for all models, generically) **.

**: Note that the duplication of blog posts actually had a mistake:

The controller to create a new blog post has been added with [1] where
it has been decided to not be a follower of the blog posts at their
creation. A new controller has been added by [2] to be able to duplicate
a blog post, to be consistent with [1], here also the user does not
become a follower of the new blog post (the copy). So far, so good.
Finally, [3] has changed the blog post creation controller so that the
user who creates the blog post is a follower of the new blog post.
Unfortunately the same change was not made for the duplicate controller,
which is a mistake. There is no reason to be a follower of the newly
created blog posts when you go through the add blog post controller but
not when you go through the duplication controller. The behaviors should
be consistent and there is no reason for there to be a difference.

[1]: https://github.com/odoo/odoo/commit/4c3b516a7b988d758a67ff19242e8ed0837d756c
[2]: https://github.com/odoo/odoo/commit/fe40538aff2b65f7719840c8e2d6e51e858f560f
[3]: https://github.com/odoo/odoo/commit/4bf9dc4078a5ca413539a6fd16400fd5aad46907

task-2889929

closes odoo/odoo#97353

Related: odoo/enterprise#30075
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-09-04 18:29:37 +02:00
roen-odoo 14408d6af5 [FIX] website_sale_delivery: fix unstable tour
This PR adds some trigger to make sure that all python request
is correctly finished. This is needed because an unfinished python request
makes a traceback appears on runbot.

opw-28835921

closes odoo/odoo#99475

X-original-commit: 7a98b59b36e9e2cf1816b73ebc3be5de58e054c2
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-04 15:37:49 +02:00
xO-Tx d4cc66793e [IMP] website, *: restore course layout preview
*: website_slides

After [1], the website "new content" dialogs were replaced by formView
dialogs of targeted content (blog, slides, product,...).

The goal of this commit is to restore the "course layout image preview"
on the "New Course" dialog for the "channel_type" field (as on the old
frontend dialog).

Remarks:

- The field was added on 'website' module so it can be used on other
website related modules if needed.
- Some CSS related to the old form was removed in this commit too.

Follows the merge of the "website in backend" task at [1].

[1]: 31cc10b91d

task-2687506

closes odoo/odoo#96346

Related: odoo/enterprise#29922
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-04 14:39:45 +02:00
xO-Tx d7a5a06c68 [REF] website, *: use OWL views for new content
*: website_blog, website_event, website_forum, website_livechat,
website_sale, website_sale_slides, website_slides, website_slides_forum

The goal of this commit is to adapt the website "new content" form
views to OWL.

Follows the merge of the "website in backend" task at [1].

[1]: 31cc10b91d

task-2687506

Part-of: odoo/odoo#96346
2022-09-04 14:39:44 +02:00
Benjamin Vray 8d49241836 [IMP] website, web_editor: add an "on scroll" option for animations
This commit adds an "on scroll" option for animations. In addition to
being triggered when they appear in the viewport, animations can now
also be triggered based on page scroll.

Animations are also improved in this commit, we add "intensity" option
and the dropdown with the list of animations has been split by adding a
new dropdown to choose the "direction" of the animations.

task-2862761

closes odoo/odoo#94119

Related: odoo/upgrade#3858
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-09-04 12:34:01 +02:00
Benjamin Vray dc8dac57d5 [IMP] web_editor: add a display value option on the we-range widget
This commit adds an option on the we-range widget to display the set
value right next to it.

task-2862761

Part-of: odoo/odoo#94119
2022-09-04 12:34:00 +02:00
Benjamin Vray 913a40796f [FIX] website: fix the triggering of animations
Before this commit, the height of the element to be animated was
calculated without the padding of the element. That was wrong as the
padding needs to be considered part of the element.

task-2862761

Part-of: odoo/odoo#94119
2022-09-04 12:34:00 +02:00
Nasreddin Boulif (bon) d07209872d [FIX] purchase: Update price unit on new line even if confirmed RFQ
Steps to reproduce:

  - Install purchase
  - Go to Settings and activate `Variant Grid Entry`
  - Create a new Requests for Quotation
  - Add a customer and add a product that has a variant min 2 variant
  - Wizard should ask for the variant
  - Select 1 variant by increasing quantity in the grid and confirm
  - Confirm order
  - Add again a product variant with the wizard

Issue:

  Price unit is not set on the new line.

Cause:

  In `_onchange_quantity` (triggered by the purchase_product_matrix
  module), we do not update price unit if order line
  is in state `purchase` or `done`.

Solution:

  Replace condition to not perform `_onchange_quantity` if order line
  has an invoice line.

opw-2956755

closes odoo/odoo#99522

X-original-commit: 8f92146b2d4996be724213345567291f045aad85
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-09-04 02:57:57 +02:00
Nasreddin Boulif (bon) 2fa457fb83 [FIX] pos_sale: display weight for product product in sales report
Steps to reproduce:

  - Install pos_sale module
  - Create a product and set it as available in POS
  - Create 2 variants and set a weight for each variant
  - Open a POS session and make an order with one of the variants
  - Go to the Sales -> Reporting -> Sales and select view pivot
  - Set Gross Weight as measure

Issue:

  Weight for ordered variant is set to 0.

Cause:

  Sales Analysis is an SQL view and it use product template in instead
  of product product to get the weight value.

opw-2956457

closes odoo/odoo#99518

X-original-commit: 3a2f845375400623e4cabba57e66373abe9d0b85
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-09-03 18:26:46 +02:00
Martin Trigaux 4224566a61 [I18N] hr_contract: export source terms
Avoid duplicated entry

closes odoo/odoo#99516

X-original-commit: 47f4f036202e778bc181d6dbf8609b658f4a53b8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-03 08:13:38 +02:00
Pierre Paridans 5e7d17a126 [FIX] web: tests/views/helpers.js should be in test_assets bundle
Before this commit, the `/web/static/tests/views/helpers.js` was only
imported in the "desktop" qunit test suite but unavalaible for the
mobile one.

This commit adds it in the `web.test_assets` bundle to be available in
all tests suites.

closes odoo/odoo#99498

X-original-commit: 2875f43da28d01f837c1ee53f8cadd21e169b612
Related: odoo/enterprise#31029
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-09-02 23:16:41 +02:00
Xavier BOL (xbo) 6447bb3a46 [REF] web: refactor BooleanToggleField to inherit to BooleanField
Before this commit, `BooleanToggleField` and `BooleanField` are 2
distincts components. However, they are some attributes in common.
Also, there is an inconsistency between the both components, in the
boolean field, a `onChange` method is defined but not in the other one.

This commit changes the `BooleanToggleField`, this one will inherit to
`BooleanField` to have the attributes in common and override the ones
which are different. Also, the `onChange` method will exist in the
both components.

closes odoo/odoo#99492

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-02 23:16:35 +02:00
Romeo Fragomeli 07eeb5ffae [FIX] web: restore old color of list view title
Before in BS4, the table used the `$table-head-color` SCSS variable to
color the header of table. This variable doesn't exist anymore on BS5.
In the commit of the BS5's merge, we have replaced the old value by
a value calculated with the color contrast in the case of the list view
it wasn't the right fix, so in this commit we restore the original value
like it was before the merge of BS5.

Note:
In BS4 branch the result is `#212529`:
```scss
$o-gray-900: #212529 !default;
$o-main-headings-color: $o-gray-900 !default;
$table-head-color: $o-main-headings-color !default;
.o_list_view .o_list_table thead {
  color: $table-head-color;
}
```
In BS5 branch the result is `#00000`:
```scss
.o_list_view .o_list_table thead {
  color: color-contrast(opaque($body-bg, $light));
}
```

closes odoo/odoo#99488

Related: odoo/enterprise#31026
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-02 23:16:28 +02:00
oco-odoo d33aca38c3 [FIX] account: fix template consistency check
plus_report_line_ids and minus_report_line_ids have now been replaced by plus_report_expression_ids and minus_report_expression_ids on tax templates.

The test was failing locally but not on runbot, because it was missing the post_install tag.

closes odoo/odoo#99462

Signed-off-by: Laurent Smet <las@odoo.com>
2022-09-02 23:16:20 +02:00
Mathieu Duckerts-Antoine 5c4a54022b [FIX] web: rpc: not parsable request response
Connect in your browser to a db on runbot with mail installed and wait
until the runbot put to sleep the db. After a while, a new request to
get im_status will be sent and nginx responds to it with an error 404
and an invalid JSON response. A traceback with a particularly bad
message is then shown. Here we improve the traceback message.

closes odoo/odoo#99430

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-02 23:16:16 +02:00
Rémy Voet (ryv) d982c4f319 [IMP] core: save one query when reading one2many on a single record
For reading one2many fields, we make 2 queries (in batch):
- One to search "id" the comodel
- One to read <inverse_field> in the comodel to group lines by record
(sometimes, this one is bypass because the cache already contains the information).

In many cases (> 80% of cases in our tests) we read a one2many field on
a single record.  In that case, we can avoid the second query completely
(grouping all lines on a single record is trivial).

This reduces SQL queries by about 0.8% on all-install runbot builds.

closes odoo/odoo#99415

Signed-off-by: Rémy Voet <ryv@odoo.com>
2022-09-02 23:16:13 +02:00
Rémy Voet (ryv) dfa34aa3fe [IMP] core: reduce cost of modified.
For non-stored computed fields, `_modified_triggers` will traverse the
tree (at the cost of extra queries) only to know which record to
invalidate in cache. But in most cases, these fields have no data in
cache, so they can be ignored from the start, which allows us to prune
entire subtrees from the merged tree.

By example:
With simple write on `show_operations` of one `stock.picking.type`, the
`_modified_triggers` will fetch every ids (from database) of `stock.picking`
and `stock.move` related to this `stock.picking.type`
(For `stock.move`, it is because of the
`show_operations = fields.Boolean(related='picking_id.picking_type_id.show_operations'`))
In that case, there isn't any data of `show_operations` (`stock.move`)
in cache, then there are nothing to invalidate and
the `_modified_triggers` cost
is high (extra queries/processing) for nothing.

Then we cut parts of the tree when we know that
they won't invalidate anything (=> if the cache is empty for the field).
Also refactor the way to merge trees to be more efficient.

Performance improvements:
- For all tests at-install done by the runbot, we gain -+ 3.5% of
queries.
- In the example above, we reduce the number of queries (potentially
bottleneck queries in large DB) from 7 to 4.
- In term of CPU (without counting time in SQL), the new version is -+
20 % faster (on install of stock,purchase,mrp and with
--test-tags=/stock,/purchase).

closes odoo/odoo#76322
task-2780812

closes odoo/odoo#99274

Related: odoo/enterprise#30951
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-09-02 23:16:06 +02:00
Rémy Voet (ryv) 54d75a28cd [IMP] test_new_api: add performance test for modified.
Part-of: odoo/odoo#99274
2022-09-02 23:16:06 +02:00
Samuel Degueldre 52ef83e006 [REF] sale_product_configurator, *: remove product configurator wizard
*: sale, sale_product_matrix, test_sale_product_configurators,
website_sale_product_configurator

Previously, the product configurator used a transient model and a
corresponding wizard to configure products. In subsequent refactorings,
the product configurator was merged with the optional product modal, and
because this feature also needs to work in the eCommerce, all the
features are available in the modal which doesn't directly depend on the
form view.

Since the modal is capable of doing everything on its own, the form view
and its corresponding transient model are no longer necessary, the m2o
widget can just open the modal directly instead. The only thing that was
missing from the modal was the ability to selectively display the
optional products depending on the configurator mode (we don't want to
show optional products when we're configuring an existing product).

This commit refactors the product_configurator_widget so that it can
open the product_configurator_modal directly without the need for an
intermediate form view, and removes said form view and the corresponding
transient model.

Tours and tests have been adapted to have their selectors always match
the modal.

closes odoo/odoo#99219

Related: odoo/upgrade#3844
Related: odoo/enterprise#30860
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-02 23:16:00 +02:00
Victor Feyens aa9dcc2bce [REF] sale,*: invoicing wizard
1) Invoicing wizard refactoring

* reduce the use of context in the business logic,
  store the orders being invoiced
* factorize invoice creation values, using the correct method from
  the sale.order model
* switch from default fields to computed fields, and avoid computing
  unnecessary fields when the wizard is opened to invoice multiple
  orders together (most fields are only used for down payments)
* Rely on python constraints instead of error messages scattered
  accross business methods to notify the user that the invoice cannot be
  created.
* Clean the code to make it easier to follow, understand and maintain

2) Distinguish Down Payment Invoice lines from standard ones

(with a dedicated field)

Allows to stop relying on the dumb property,
not specifically reliable, e.g. if the down payment product is modified
in the settings after down payments orders were already created.

closes odoo/odoo#98600

Related: odoo/enterprise#30653
Related: odoo/upgrade#3799
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-02 23:15:44 +02:00
Victor Feyens a680441dda [REF] sale: split _find_mail_template
Despite recent improvements, the method is still quite confusing,
especially with the 'force_confirmation_template' parameter.
Splitting this parameter logic in a split method giving only the
confirmation template when needed.

Part-of: odoo/odoo#98600
2022-09-02 23:15:44 +02:00
William Braeckman 87e7f30abc [IMP] website_sale_loyalty: make it possible to remove an auto reward
Prior to this commit there was no way of removing an automatically
claimed reward from a website order, since it would always get claimed
right after the update to the cart.

TaskId-2951413

closes odoo/odoo#99023

Related: odoo/enterprise#30794
Related: odoo/upgrade#3820
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-02 20:10:59 +02:00
eres-odooandWilliam Braeckman 6927dcda9f [IMP] loyalty*: misc loyalty improvements
This commit improves some messages and usability for loyalty and its
submodules:
 - Coupons should not be restricted to the partner assigned to them
   anymore
 - Merged "I have a promo code" and "Use a gift card" into a single
   toggle
 - Boolean fields have been added to each app to disable them where we
   don't want them.
 - Reduced the size of coupon codes
   This means that we increase the risk of collision which should be
   handled by the model as well now.
   Creating a coupon with an existing code will retry the creation (up
   to 10 times) until the coupon is indeed created.
 - Make it clearer in the coupon generation wizard that an email will be
   sent to the customer.
 - Reintroduce coupon/gift card details on sale order lines in eCommerce
   which was wrongfully removed.
 - Remove the "on product with taxes: " message on order lines when
   the amount is not split between taxes or if the tax message would be
   empty.
 - Make it possible for some error messages to be displayed as warning
   instead of errors
 - Split program types in two menuitems, one for promotions discount
   loyalty etc and one for gift cards and ewallet, the latter has
   simplified views.
 - Views overall have been reviewed to make it easier to understand how
   to programs work. New program types have also been added.

TaskId-2951413

Part-of: odoo/odoo#99023
Co-authored-by: William Braeckman <wbr@odoo.com>
2022-09-02 20:10:59 +02:00
Simon Genin (ges) feef532b41 [REF] web, stock: refactor report client code
This commit converts the report code to the new framework.

Since the module stock still has code that extends the old
"ReportClientAction", the old report code is put inside this module.
It can be then naturally removed once the module is fully converted.

closes odoo/odoo#97390

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-02 20:10:53 +02:00
Louis Wicket (wil) 10950d549d [IMP] mail: add support for inline definition of sort and compute
This commit allows compute and sort functions to be declared within a
field definition instead of providing a string with the name of the
record method to be used to compute/sort the field value.

Example of code with compute inline:
```javascript
registerModel({
    fields: {
        thread: one('Thread', {
            compute() {
                return {
                    id: this.id,
                    model: 'mail'.thread',
                };
            },
        }),
    },
});
```

Example of code WITHOUT:
```javascript
registerModel({
    recordMethods: {
        _computeThread() {
            return {
                id: this.id,
                model: 'mail.channel',
            };
        },
    },
    fields: {
        thread: one('Thread, {
            compute: '_computeThread',
        }),
    },
});
```

The aim of these changes is to empower a better separation of concerns,
by allowing to group together in one place the data related to a field.

Note that for technical reason (`Function.prototype.call` not working as
expected with arrow functions), compute/sort functions should not be
arrow functions.

closes odoo/odoo#99424

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-02 19:14:04 +02:00
sash-odoo 5bfcead619 [FIX] project: fix the field 'recurrent' visbility in form view
Before this commit, the 'recurrent' field still be visible even if the
'recurring tasks' feature is disabled in the settings.

So in this commit, fixes the issue by adding the recurrent group and
updating the attrs on field.

task-2858336

closes odoo/odoo#99392

X-original-commit: f83451b9ba86fd919184fc78093535625c0459ef
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-02 19:13:57 +02:00
Nasreddin Boulif (bon) cb789579d2 [FIX] website[_sale]: add company to domain of snippet filters
Steps to reproduce:

  - Install website_sale module
  - Create a new company X
  - Create a new product Y and set company to X
  - Create a website Z and ensure it's linked to a company but NOT X
  - Go to website Z homepage and edit it
  - Add a `Products` block then save
    (should be by default on filter `Newest`)
  - Select product Y in the block

Issue:

  The product should not be displayed and when clicking on it, we have
  an access right error.

Cause:

  Not taking into account the company of the website when preparing
  values to render in the snippet therefore the product is displayed
  while it should not.

Solution:

  Update `_prepare_values` to add the website company to the domain if
  the filter's model has a company_id field.
  Same issue occure with latest_sold filter (for ex.) so must
  apply same fix to `_get_products` for filters that use a server action.

opw-2956186

closes odoo/odoo#99181

X-original-commit: dab7fed0c396d3dd6e2e2ad8560c706d5c2e89fb
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-09-02 19:13:53 +02:00
Nasreddin Boulif (bon) 156e2f1fc3 [FIX] website: get right access token for public visitor user
Current Behavior:

When we get the access token for a website visitor, we check if the
`self.env.user` is a public user. If it is, we return his id.

Expected behavior:

We should check the `request.env.user` instead since the visitor can
only be created through the frontend.

opw-2956186

Part-of: odoo/odoo#99181
2022-09-02 19:13:53 +02:00
Didier (did) c89853c219 [IMP] mail: move command code out of postMessage
closes odoo/odoo#99489

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-02 17:46:17 +02:00
Zelong Lin 0c3961008e [FIX] mail: guard message view
add guard on onMouseenter/onMouseleave

task-2901855

closes odoo/odoo#99477

X-original-commit: 7ce86d6c90062c9f8eef0ba7337d773e6a79f5ec
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-02 17:46:02 +02:00
Pierre Paridans 8546efe940 [FIX] web: searchbar vertical alignment on mobile
On non-legacy views (like Pivot) the vertical alignement of the
searchbar wasn't properly centered. Also there wasn't enough spacing
between the actual search input and the bottom line.

This commit fixes it by certically center it and normalize the bottom
padding accross legacy/non-legacy and mobile/desktop.

closes odoo/odoo#99476

X-original-commit: cdee502c05cfacdefd2e656001c6f9ae7d3146af
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-09-02 17:45:58 +02:00
clesgow ddfbfddf3c [FIX] purchase_stock: Fix receipt auto-batch
When using the auto-batch feature for receipt, when creating a purchase,
it wouldn't batch pickings that matched the group-by conditions.

The issue is that the _create_picking() called when validating a
Purchase Order creates the picking, then creates its moves and then
validates them. Doing it this way avoids the trigger for the auto-batch
feature located in picking's action_confirm().

By calling action_confirm() on the created picking, we force the trigger
of the auto-batch, while not confirming the moves a second time since
their state isn't 'draft' anymore.

opw-2961618

closes odoo/odoo#99466

X-original-commit: 7d091ba995d13fa8f692827b33aad0982c2a65fa
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2022-09-02 15:28:05 +02:00
mafo-odoo 4e6e3e6261 [FIX] hr_holidays: no date_from creates error
Probem:
With some time off type as default type in an allocation request
you get a traceback as soon as you try to open the allocation
request form.

Cause:
FIX commit [1] introduced the issue as it didn't consider the
possibility of a false date_from

Improvement 1:
Having a date_from False sets a False in the leave request name
displayed on the form, we change that to have an empty string
instead

Improvement 2:
The timezone bug fix in commit [1] is only applied on a specific
configuration, we applie it to all configuration of leave request
name

[1] 5a50dea2652cff014d9198f59265cf36a3ec1865

opw-2961344

closes odoo/odoo#99454

X-original-commit: 3b9a012e4a0839bc5da2daf51d56591d2863b4be
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
2022-09-02 15:27:59 +02:00
Demesmaeker 83d6ba6e0d [FIX] sale: fallback on the product uom
`_compute_discount` from subscription add dependencies that triggered
the compute before the `product_uom` was set in a sale order line, once
the uom is set, the `_compute_discount` will be triggered again.

task-2960768

closes odoo/odoo#98780

Related: odoo/enterprise#30721
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-02 15:27:53 +02:00
Odoo's Mergebot 216b1a1b2f [IMP] mrp: back to basics 7 ngtr
A series of 7 UI improvement or small implementations:
- Match qty field in Work Order kanban view
- UI Fix for Lot/serial column in MO form view
- Improve UI of Manual Consumption field on BOM
- UI Improvement of review split window field rearrangement
- Add setup/cleanup time to Work Center Specific Capacities
- Allow multi-edit Work Order

task-2925474

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#97588

Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-09-02 14:18:00 +02:00
Triet Ngo aa14a8027c [IMP] mrp: Allow multi-edit workorder
This commit allows users to multi/mass-edit the Work Order fields

task-2925474

Part-of: odoo/odoo#97588
2022-09-02 14:17:59 +02:00
Triet Ngo d494f5988a [IMP] mrp: Add setup/cleanup time to Workcenter Specific Capacities
- Add columns setup/cleanup time to Specific Capatities of Workcenter
- Take into account these 2 fields when compute expected duration in WO

task-2925474

Part-of: odoo/odoo#97588
2022-09-02 14:17:59 +02:00
Triet Ngo a968404a84 [IMP] mrp: UI Improvement of review split window field rearrangement
rearrange the fields of the tree from
Quantity, User, Date to Date, User, Quantity

task_id: 2925474

Part-of: odoo/odoo#97588
2022-09-02 14:17:59 +02:00
Triet Ngo e2d4586ac7 [IMP] mrp: Improve UI of Manual Consumption field on BOM
Auto mark manual_consumption as True as soon as the component is use in
an operation and make the field read-only

task-2925474

Part-of: odoo/odoo#97588
2022-09-02 14:17:58 +02:00
Triet Ngo dae82e7aae [IMP] mrp: UI Fix for Lot/serial column in MO form view
The commit modifies the following:
- add tooltip : 'Displays the consumed Lot/Serial Numbers consumed.'
- Change the column Serial Numbers to also display lot number
- Make the column read-only

task-2925474

Part-of: odoo/odoo#97588
2022-09-02 14:17:58 +02:00
Triet Ngo 562e01eb28 [IMP] mrp: Match qty field in Work Order kanban view
Currently, the kanban view show qty_production. However, the Listview
show the qty_remaining. So this commit match the field for 2 views (both
should show qty_remaining)

task-2925474

Part-of: odoo/odoo#97588
2022-09-02 14:17:58 +02:00
Triet Ngo 5f684778f4 [IMP] mrp: Add color to warning multi-lot mass produce
When mass producing from several reserved lots, we display a warning
message that the lot reservation is 'multiple'. This commit displays
that message in red.

task-2925474

Part-of: odoo/odoo#97588
2022-09-02 14:17:58 +02:00
Nikunj Ladava 7c66ed560d [IMP] portal_rating, {website_slides}_forum: miscellaneous improvements
PURPOSE

Added some light wording improvements to various screens.

SPECIFICATION

- There was a strange flicker of 'Add a review' and 'Write a review
  while loading the course player because we have different strings
  in XML and js due to which while loading it appears like flickering
  of 'Add a review' and 'Modify Your Review' so, we modified the string
  to 'Review' and also moved the share button from left to right to improve
  the view.
- This commit will rename the 'New Post' button to 'Forum' and add
  tooltip 'Forum' to it.

task- 2627364

closes odoo/odoo#78139

Related: odoo/upgrade#3444
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-09-02 14:17:40 +02:00
Nikunj Ladava 7d66dcbf54 [IMP] website_slides: improve design of share pages in elearning
PURPOSE

Globally improve user experience when sharing content from the e-learning app.
This includes new sharing options, allowing to share to multiple emails, split
the sharing template from slide and course, etc...

SPECIFICATION

- added two more options 'WhatsApp' and 'Pinterest' to share snippets.
- we converted the email type of input for 'Share by email' to text,
  so we can enter multiple emails to share and also add validation
  in the controller for this input text input.
- We improved the design of the share modal by making sure that the full URL
  for sharing link is visible and rearranged the UI fields of
  'Share' nav-tab on non-fullscreen content (if there is
  embed code, the sharing by email and embed code will still be on
  the single row).
- Improved the share modal of the channel by adding an email field in it to
  Share the channel through the mail.
- New field name 'share_channel_template_id' for channel template
  in 'slide.channel' modal and also added _send_share_email method
  in it and email template for sharing channel through the mail, and
  also added the dedicated route for sharing the channel.
- New share button is added on the top of documents in the slide (which
  previously was in the tab below the content).

task- 2627364

Part-of: odoo/odoo#78139
2022-09-02 14:17:40 +02:00
Thanh Dodeur 291e99b7f7 [FIX] mail: prevents traceback when downloading rtc call logs
Before this commit, since https://github.com/odoo/odoo/pull/96954 ,
the `CallActionListView` had its `channel` field renamed into `thread`.

A reference to this old field name was missed which caused the
traceback, this commit fixes this issue by using the right field name.

closes odoo/odoo#99447

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-02 12:21:41 +02:00