Commit Graph
166257 Commits
Author SHA1 Message Date
“moda” 88ae41db5c [IMP] sale: adapt override of ProductAttributeCustomValue in sale
The problem is that a mandatory field from the sale module has been
added to the ProductAttributeCustomValue template, but in point of sale
we also use this model without necessarily filling this field.

Previously, the sale module was the only module to use the
ProductAttributeCustomValue model (product.attribute.custom.value).
In the override, a field set to mandatory has been added
"sale_order_line_id", a relationship between the sale.order.line model
and product.attribute.custom.value.

We now remove the mandatory parameter from this field so that we can
create new data without getting an error indicating that a mandatory
field is missing. This has no impact on the operation of the Sale module
as this field will be populated anyway, since the only way to create a
record of this type is via a sale_order_line or a pos_order_line.

Part-of: odoo/odoo#138013
2023-10-16 09:21:16 +00:00
“moda” fde60bf967 [IMP] pos_self_order,pos_online_payment_self_order: improve success page
Before, when ordering on the kiosk/mobile, no confirmation page was
displayed, only a notification.

Now, a confirmation page displays the tracking number, the amount paid
and, if present, the customer's table...

Part-of: odoo/odoo#138013
2023-10-16 09:21:16 +00:00
Yan Victor 9f7128dd32 [IMP] l10n_de: add delivery date on invoice
Delivery dates on invoices are a legal requirement on germany. It needs to be
displayed on the header of the form view and will be displayed on the printed
invoices.

closes odoo/odoo#127168

Task-id: 3383318
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
2023-10-16 09:21:11 +00:00
Mahamadasif Ansari 62957f700b [REM] pos_self_order: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Ref-https://github.com/odoo/odoo/pull/130467

task-3508331

closes odoo/odoo#138731

Related: odoo/enterprise#48964
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-16 07:58:49 +00:00
Adrien Widart (awt) e52d8f6648 [FIX] stock: update picking type sequences
Suppose a picking type in company C1 that uses a sequence in company
C2. If a user then tries to install mrp/pos, it will lead to a
Server Error because at some point, we write on the picking type:
https://github.com/odoo/odoo/blob/c02df957d9f04c911f330aaaadd80fe97a601509/addons/stock/models/stock_warehouse.py#L332
It will trigger the company checking and lead to the error
https://github.com/odoo/odoo/blob/a32c98beb5d57c3af481558c6db08767e9258959/odoo/models.py#L3548

When updating the picking types, we should also update the sequences
to ensure the data consistency.

OPW-3501199

closes odoo/odoo#138710

X-original-commit: 2ad97c6aeda86e4fed7573fb395b25adae935610
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-10-16 07:58:47 +00:00
Pedram (PEBR) 029a3c85df [FIX] pos_loyalty: ensure reduce returns accumulator for 0 price lines
Ensured that the reduce function returns the accumulator even when
encountering 0 price lines. This prevents the function from breaking
on subsequent iterations due to receiving 'undefined' instead of the
expected array.

opw-3528223

closes odoo/odoo#138702

X-original-commit: ab2ed83f05d93732b0f6879ab3ca3df86213f6a2
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-10-16 07:58:46 +00:00
pedrambiria ec25a56c26 [FIX] google_calendar: get RRULE when recurrence contains more items
Before this commit: we assumed an event's recurrence only contains
RRULE, and we were getting the RRULE from the first element in the
list. But it could have EXRULE, RDATE, and EXDATE, so in this case,
the first element could be other items.

The solution is to iterate through all items and return the RRULE.

opw-2797968

closes odoo/odoo#138697

X-original-commit: f2a20457b352026c2dfb50f6a4d48d47211708f9
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-10-16 07:58:45 +00:00
Adrien Widart (awt) 838718cc76 [FIX] stock_picking_batch: remove done picking
With the option "Reception Report" enabled, a batch may contains
done and ready pickings, which is inconsistent

To reproduce the issue:
1. In Settings, enable Reception Report
2. Operations Types, edit Receipts:
   - Show Reception Report: True
   - Automatic Batches: True
   - Group by: Contact
3. Create two products P1, P2
4. Confirm a delivery with P1
5. Confirm two receipts, one for each product, both with partner P
   - It should create a batch
6. Partially process the receipt with P1, with backorder
   - It should open the reception report because of the delivery
7. Open the batch

