Commit Graph
163552 Commits
Author SHA1 Message Date
Matheus Leal Viana (malv) ebdb317a98 [FIX] account: Create multiple invoices with correct account
Steps to reproduce:
-------------------
* Go to Contacts and create two contacts, each with a personalized account receivable;
* Go to Sales and create a quotation for each contact;
* Confirm the quotations and deliver the products;
* From the sale.order view list, select the two SOs and click on Action to create invoices.
* Go to the new invoices -> Journal items
* One of the invoices has wrong account receivable

Issue:
-------------------
When creating two invoices for two different quotations and customers, where each customer has a personalized account receivable, only one of the new invoices assign it correctly.

Cause:
-------------------
When computing the account_id for the move lines, a SQL query selects distinct based on
property.company_id, property.name but since the property.name is the same for both customers “property_account_receivable_id” and they have the same company_id it only consider the first one and the second is discarded.

To fix the issue, we need to ensure that all users are being considered in the computations.

OPW-3376865

closes odoo/odoo#129607

X-original-commit: c66d9ee2a160c3bad745b1394308c3e48f5f2e91
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Matheus Leal Viana (malv) <malv@odoo.com>
2023-07-25 21:22:51 +02:00
Miika Nissi b6652e7d01 [CLA] Miika Nissi
closes odoo/odoo#129586

X-original-commit: 5c28c6df0390daad9a2050a1baf31dd05605747a
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-07-25 21:22:49 +02:00
Melanie Peyrat (MEPE)anddasz b3be3af61c [ADD] hr_homeworking: add homeworking
Users and employees can now define their usual worklocation
for a day of the week aswell as define unusual ones from the
calendar app. The worklocation is then displayed in the calendar
in two different ways: when only one person is selected, there
is a circle with an icon in it, and a ray that extends to the right
if the person is at the same location for multiple days. If there
are multiple persons selected there is no ray, instead the circles
are grouped by location type and colored accordingly to the filters
in the left panel.

closes odoo/odoo#129585

Task: 3060685
X-original-commit: c74ac3f698d4ea4c9b7a5e060fba4cf77cc9a6d7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Co-authored-by: dasz <dasz@odoo.com>
2023-07-25 21:22:46 +02:00
Brieuc-brd 818c0ed8df [FIX] project, sale_project: side panel layout
This commit adapts the spaces and table layouts to maintain concistency
with Milk design.

task-3382174
Part of task-3326263

closes odoo/odoo#129571

X-original-commit: 68611ce40f48c6c8a143a24ac05e9ef72a8f69e4
Related: odoo/enterprise#44558
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-25 21:22:40 +02:00
Sanket Brahmbhatt bdceb080a9 [FIX] account: adopt unexpected string while upload
This issue occurs while uploading a PDF file and that PDF file has an unexpected
string. So, The trackback will appear.

Step reproduce :
- install the account_accountant Module
- Open Accounting Module
- Click On Customer > Invoices
- Click On Upload Button > Upload PDF file

Error:
Unexpected escaped string: b'~'

When a user uploads a PDF file, PyPDF2 does not recognise the symbol
and character combination as a valid escape sequence, such as (\), (~).

sentry-4304111635

closes odoo/odoo#129556

X-original-commit: ea150a6f4be44ffc6f15837d5febd06fa1b695be
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-25 21:22:38 +02:00
Elias Regopoulos ddd7772abc [FIX] account: Instantiate potentially empty variable
If `journal_data` does not have a 'code' key, then the `journal`
variable never gets assigned and any references to it throw an
"UnboundLocalError: local variable 'journal' referenced before assignment"

We avoid this by assigning to journal an initial value of None.

closes odoo/odoo#129542

X-original-commit: b9cbb96c1ded18deb344cbf578083e6a0e9a353e
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-07-25 19:47:56 +02:00
FrankC013 b09b8a48ce [CLA] signature for nuobitsolutions
closes odoo/odoo#129489