Error: The first receipt is done but is still part of the batch and
the backorder is not attached to it. Worst: if the user now tries to
confirm a third receipt with the same partner, he will got an error
because of an inconsistency with the batch

[1] is incorrect. The code assumes that if `res` is not `True`, there
was an issue with the picking, so it's better to immediately return
`res` without analyzing the batch. However, sometimes `res` can be a
`dict` even when the picking has been processed correctly. This is the
case here: the receipt is marked as done, but we return an action to
open the reception report.

As a result, in the above case, we directly return the report action,
and we don't analyze the batch consistency (i.e., we don't remove
the done receipt and add the backorder). Then, because of the batch
inconsistency, the user is blocked and can not validate another
receipt.

[1] 0c7122d416a3669d1d42f66bef5b397e8b36a91b

OPW-3346255

closes odoo/odoo#138690

X-original-commit: d92c5a594e57cb2574bcf87ab398919c07c9a738
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-10-16 07:58:44 +00:00
tsm-odoo 427074c03a [IMP] im_livechat, website_livechat: improve live chat bundles
This commit improves the live chat bundles:
- `core`
	- `common`: hold files that are common to every feature
	- `web`
- `standalone`: hold files for the embed live chat and is splitted
in 4 sub-bundles:
	- `common`
	- `frontend`: should only be added in the Odoo frontend.
	- `external`: should only be added outside of Odoo
	environment (e.g. support page).
	- `cors`: should only be added when the live chat
	is requested from a different origin.

This will make live chat folder structure closer than the one used
in mail and avoid code duplication.

task-3537697

closes odoo/odoo#138536

Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-16 07:58:43 +00:00
Chong Wang (cwg) fc587dc61b [FIX] auth_totp_mail
1. sudo permission for _totp_check
env.user is still public user which doesn't have access rights for self.login
in Odoo 15 it was not a problem since self.login was in cache
but in Odoo 16 it is not and as a result, returns an access error

2. format_timedelta
the lang was used for `granularity` as the second argument not for `locale`

closes odoo/odoo#138532

X-original-commit: d439fae7a27874ceeaab99cc4db5d28fcbe587c2
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Chong Wang (cwg) <cwg@odoo.com>
2023-10-16 07:58:42 +00:00
momegahed 3044b67372 [FIX] l10n_br: CPF is accepted as tax number
Steps to reproduce:
1. install l10n_br and set up a Brazilian company with Brazilian
customers
2. go to validate a sale as a Brazilian customer
3. fill in the CPF field w/ 11 digit number
4. error: "invalid CNPJ. Make sure that the CNPJ number is 14 digits"

Issue:
the code only accepts and validates CNPJ codes

Fix:
add support for CPF codes with its validation function according to:
http://www.receita.fazenda.gov.br/aplicacoes/atcta/cpf/funcoes.js

opw-3421476

closes odoo/odoo#137438

X-original-commit: 23a0ca6386590b6dfdbe24602a1a717bfdd84965
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
2023-10-16 07:58:41 +00:00
Aman Patel d382b20135 [IMP] project: disable /image for portal user
Steps:
- Install project.
- Create a project and it's task.
- Share this project to portal user with editable rights.
- Open that project from portal user.
- In task description, using `/image`, add one image.

Issue:
- There comes an Access error:
 Sorry, you are not allowed to access this document.

Solution:
We are passing `'allowCommandImage': false, 'allowCommandVideo': false,
'allowCommandFile': false}` so that portal user can't have the /image and
related options.

task-3463461

closes odoo/odoo#136799

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-16 07:58:40 +00:00
Odoo's Mergebot 60f6fa8fef [MERGE] web_hierarchy,hr_org_chart: add hierarchy view for employees and departments
Purpose
=======

The goal is to be able to have a hierarchy view to see the organisation of a company, that is, to have organisation chart for `hr.employee` model.
To do that, a new view will be introduced in `web_hierarchy` module, called `Hierarchy` view and it will first be used in `hr_org_chart` module for `hr.employee`, `hr.employee.public` and `hr.department` models.

Implementation details
----------------------

- A new python method will be introduced in the models when `web_hierarchy` module is 
  installed. That method, called `hierarchy_read`, is created to fetch the data for the
  hierarchy view when the view will be loaded.
- The definition of hierarchy view is inspired to the definition of the kanban, 
  that is, a template called `hierarchy-box` has to be defined in the arch to draw the card
  displayed in the node of the hierarchy view.
    - Some attributes can be defined on the `hierarchy` tag:
        - `parent_field` (default='parent_id') contains the parent field name 
          to use to fetch the parent record and to be able to fetch the hierarchy.
        - `child_field` (optional attribute) contains the child field name
          to use to find the child records (it is in fact the one2many field).
          If that field is defined then some queries can be avoided since we
          directly fetch the children when a read/search_read is done.
        - `icon` (default='fa-share-alt o_hierarchy_icon') icon displayed inside the 
          `Unfold` button (to show the child nodes) in hierarchy node.
        - `draggable` (default=False) True to allow the user to drag and drop a 
          node (= record) into a row or another node to update its parent node.

task-3376776

closes odoo/odoo#131162

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-16 07:58:37 +00:00
Xavier Bol (xbo) a055b9c20e [MOV] hr_org_chart,web_hierarchy: move hierarchy view in its own module
This commit moves the generic code of hierarchy view into new module
called `web_hierarchy` to be able to use it outside the hr scope.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 55571bc1ac [IMP] hr_org_chart: add test for hierarchy view
This commit adds some tests for the hierarchy view to test most of
features implemented on that view.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 77afd2833f [IMP] hr_org_chart: add stat button in hr.employee form view
This commit adds a stat button in the form view `hr.employee` model
to be able to go to the org chart and visualize the hierarchy of
the current record displayed in the form view.
The action used inside that stat button cannot have a domain to filter
the result to just have the current record since the user will not
be able to search into the search view. The alternative is to use
a context used inside the hierarchy view to add the domain only when
we load the view (as it is a default domain).

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 6df589a73b [IMP] hr_org_chart: add hierarchy view for hr.employee.public model
This commit defines a hierarchy view for `hr.employee.public` model.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 879e4e3412 [IMP] hr_org_chart: add opacity when one of siblings is unfolded
Before this commit, when the user unfolds a node to display its child
nodes, if that node unfolded has some child nodes then it could be
difficult for the user to clearly see the hierarchy.

This commit adds an opacity to 50% for the sibling nodes when the user
unfold a node in the same row.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 3489a0d28f [IMP] hr_org_chart: auto scroll in hierarchy view
Before this commit, when the user unfold a node in hierarchy view,
he has to scroll to be able to see the child nodes added.

This commit adds an auto-scroll when a new row is added to directly
show the child nodes added on the view when the user unfolds a node
in the hirarchy view.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 3e5e6fd3e3 [IMP] hr_org_chart: add new menu Org Chart in Employee menu
This commit adds a new menu called `Org Chart` in Emnployee menu
to directly have the Org chart view as first view when the user
clicks on that button.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 2f463b564b [IMP] hr_org_chart: add drag&drop in hierarchy view
This commit allows the user to drag and drop a record (hierarchy
node) into another one to set the one hovered as the manager of the
one dragged. It also allows to drag a record into a row to define
the manager of the row as the manager of the record dragged.
This commit also adds an new attribute on `hierarchy` tag to use
when we define that view for a certain model to enable the drag and
drop feature.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 5ade959732 [IMP] hr_org_chart: allow to define custom icon in hierarchy card
Before this commit, the icon displayed inside the Unfold button with
the number of child nodes is the default one. In the employee hierarchy
view, since the child nodes are obviously employees, the icon could
be the one displayed users (`fa-users`).

This commit adds a new attribute called `icon` on `hierarchy` tag
to be able to define another icon displayed on that button. By
doing that, the icon displayed inside employee hierarchy view can
changed to have the one expected and more relevant.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 7223f1ae8b [IMP] hr_org_chart: define hierarchy view for hr.department
This commit defines a hierarchy view for `hr.department` model.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 95e0149659 [IMP] hr_org_chart: define hierarchy view for hr.employee model
This commit defines a hierarchy view for `hr.employee` model.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 03ce25127d [IMP] hr_org_chart: add child_count in unfold button of hierarchy card
Before this commit, the user can unfold a node in hierarchy view but
before clicking on it he cannot know how many child nodes there are.

This commit adds the number of child nodes in the Unfold button with
the default icon.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 1048111a18 [IMP] hr_org_chart,web: define icon class on i tag for view button icon
Before this commit, the icon of the hierarchy view should be rotate
of 90 deg to have an appropriate icon for the view. The problem is
since the icon class is added on button classes, the button will
also be rotated with the icon instead of just the icon.