X-original-commit: 97bc0e66810b07477be194923b759ca806378cb0
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-07-25 19:47:46 +02:00
Andro Gvivradze c314d31b70 [FIX] survey: improve bar chart visuals
This commit makes sure that graph result starts at 0 in survey
results. Before the commit it would start at the lowest number of
answers, which was not the best way to visualize survey result data.

task-3389003

closes odoo/odoo#129488

X-original-commit: 8bde5f102bdbdf923c5c4d4cdd63bfdaadd7bf2b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-25 19:47:43 +02:00
Alexandre Kühn 4a92dfa3ba [FIX] mail: open chat on very narrow devices
Before this commit, when opening a chat on a very narrow mobile
device (e.g. 300px width), there was the following crash:

```
TypeError: Cannot set properties of undefined (setting 'hidden')
```

This happens because the computed maximum amount of visible chat
windows was 0, which prevented the good opening of chat window.
Indeed, the code relied on at least a `CHAT_WINDOW_WIDTH`, which
is 360px.

This commit fixes the issue by guaranteeing that it is always
possible to make 1 chat window on the screen, regardless of the width
of the device.

closes odoo/odoo#129474

X-original-commit: 1c9289fffe2a8d0936a1afa99255777ff275c712
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-25 17:36:10 +02:00
Louis Wicket (wil) 7da30c7d14 [FIX] mail, *: fix grammar error in field help
This commit fixes a really old grammar error in the help message of the
message_needaction_counter field.

Before this commit: “Number of messages which requires an action”
After: “Number of messages requiring action”

The subject of “require” is “messages”, which is third-person plural, so
it can't take the -s suffix.

closes odoo/odoo#129468

X-original-commit: 0d10cfeaa56d5df23df05f436d353978043f4a71
Related: odoo/enterprise#44509
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-07-25 17:36:08 +02:00
unknown 09e1b76947 [CLA] Signature for jrmy17
closes odoo/odoo#129464

X-original-commit: 1148bb3e876b0d2cb81498ad163bc9d4c277e6de
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-07-25 17:36:02 +02:00
Saurabh Choraria 81fe7464f3 [FIX] auth_signup: prevent traceback when mail template is not found
When user deletes 'Settings: Unregistered User Reminder' record from
'mail.template' model and when 'Users: Notify About Unregistered Users'
scheduled action is executed at that time traceback is generated on the user
side as well as in the log.

Applying this commit will fix this issue.

sentry-4174950325

closes odoo/odoo#129461

X-original-commit: 2a77e72a27ebd2bdbf32995f34d219f51d33dacf
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-07-25 17:36:00 +02:00
Alexandre Kühn 513a95ef9f [FIX] mail: no crash on link preview deletion of unknown message
Before this commit, when receiving a link preview deletion
notification of an unknown message, there was a crash.

This happens because the handling of the link preview deletion
notification assumes that the message linked to the link preview
is known by the JS code. But this might be wrong in the case that
the message was not loaded.

closes odoo/odoo#129460

X-original-commit: 28beec42ac8b731170517a6aa5d7c99623a5a87c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-25 17:35:57 +02:00
niyasraphy 775bec2a74 [FIX] account: traceback on clicking journal in account dashboard
before this commit, on clicking the bank journal in ce,
is showing traceback.

traceback:
action['domain'] = (action['domain'] or []) + [('journal_id', '=', self.id)]
TypeError: can only concatenate str (not "list") to str

after this commit, on clicking no traceback wont be shown
and corresponding action will get open

closes odoo/odoo#129439

X-original-commit: bbcb925f88cbdc34532894918e50fd11afe7a95d
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-25 17:35:55 +02:00
roen-odoo 21392ab236 [FIX] point_of_sale: Correctly update rewards after scanning a product
Current behavior:
When scanning a product that should trigger a reward, the reward was not
applied.

Steps to reproduce:
- Create a reward that applies a 10% discount on specific products
  (e.g. Whiteboard pen)
- Make sure a barcode is set on the Whiteboard pen product
- Open a PoS, and scan the Whiteboard pen product barcode
- The reward is not applied

opw-3373435

closes odoo/odoo#129406

X-original-commit: 9991d923ec0e7fc74e5d319d43a0052e6e4d7416
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-07-25 17:35:52 +02:00
Aaron Bohy bc95c6a348 [REF] web,*: remove legacy client action support
This commit removes a lot of legacy code that we kept for the few
legacy client actions that were still to be converted to owl. Now
that the last one has been converted, we can finally get rid of a
lot of legacy code (ActionAdapter, ActionMixin, ControlPanel,
ActionMenus, DropdownMenu(Item), Pager, DomainSelector...).

Part of task~3439226

closes odoo/odoo#129314

Related: odoo/enterprise#44465
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-25 17:35:47 +02:00
tsm-odoo f5442e970a [IMP] mail: add guest to context when available
This PR prepares the ground for the one introducing guests
for livechat visitors. Since our SameSite cookie policy
is Lax, the cookie won't be send on unsafe cross site
requests thus another mechanism will be introduced to
retrieve the guest.

This PR abstracts the way the guest is retrieved in order
to ease this transition as much as possible by overriding
the `ir_http._pre_dispatch` method in order to inject the
guest in the context if any.

part of task-3332628

closes odoo/odoo#129039

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-25 17:35:40 +02:00
tsm-odoo c329d9edd2 [IMP] bus: add test for samesite bus
This commit adds a test for the bus samesite configuration.

opw-3336222

closes odoo/odoo#128856

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-25 17:35:37 +02:00
shag-odoo ad66dd52ee [FIX] hr_skills: fix extra white space in CV printing
Before this commit if we print resume and if long description is added then by
default whole section moves to next page leaving extra white spaces behind

FIX:
After this commit if we add long description then section will not move to the
next page basically w-auto class has been added which prevent it from moving
to the next page because now div gets auto or natural width the w-auto class
ensures that the div expands horizontally to fit its content allowing
the text to wrap naturally.

task-3279176

closes odoo/odoo#128715

X-original-commit: 16e9499b3d266ea595b8dd4db6fcb566acf8f04b
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-07-25 17:35:35 +02:00
Florian Damhaut 669d7e1bcd [IMP] lunch: split total
The total should be split between already paid and to pay

closes odoo/odoo#126079

Task-id: 3349791
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-07-25 17:35:29 +02:00
mehjabinfarsana 676f723c96 [IMP] web: open my odoo.com account in new tab
before this commit, the usermenu My Odoo.com account
was opening in the same tab

after this commit My Odoo.com account usermenu is
opening in a new tab

closes odoo/odoo#123627

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-07-25 17:35:27 +02:00
Valentin Chevalier cd357d4c30 [FIX] payment_stripe: allow payment by token
When migrating to Stripe's Elements API, payment by token was no longer
possible.

task-3322020

Introduced in ac90aa077d

closes odoo/odoo#129485

X-original-commit: 27389a935cac176a95d7271e12be065d1eb4ca12
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-07-25 14:40:15 +02:00
Aaron Bohy f16e23c23f [IMP] web: orm service: add "webRead" function
This commit adds a shortcut in the orm service to call the new
"web_read" python method and adapts the few calls to use it.

closes odoo/odoo#129502

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-07-25 13:26:37 +02:00
niyasraphy b4c828622b [IMP] point_of_sale: remove unused function
before this commit, in point_of_sale module there is
a function _get_reconciled_vals, which is left over
in this commit: https://github.com/odoo/odoo/commit/785d49f3f0a21720d8c929d597d4041918ab7f41

initially the function is inherited to bring the payment
method name in the invoice report from the pos, but it is
decided not to add it again to keep it same from accounting
and point of sale.

Discussion: https://github.com/odoo/odoo/pull/125995#issuecomment-1643938775

after this commit, the unused function will be
removed from the code.