This commit defines a `i` tag inside the `button` element to select
the view to be able to apply css rotation only on the icon instead
of the whole button.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) e28e1e5b25 [IMP] hr_org_chart,web: extend kanban compiler for hierarchy view
This commit extends the kanban compiler for the hirarchy view. Some
changes has been done in the kanban compiler to be able to reuse the
existing code.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 16c4a54d42 [ADD] hr_org_chart: add hierarchy view
This commit adds a new view called hierarchy view, that view allows
the user to visualize a hierarchy in a model. For instance, that view
could be used for `hr.employee` to easily visualize the hierarchy
inside the company (the manager and his employees) as an Organization
Chart.
That commit introduces a new method for the hierarchy view, called
`hierarchy_read`, that method will be when the view will be loaded
to get the initial data to display.

Some details for the definition of that new view:
------------------------------------------------

Some attributes can be defined on the `hierarchy` tag:
- `parent_field` (default='parent_id') contains the parent field name
  to use to find the parent record of the current to build the hierarchy.
- `child_field` (optional attribute) contains the child field name
  to use to find the child records (it is in fact the one2many field).
  If that field is defined then some queries can be avoided since we
  directly fetch the children when a read/search_read is done.

Inside the `hierarchy` tag, the fields to read can be added and then
a template as to be defined as we do when we define the kanban view.
The template to create is called `hierarchy-box` and that template
will be used to display the card inside a node in the hierarchy view.

task-3376776
2023-10-16 08:17:31 +02:00
Xavier Bol (xbo) 6ff5f9eb16 [REF] hr: create hr_presence_status widget
Before this commit, the hr presence status icon is hardcoded in
each view in which the icon is needed.

This commit creates a widget for that icon to be able to use that
widget in the views in which the icon is needed to avoid duplicating
the code.

task-3376776
2023-10-16 08:17:30 +02:00
Xavier Bol (xbo) adbcf6e1da [FIX] web: remove border-end-0 in search view
Before this commit, when search menu is not displayed in the
search view, then the border right is missing.

This commit removes `border-end-0` class added in the search view
to always have a border. Even with the search menu, it does not
seem to have an extra border.

task-3376776
2023-10-16 08:17:30 +02:00
Xavier Bol (xbo) c143f1dca2 [IMP] web: manage parent_of operator in domain in mockServer
Before this commit, `child_of` operator is managed in the mockServer
but not the `parent_of` one.

This commit manages `parent_of` operator in mockServer to be able
to find the record when the domain used contains that operator

task-3376776
2023-10-16 08:17:30 +02:00
VAN BOSSUYT Nicolasandbvr-odoo 507b80a125 [IMP] web_editor, website: add button/video/image as building block
This commit introduces 3 new inner snippets: button, image and video.

What sets these snippets apart is that, once dropped onto the page, they
transform into basic HTML code, just like if they were created using the
editor (no data-snippet etc).

task-3248881

closes odoo/odoo#126717

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: bvr-odoo <bvr@odoo.com>
2023-10-15 12:39:20 +00:00
Soukéina Bojabza a98926d642 [FIX] website: fix the new design of the Banner snippet
In commit [1], the Banner snippet has been redesigned in order to be
in grid mode by default, to highlight some cool features of the editor.
However, some grid classes and attributes are missing or not well set:
- the first column has a `g-height-4` class despite having 8 rows: this
causes the vertical resize to not work correctly.
- the row does not have the `data-row-count` attribute, which is needed
to display the background grid correctly.

This commit fixes this by replacing the class by `g-height-8` and adding
the `data-row-count` attribute, which is set to 11 rows.

[1]: https://github.com/odoo/odoo/commit/3cbdf754ff8fac8a77887c4307b658cb86b0be1d

task-3369695

closes odoo/odoo#136683

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-10-14 23:52:16 +00:00
Soukéina Bojabza bd5678f907 [FIX] website: make the "Text Cover" snippet look good in grid mode
Before this commit, toggling the "Text Cover" snippet to grid mode did
not produce a good-looking result: the column containing the background
image loses all its padding and therefore appears smaller and shifted
compared to the normal mode.