closes odoo/odoo#129499

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-25 13:26:34 +02:00
tsm-odoo 966f366bfc [FIX] im_livechat: prevent adding portal users are operator
task-3433465

closes odoo/odoo#129418

X-original-commit: 15e998eed3b6d31f19109f9ec6ed2e425285f820
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-25 10:35:49 +02:00
Benjamin Vray c8a40b9025 [FIX] website: add test for popup and scrollbar
Add test to verify scrollbar behavior for page and popups with or
without backdrop. The expected behavior is that the page scrollbar
should not be present when a modal with a backdrop is open, and that the
page scrollbar should be displayed if the popup does not have a
backdrop, such as a cookie bar. However, if a modal without a backdrop
itself has a scrollbar, the page scrollbar should not be displayed to
prevent the two scrollbars from overlapping, which prevents scrolling of
the popup on Chrome (when clicking on the scrollbar instead of using the
mouse wheel).

In addition to that, this commit includes a test to confirm the proper
functionality of snippet animations when a cookie bar is displayed on
the page. Moreover, it also verifies that the snippet animations perform
correctly within a popup.

During the forward port of this commit (Master branch), the test failed
due to missing braces around 'throttleForAnimation' in the '000.js' file
of 's_popup'. These were directly added in this commit.

task-2983901

closes odoo/odoo#128914

X-original-commit: 4dd462f20ccb29923e5a053e0ed4c08545f82ae7
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-07-25 10:35:43 +02:00
Géry Debongnie 286cc97dd4 [IMP] web: allow lang to be overriden by url query params
With this commit, it is possible to load the web client in a language
different than the user by using the `lang=` query string in the url:
For example, `/web?lang=en_US`

This is useful when we need to quickly check something, without changing
the current user settings. Note that it will only work if the url lang
has been installed on the database (if lang does not exist, it will fall
back to en_us).

closes odoo/odoo#128121

Taskid: #3420252
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-07-25 10:35:41 +02:00
Xavier-Do 1c598d4b00 [FIX] base: avoid being stuck on a test
During the nightly, it looks like some test in
`TestAccountEarlyPaymentDiscount` will reload the registry, restarting
all base tests, including `.test_add_field_valid`

This test cannot be executed on an existing database without providing
a `-i` for a strange reason.

If this is not a real issue, this simple assertion will avoid to get
stuck while running this test on an existing database.

closes odoo/odoo#129491

X-original-commit: 4c6e05cbb43d08c544d9d558f80b67ccb786d482
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-07-25 08:19:08 +02:00
Thomas Lefebvre (thle) 81a38cb63f [FIX] website_sale: check terms and conditions
Issue:
When we activate the terms and conditions,
the button "Pay Now" is not "disabled"
at the first loading of the page.

Cause:
When we update the carriers
(via `_handleCarrierUpdateResult`),
if all conditions are good,
we activate the "Pay Now" button
(via `_setIsPayable`).
We do not take into account
the checkbox terms and conditions.

Solution:
Use payment's `_enableButton` method
to check all the conditions.

Introduced with 0967efaa24

opw-3323938

closes odoo/odoo#129437

X-original-commit: 4217b923cb2ca06710c2f5ac31c4d609390ce4fe
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-07-25 08:19:03 +02:00
vishal padhiyar f4f0a82b84 [FIX] web_{editor}: add missing args in position callback
Before this commit:

When attempting to open a dynamic placeholder in email marketing, a traceback
occurs.

After this commit:

Now the dynamic placeholder works properly.

Task-3373356

closes odoo/odoo#129415

X-original-commit: bb9fb402a135baf7e7b9da9bbb40888f5323ded9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-07-25 08:19:01 +02:00
Odoo's Mergebot b925ec1d55 [REF] pos*: structure static files
pos*: l10n_ae_pos,l10n_co_pos,l10n_gcc_pos,l10n_in_pos,
l10n_sa_pos,pos_adyen,pos_discount,pos_epson_printer,
pos_hr,pos_hr_restaurant,pos_loyalty,pos_mercury,
pos_restaurant,pos_restaurant_adyen,pos_restaurant_stripe,pos_sale,
pos_sale_loyalty,pos_sale_product_configurator,pos_six,pos_stripe,

The POS has a large number of add-on modules. As such, it is
important that they all respect strict guidelines when it comes
to file structures.

Before, each module had more or less it's own rules when it came to
this, apart from the fact that code was mostly organised into
`js` and `xml` folders.

In this PR, we move to a much more structured approach,
in which each module follows the following pattern:

src/
|-- app/  <-- the module's own new logic
|-- overrides/
|   |-- components
|	|   |-- overridden_component_a
|	|	|   |-- overridden_component_a.js
|	|	|   |-- overridden_component_a.xml
|	|	|   |-- overridden_component_a.css
|   |-- models
|	|   |-- overridden_model.js

Apart from the structural changes, this PR introduces changes
to file names, such that they respect the default pattern of
snake_case naming.

In this commit, we move the files. In the following one we
make the needed changes in the code, such as adapting imports.

Task: 3394192

closes odoo/odoo#127056

Related: odoo/enterprise#43594
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-25 08:18:58 +02:00
vlst 83b45b3be9 [REF] pos*: adapt imports
pos*: l10n_ae_pos,l10n_co_pos,l10n_fr_pos_cert,l10n_gcc_pos,
l10n_in_pos,l10n_sa_pos,pos_adyen,pos_discount,
pos_epson_printer,pos_hr,pos_hr_restaurant,pos_loyalty,
pos_mercury,pos_restaurant,pos_restaurant_adyen,pos_restaurant_stripe,
pos_sale,pos_sale_loyalty,pos_sale_product_configurator,pos_six,
pos_stripe

In the previous commit, we moved and renamed files such that they
better follow certain guidelines.

In this commit, we adapt imports accordingly.