This commit adds a background color to the image column. Indeed, with a
background color, and more precisely thanks to the `o_cc` class, the
padding is taken into account when computing the grid items size, making
them look similar to how they were in normal mode.

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza 0a52320d44 [FIX] web_editor: make background grid more visible on dark backgrounds
When redesigning the grid layout and handles, commit [1] removed the
filter that allowed the grid to be clearly visible on dark backgrounds
(added in commit [2]). Without this, the background grid when dragging/
resizing and the highlight effect when changing the gaps are difficult
to see.

This commit adds this filter back, but with a lowered opacity in order
to not obstruct the view too much.

[1]: https://github.com/odoo/odoo/commit/70f723a9f78c406746f5409f6a89cbe93ad21580
[2]: https://github.com/odoo/odoo/commit/1aa81243b7c80069c576381e2f3b04281455794f

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza 4345df3aee [IMP] web_editor, website: add a spacing option to modify the grid gaps
The `display: grid` property allows to modify the spacing (or gaps)
between the rows and columns of the grid with the `row-gap` and `column-
gap` CSS properties. When the grid mode was added with [1], these
properties were deliberately ignored and the gaps were forced to 0px.

This commit adds the "Spacing (Y, X)" option that allows to modify these
grid gaps. A grid preview is also added when using this option, in order
to visualize what is being changed in the grid.

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

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza 62985e8329 [REF] web_editor, website: remove duplicated grid/column options
When adding the grid options in commits [1] and [2], some of them have
been duplicated in order to cover the different use cases: grid-only,
columns-only and grid + columns. However, they should have been declared
only once and then called when needed.

This commit extracts the common options into views, to avoid duplicating
them.

[1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec
[2]: https://github.com/odoo/odoo/commit/85b352af319edec84407f2046cf795b4e5503460

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza 11418cc6f0 [IMP] web_editor, website: add individual Padding option for grid items
Before this commit, the "Padding" grid mode option, added in commit [1],
was impacting all the grid items at the same time, which was not
convenient since all these elements would have the same padding and
could not be styled individually.

This commit improves this option in order to modify the padding of the
grid items individually. The highlight effect, added in commit [2], when
changing the padding is still added.

[1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec
[2]: https://github.com/odoo/odoo/commit/f3f2c4c73ce08d3898b8c88e1ef045f7bbd1f624

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza e828683820 [REF] web_editor: refactor some grid code
In the grid mode code, the code managing the transformation of a grid
item into a normal column (when it is dropped or when we toggle the
normal mode) is repeated at several places.

This commit fixes that by creating a function doing this conversion
instead.

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabzaandqsm-odoo 75331fd46a [IMP] web_editor: add support for data-min/max to InputUserValueWidget
Before this commit, when using a `we-input`, there was no way to easily
specify the min and max values that could be entered in the input, which
could be useful when too low/high values could break some behaviors, for
example.

This commit adds the support for the `data-min` and `data-max` data-
attributes in `InputUserValueWidget`. More precisely, when these
attributes are added on a `we-input`, if the user writes a value smaller
than the `data-min` or bigger than the `data-max`, the value snaps to
these bounds. When using the arrows, the value cannot be decreased/
increased beyond them either.

task-3369695

Part-of: odoo/odoo#136683
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-10-14 23:52:16 +00:00
Soukéina Bojabzaandqsm-odoo df7b8a17cd [IMP] web_editor: clean the snippet UI before cloning it
When cloning a snippet, if it had some previews displayed, the previews
may be cloned with it. This is not a good behavior because the clone
is a new snippet so it should not have all the preview classes that were
added when editing. Moreover, these previews could also cause bugs.

To solve this, an idea could be to call the `cleanForSave` function of
all its options before cloning the snippet. But the problem is that in
some options, the `cleanForSave` function does more than simply clean
the UI (as it was originally supposed to) and so it cannot be used for
that purpose only.

As a solution, this commit adds a new function called `cleanUI` whose
exclusive purpose will be to clean the snippet UI. In the future, it
will replace the `cleanForSave` function.

task-3369695

Part-of: odoo/odoo#136683
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-10-14 23:52:16 +00:00
Martin Trigaux 3314ec94e5 [FIX] website_event: avoid double indexing
Similar to d2edee2f6a6

Before this commit, web crawlers may endlessly index pages with tags,
the number of combinations were very large very quickly and could lead
to thousands of requests

opw-3525473

closes odoo/odoo#138718

X-original-commit: 953ac4bde2258d31c2d2f3f6233fb00c802b6e7f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-10-14 03:27:11 +00:00
Xavier ALT 5b914326f1 [PERF] account: speed up _compute_days_sales_outstanding
Followup of odoo/odoo@eb7a32c31c, on large database with lot of
account.move computation still take certain amount of time and database
resources.

This commit limit the computation of `days_sales_outstanding` only
to the commercial partners that we need.

Note: the field is only shown in the Partner form view, so most of
  the time we were only computing it for a single record

| Before | After |
|--------|-------|
| 900ms  | 20ms  |

opw-3530408

closes odoo/odoo#138703

X-original-commit: f968ea2898d7ce314fd575da5446b0dd9d711524
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-10-14 03:27:10 +00:00
Louis (wil) 6ba2972b4f [I18N] l10n_din5008_sale: change Verkaufsauftrag to Auftragsbestätigung
closes odoo/odoo#138671

X-original-commit: ca7b21cdd3078a9f6bd981dcd1281ecb6d59ff4f
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-10-14 03:27:09 +00:00
Josse Colpaert 581f3d34e6 [IMP] l10n_ar,l10n_es,l10n_se: remove unnecessary same inherited tax groups
closes odoo/odoo#137796

Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-14 03:27:04 +00:00
b27d52c193 [IMP] website: introduce new pages templates design
This commit defines new page templates that are related to specific
use-cases.

task-3381714

closes odoo/odoo#126719

Related: odoo/design-themes#692
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
Co-authored-by: Arthur Detroux (ard) <ard@odoo.com>
2023-10-14 03:27:03 +00:00
Benoit Socias 1b8a1d97d6 [REF] base, website, *: rename snippets_list to configurator_snippets
*: theme_default

This commit renames the `snippets_list` manifest key to
`configurator_snippets`.

task-3381714

Part-of: odoo/odoo#126719
2023-10-14 03:27:03 +00:00
Benoit Sociasandstefanorigano e0796020ee [IMP] website: make it possible to create new pages from templates
This commit modifies the "New Page" dialog so that it displays a list
of page templates to pick from in addition to the possibility to create
a blank page.

task-3381714

Part-of: odoo/odoo#126719
Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
2023-10-14 03:27:03 +00:00
Benoit Socias 928eeca714 [IMP] website: use dedicated templates in configurator
This commit adapts the configurator so that the pages it generates are
composed of the primary templates generated from the manifest by the
previous commit.

task-3381714

Part-of: odoo/odoo#126719
2023-10-14 03:27:03 +00:00
Benoit Socias a2f8e18b76 [IMP] website, base: generate distinct templates for new pages
This commit is a preparation for the new page from template feature.

In order to make it possible for new page templates to be customizable
at several levels from themes, it was decided to create several layers
of primary templates.
Those templates are build from the descriptions found in manifest files
under the new `new_page_templates` key.
The same principle is also applied for configurator pages (described in
manifest files under the `snippet_lists` key) because we noticed that
some of the changes that were made in themes for some blocks were not
supposed to impact the "drag'n'drop" version of the block, but only
the version used inside the pages generated by the configurator. (E.g.
connecting shapes between blocks)

The manifest entries now have the following structure:
```py
'snippet_lists': {
    'somepagename': ['s_block_name', ...],
},
'new_template_pages': {
    'somecategoryname': {
        'sometemplatename': ['s_block_name', ...],
    },
},
```

This commit finds those entries in the manifests and creates the
following primary templates:
- `s_block_name`: already exists, this is the block that is drag and
dropped using the website builder
- `configurator_s_block_name`: specialization of `s_block_name` used in
all pages generated by the configurator
- `configurator_somepagename_s_block_name`: specialization of
`configurator_s_block_name` for that specific page
- `new_page_template_s_block_name`: specialization of `s_block_name`
used in all new page templates
- `new_page_template_somecategoryname_s_block_name`: specialization of
`new_page_template_s_block_name` used in new page templates of that
specific category
- `new_page_template_somecategoryname_sometemplatename_s_block_name`:
specialization of `new_page_template_somecategoryname_s_block_name` for
that specific template

For the template pages defined in `website` it also creates primary
templates that assemble `t-snippet-call`s of the most specific block
templates. Those templates are named
`new_page_template_sections_somecategoryname_sometemplatename`.

task-3381714

Part-of: odoo/odoo#126719
2023-10-14 03:27:03 +00:00