In order to efficiently accomplish this task, i used the following [script](https://github.com/vlst-odoo/tools/blob/main/fixImports.py)

Task: 3394192
Part-of: odoo/odoo#127056
2023-07-25 08:18:58 +02:00
vlst bd1331f81e [REF] pos*: structure static files
pos*: l10n_ae_pos,l10n_co_pos,l10n_gcc_pos,l10n_in_pos,
l10n_sa_pos,pos_adyen,pos_discount,pos_epson_printer,
pos_hr,pos_hr_restaurant,pos_loyalty,pos_mercury,
pos_restaurant,pos_restaurant_adyen,pos_restaurant_stripe,pos_sale,
pos_sale_loyalty,pos_sale_product_configurator,pos_six,pos_stripe,

The POS has a large number of add-on modules. As such, it is
important that they all respect strict guidelines when it comes
to file structures.

Before, each module had more or less it's own rules when it came to
this, apart from the fact that code was mostly organised into
`js` and `xml` folders.

In this PR, we move to a much more structured approach,
in which each module follows the following pattern:

src/
|-- app/  <-- the module's own new logic
|-- overrides/
|   |-- components
|	|   |-- overridden_component_a
|	|	|   |-- overridden_component_a.js
|	|	|   |-- overridden_component_a.xml
|	|	|   |-- overridden_component_a.css
|   |-- models
|	|   |-- overridden_model.js

Apart from the structural changes, this PR introduces changes
to file names, such that they respect the default pattern of
snake_case naming.

In this commit, we move the files. In the following one we
make the needed changes in the code, such as adapting imports.

In order to efficiently accomplish this task, i used the following [script](https://github.com/vlst-odoo/tools/blob/main/rename.py)

Task: 3394192
Part-of: odoo/odoo#127056
2023-07-25 08:18:57 +02:00
Odoo's Mergebot 0da2b966e8 [FW][IMP] web,account,stock,sale & others: adapt report layouts to new report editor
General guidelines for adaptations:
- include 'demo data' inside the report (e.g. `<span t-field='o.name'>INV/2023/001</span>`)
- include div.oe_structure elements in several places - these elements take no space in the printed report if empty, but allow users to 'hook in' several places of the reports
- modify the base report layout to include several placeholder blocks (for company address, etc.) that make it clear what goes where (since demo data are a bit unclear for bigger blocks, like address blocks)
- add branching or re-order some t-if/t-else conditional blocks. The report shows the first `t-if` content by default, so it makes sense to have it be 'the default value' (e.g. instead of showing the options table all the time in the editor for a quote report, only show is as a t-else) - the goal is to have the report editor open on a report that looks as much as possible as the default, vanilla version of the report
- whenever possible, try to avoid `<t>` nodes insise `table/thead/tbody/tr` nodes, as this is not allowed by the hml spec and browser parser will not agree with those. Since the problem is known, the report editor will convert such tables to div elements (and preserve the layout as much as possible) - but making sure the table is 'correct html' (e.g. by moving qweb directives on legal nodes, like tr or td) will preserve the layout and will also allow users to use the table modification tool of the Odd Editor
This is a first pass on 'important' reports. A second pass will come before v17.

closes odoo/odoo#129492

Forward-port-of: odoo/odoo#129310
Related: odoo/enterprise#44526
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2023-07-25 00:54:55 +02:00
Damien Bouvy 22c47fb003 [FIX] sale, l10n_br: no dynamic t-calls
A recent trend in report design in Odoo has been to dynamically set the
report template to call using a python method. This was used e.g. to
detect that a document should use an alternative report layout created
by a localization package.

Unfortunately, doing so 'breaks' the new report editor, as it runs
without an underlying record, and therefore cannot call python methods
to determine what the template id to call actually *is*.

This commit removes this mechanism from the Sales app and the Brazilian
localization, relying instead on 'normal' qweb directives and
inheritance to generate the proper layout.

This commit does not introduce any functionnal changes, it simply makes
the templates compatible with the new report editor. No visible change
should occur.

X-original-commit: cd26f77adecc7036c845ed1d7c7094b63987a1a1
Part-of: odoo/odoo#129492
2023-07-25 00:54:54 +02:00
Damien Bouvy c8367dd53c [FIX] account,l10n_ch: report inheritance
make the qr code section easier to modify in the base report for the
swiss localization

X-original-commit: 105557cc817fc9d21837ee50ba4fbc502926d059
Part-of: odoo/odoo#129492
2023-07-25 00:54:54 +02:00
Damien Bouvy 4e08fe09c8 [FIX] *_timesheet: adapt timesheet report
X-original-commit: ce7df0df6dd41174623fc15552d1faa07b4f9159
Part-of: odoo/odoo#129492
2023-07-25 00:54:54 +02:00
Damien Bouvy e0a2c85d6b [FIX] delivery: adapt to base sale report layout changes
X-original-commit: f7c691ee78e9bfe3f8e131b5ce033e889e8bf2fa
Part-of: odoo/odoo#129492
2023-07-25 00:54:54 +02:00
Damien Bouvy c51f280af6 [FIX] l10n_*: adapt to base report layout changes
X-original-commit: c46ab5022828c8c25427cb4532296ed4c05eb871
Part-of: odoo/odoo#129492
2023-07-25 00:54:53 +02:00
Damien Bouvy 97bc0f75e0 [IMP] product_matrix: adapt reports to studio report editor
Includes several modifications to better work with the new editor:
- add placeholders on t-field/t-out nodes
- add several div.oe_structure containers in key places for easier user
  edition
- add branching options for several t-if directives without a t-else to
  display for users (e.g. displaying the payment QR code if the value is
  set vs. when the value is not set). These branching options are set to a
  default value (the t-if node) which is what users see by default in the
  report editor; the t-else node is a version they can manually toggle if
  they wish)
- avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as
  these break the table layout in chomium-based engines (that we know of);
  instead, try to have foreach loops on tr or td nodes directly, or hoist
  t-set directives above the table node
- replace several div or p (block) nodes by span or other inline nodes
  to make it easier for users to insert content in their vicinity

X-original-commit: 744701993ece3099ce4768b35d3c0effff7d46a7
Part-of: odoo/odoo#129492
2023-07-25 00:54:53 +02:00
Damien Bouvy 48efc85e16 [FIX] product_expiry: adapt to report layout
X-original-commit: 4388ac8a03e2325b6aa50228718b41c8244f7af9
Part-of: odoo/odoo#129492
2023-07-25 00:54:53 +02:00
Damien Bouvy f7cf89d914 [IMP] hr_timesheet: adapt reports to studio report editor
Includes several modifications to better work with the new editor:
- add placeholders on t-field/t-out nodes
- add several div.oe_structure containers in key places for easier user
  edition
- add branching options for several t-if directives without a t-else to
  display for users (e.g. displaying the payment QR code if the value is
  set vs. when the value is not set). These branching options are set to a
  default value (the t-if node) which is what users see by default in the
  report editor; the t-else node is a version they can manually toggle if
  they wish)
- avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as
  these break the table layout in chomium-based engines (that we know of);
  instead, try to have foreach loops on tr or td nodes directly, or hoist
  t-set directives above the table node
- replace several div or p (block) nodes by span or other inline nodes
  to make it easier for users to insert content in their vicinity

X-original-commit: eabdfe294d38df463828f87970b25d52ceae4a6a
Part-of: odoo/odoo#129492
2023-07-25 00:54:53 +02:00
Damien Bouvy 86d3b4f51f [IMP] stock, stock_*: adapt reports to studio report editor
Includes several modifications to better work with the new editor:
- add placeholders on t-field/t-out nodes
- add several div.oe_structure containers in key places for easier user
edition
- add branching options for several t-if directives without a t-else to
display for users (e.g. displaying the payment QR code if the value is
set vs. when the value is not set). These branching options are set to a
default value (the t-if node) which is what users see by default in the
report editor; the t-else node is a version they can manually toggle if
they wish)
- avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as
these break the table layout in chomium-based engines (that we know of);
instead, try to have foreach loops on tr or td nodes directly, or hoist
t-set directives above the table node
- replace several div or p (block) nodes by span or other inline nodes
to make it easier for users to insert content in their vicinity

X-original-commit: 567b8d676b3b6dc747df4d9bf10e7a91b4cb61bb
Part-of: odoo/odoo#129492
2023-07-25 00:54:52 +02:00
Damien Bouvy 1b072d55c6 [IMP] sale, sale_*: adapt reports to studio report editor
Includes several modifications to better work with the new editor:
- add placeholders on t-field/t-out nodes
- add several div.oe_structure containers in key places for easier user
edition
- add branching options for several t-if directives without a t-else to
display for users (e.g. displaying the payment QR code if the value is
set vs. when the value is not set). These branching options are set to a
default value (the t-if node) which is what users see by default in the
report editor; the t-else node is a version they can manually toggle if
they wish)
- avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as
these break the table layout in chomium-based engines (that we know of);
instead, try to have foreach loops on tr or td nodes directly, or hoist
t-set directives above the table node
- replace several div or p (block) nodes by span or other inline nodes
to make it easier for users to insert content in their vicinity

X-original-commit: ddace177b9512657e3dee854309835b4b2f9af28
Part-of: odoo/odoo#129492
2023-07-25 00:54:52 +02:00
Damien Bouvy 2fbf17d235 [IMP] account: adapt reports to studio report editor
Includes several modifications to better work with the new editor:
- add placeholders on t-field/t-out nodes
- add several div.oe_structure containers in key places for easier user
edition
- add branching options for several t-if directives without a t-else to
display for users (e.g. displaying the payment QR code if the value is
set vs. when the value is not set). These branching options are set to a
default value (the t-if node) which is what users see by default in the
report editor; the t-else node is a version they can manually toggle if
they wish)
- avoiding 'naked' t nodes as child of table/thead/tbody/tr elements, as
these break the table layout in chomium-based engines (that we know of);
instead, try to have foreach loops on tr or td nodes directly, or hoist
t-set directives above the table node

X-original-commit: 60465047df56c07e61623c1f7304fede28232581
Part-of: odoo/odoo#129492
2023-07-25 00:54:52 +02:00
Damien Bouvy e461e4e957 [IMP] web: better placeholders in the base report layouts
Include placeholders meant for the new studio editor engine.

X-original-commit: 87f66c19d5c1d27e2afa0aae697b768334275c88
Part-of: odoo/odoo#129492
2023-07-25 00:54:52 +02:00
Laurent Smet 48c5f72ab3 [FIX] account,l10n_*: Fix custom invoice PDF report in studio
Since https://github.com/odoo/odoo/commit/fc0464427f268ed58d5f800dfcf40404640c6676
customizing an invoice PDF report leads to a white page.

This is because the dynamic t-call in PDF report in not supported by Studio
on the customization screen.

closes odoo/odoo#129484

X-original-commit: a252fe6c9d0c5fd7ff5e93af9f1ff9d86adac651
Related: odoo/enterprise#44519
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-07-24 23:04:20 +02:00
Olivier Dony ae57b72e88 [IMP] sql_db: speed up log-sql query matching
The dinosaur regular expressions[^1] used to count SELECT/INSERT queries in SQL
debugging mode were slowing down query execution. They can be replaced by
more efficient ones.

The `re.MULTILINE` flag is not necessary anymore, since there is no more
`$` or `^` in the expressions.

[^1]: f8471796a3

closes odoo/odoo#129473

X-original-commit: 0730e432c470635baec962d16ca09e8423c2b3ba
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
2023-07-24 23:04:17 +02:00
Xavier-Do fbbc7050cd [FIX] website: fix wesite_id in leaf
closes odoo/odoo#129456

X-original-commit: 4c3b6ad80ffd9015e7dfcb9e93a6455cbc319c90
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-07-24 23:04:15 +02:00
Thomas Lefebvre (thle)andFeyensv a3d1d6b32e [FIX] sale, website_sale: apply fiscal position to compute amounts
Setup:
------
1) Install website_sale module

2) Product:
One product with:
- Sales Price: 100
- Customer Taxes: 10% included

3) Fiscal position
Two fiscal positions:
- Country: France - 10% included --> 20% excluded
- Country: Netherlands - 10% included --> 15% included

Steps to reproduce:
-------------------
- without being logged in, go to ecommerce;
- add the produt to cart;

without information on the tax position, we have:
90.91 + 9.09 = 100 --> this is correct

- process checkout;
- Enter an address with the country France;

France:
90.91 + 18.18 = 109.09 --> this is correct
(100 : (1 + 10%)) * (1 + 20%) = 109.09

- edit the billing address;
- use the country Netherlands;

Netherlands:
104.55 + 20.91 = 125.46 --> this is wrong
instead of:
90.91 + 13.64 = 104.55
(100 : (1 + 10%)) * (1 + 15%) = 104.55

(This is just one example)

Issue:
------
There is inconsistency in the application
of taxes according to tax position.

Cause:
------
To calculate the product's price unit, we apply
tax position mapping via the
`_get_tax_included_unit_price` method.
Modifying the `price_unit` field in the
sale order line will trigger the
compute method `_compute_amount`.
This recalculates the amounts,
but without taking into
account the tax position mapping.
We therefore use a value for the `price_unit`
field which is not in line with the taxes.

Solution:
---------
Recompute sales order line taxes
when a change in fiscal position is detected.

opw-3318971

closes odoo/odoo#129440

X-original-commit: cdb9819b0e199f95d489e8cfe4217cf6de6362b3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Feyensv <vfe@odoo.com>
2023-07-24 23:04:08 +02:00