Commit Graph
163751 Commits
Author SHA1 Message Date
Laurent Smet dfd38a6a5a [FIX] account: Take care of res.partner.bank owned by another company.
We need to take care of the `unique(sanitized_acc_number, partner_id)` constraint
and avoid to create a new bank account if already exists in another company.

closes odoo/odoo#130324

Task: 3432443
X-original-commit: bc4cbd0e129d7f9d417752e162397ece5e1bfc0f
Related: odoo/enterprise#44903
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-02 05:10:55 +02:00
Laurent Smet ec44d4596e [FIX] account: Take care of archived res.partner.bank in _find_or_create_bank_account
We need to take care of the `unique(sanitized_acc_number, partner_id)` constraint.

Task: 3432443
X-original-commit: 687bc145c8889d05ee816b0cd8ed0378c301b4e7
Part-of: odoo/odoo#130324
2023-08-02 05:10:55 +02:00
mehjabinfarsana bb167d60e3 [FIX] l10n_sa_edi: make user error message translatable
before this commit, the user error message
on changing ZATKA submission mode
was not translatable
to user language

after this commit, user error message
will be shown in user's language

closes odoo/odoo#130323

X-original-commit: e00e253658cb0eefa8ea0f726f0a3bec6eaca7e6
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-08-02 05:10:51 +02:00
Benoit Socias cd46857b15 [FIX] web_editor, website: use dataset mimetype when modifying images
Since [1] the mimetype used when calling `modify_image` was obtained
from the data URL contained in the `src` attribute instead of the
dataset. This is wrong for background images because they do not have an
`src` attribute.
Thanks to [2] which repaired the value contained in `dataset.mimetype`,
this value can be used as it was before [1].

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

task-3446438

closes odoo/odoo#130322

X-original-commit: e3221fe5d5efa824365210f040e93654e0a30309
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-08-02 05:10:48 +02:00
Victor Feyens 14acd8599e [FIX] website_sale: make test more reliable
The test test_update_cart_zero_qty was checking the total amount
of the cart, but depending on installed localizations, the taxes
vary and the test can fail.

This commit changes the check to the untaxed amount to make sure
the test only depends on the sales price of the product defined in
the test setup.

closes odoo/odoo#130319

X-original-commit: a2c693795081953ed0ba07bfad210701fcf6f1f0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-02 05:10:44 +02:00
Prakash Prajapati 6be8aeb376 [FIX] project: set correct company in project
steps:
   - install account module
   - Create company Odoo IN
   - Got to account > Configuration > analytic Plan
   - Open Project and set company as Odoo IN
   - install project module

issue-
   Analytical plan and project both have different company so traceback come up.
Fix:
   We have set company of analytic plan in project company.

task-3138082

closes odoo/odoo#130318

X-original-commit: d6171eb1c0e94cb1a22241dd250bc23247de3481
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-02 05:10:41 +02:00
Victor Piryns (pivi) ed77febae6 [FIX] sale_timesheet: don't include expenses when printing Timesheets
Issue:
Follow up on #128432, but this time it's removing expense lines from
the pdf report when we print the Sales Order that has both
timesheets, and posted expenses.

Steps to reproduce:
- Install Sales, Timesheets, Expense
- Create an SO and sell a service that creates a Task > Confirm
- Log some timesheet on the task (3h for ex.)
- Create an expense related to the SO, approve it and generate the
  journal entries.
- Print > Timesheets on the SO
- In the pdf, we have table row entries for the expense lines.

Cause:
The report is basing itself on `timesheet_ids` to print the report,
those might include expense lines.

Fix:
Add a domain on `timesheet_ids` to exclude lines that don't have a
`project_id` set, those are not timesheet, so can be expenses. We
want to exclude those.

Affected versions:
16.0 up to master

Reference:
opw-3342274

closes odoo/odoo#130315

X-original-commit: c55f01cff7e415c48f823201ace63074bf9a9146
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-08-02 05:10:37 +02:00
Loukas Wets (lowe) 442a79eeb0 [FIX] point_of_sale: order name handling in order setup
The setup function was not correctly handeling Order.name when given in
options. It was regenerating it instead of using the one given in option.
For self orders it was changing the prefix from Self-Order to Order.

closes odoo/odoo#130310

X-original-commit: 11a4beea5cbcd817cca02d81b772a5e8b3d097b6
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-02 05:10:29 +02:00
Ahmed Mohamed 2c9bb123ba [CLA] 0xSaltyHash Signature
closes odoo/odoo#130309

X-original-commit: f3db39880e4d72d821b48d6e2532bfe1fe6af8e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-08-02 05:10:21 +02:00
Adrien Widart (awt) ce24bd66c1 [FIX] sale_stock,stock_account,point_of_sale: post anglo saxon inv
There will be some access errors if an accountman tries to post an
invoice

To reproduce the issue:
1. Create a product category FIFO-AUTO
2. Receive a product of that category at $10
3. Sale, deliver and create the invoice for that product
4. Create a user with basic access to account app only
5. Switch into that user
6. Confirm the invoice

Error: An error access is raised, he can not post the invoice

In the invoice posting process, we try to read some other models
(pos order, SVL, and so on) but the user has not any access to them

OPW-3302458

closes odoo/odoo#130301

X-original-commit: fbd8c96d0ea097a23fc1e283721f8219fe7ebcd0
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-08-02 05:10:14 +02:00
Didier (did) a1c079bbf1 [FIX] mail: fix nextMentionRpcFunction
Before this PR, the `nextMentionRpcFunction` was always undefined and therefor
never used. This could lead to some RPC being lost if the previous one was too
slow.
This PR fix the issue by directly using the `rpcFunction` that is already assigned.

closes odoo/odoo#130292

X-original-commit: fff3323cb82fb51dbbe8ac6790479530bbc51ba9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-02 05:10:10 +02:00
Kevin Baptiste fef71bac14 [IMP] hr,hr_recruitment: add Newly Hired filter
Moves the Newly Hired search filter from hr_recruitment to hr.
This new filter is available to all employees and not restricted to Officers.

task-3346478

closes odoo/odoo#123420

Related: odoo/upgrade#4759
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-08-02 02:24:46 +02:00
Adrien Minne (adrm) 5c37116a99 [FIX] spreadsheet: fix list context menu traceback
There was a traceback when right clicking on a spreaded cell beacause
of the list "see record" context menu item. Fixed it.

closes odoo/odoo#130289

Task: 3425493
X-original-commit: 330381dbeac9a4783d7cef8130471d81be214504
Related: odoo/enterprise#44892
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-08-02 01:15:56 +02:00
Antoine Dupuis (andu) daacd9adc0 [FIX] l10n_eu_oss: Create OSS account with correct tags
Bugfix. When installing l10n_eu_oss with l10n_de_skr03, an OSS account
'17010 Unsatzsteuer 19% OSS' is created. However, this account has
no account tags set on it, so it gets left out from the Balance Sheet
report. (Note that in Germany, due to there being two CoAs, the Balance
Sheet report still works using account tags.)

The solution: when creating the OSS account, re-use the account tags
of the account we are copying.

closes odoo/odoo#130287

X-original-commit: f541ef903085ed95b0aa0bc6d3e82bf9efa2a23d
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-02 01:15:53 +02:00
Victor Feyens d364c0a57f [FIX] sale: unreliable test
The test test_product_quantity_rounding fails when the currency
of the company rounds to the unit (decimal places = 0).

This commit makes sure the test doesn't fail with that setup.

Cf runbot build error 20612

closes odoo/odoo#130285

X-original-commit: fae7beacd950fcc349728f98681b6aa281572aa4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-02 01:15:49 +02:00
Gauthier Wala (gawa) b6dfc455cc [FIX] account: Fix tour in multi enterprise
The tour failed as soon as there were several companies installed.
The tax created could be assigned to the wrong company, and as such,
not used in the tour.

Linked to runbot error 22953

closes odoo/odoo#130281

X-original-commit: a4ad0a8f36f4091da5de99c5a54326dce3784817
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-08-01 23:52:36 +02:00
Aaron Bohy c10b5d0b1b [REF] web,*: tests: remove legacyExtraNextTick
Now that most of the webclient codebase (fields, views, client
actions...) has been converted to owl, the legacy extra next tick
used in a lot of tests is no longer necessary. This commit removes
the helper and its usage. At some places, a real tick was needed,
but we didn't see it because of the use of the legacy extra next
tick.

Part of task~3439226

closes odoo/odoo#130236

Related: odoo/enterprise#44869
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 23:52:30 +02:00
Pedram (PEBR) a18b19284f [FIX] mail: TypeError in cleanTerm function when email is falsy
The `cleanTerm` function was throwing a TypeError ("term.toLowerCase is
not a function") when the email value of a contact was falsy (like
`false`, `null`, or `undefined`), as it was attempting to call
`toLowerCase` on a non-string value.

This was particularly problematic when two contacts had the same name
and at least one of them didn't have an email.

The solution was to make `cleanTerm` consider non-sring values as
empty string, preventing the TypeError when value is `false` from
partner having no email.

opw-3439376

closes odoo/odoo#130233

X-original-commit: 2abdf7a8635ed90f0ad26c6407b21cf3c8c60fcd
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-01 23:52:26 +02:00
Victor Feyens c2c35f32cc [FIX] product: default pricelist should take precedence over new ones
The default pricelist automatically created for companies if the pricelists
are enabled should (like it was before with the Public Pricelist record in
the data) take precedence over newly created pricelists record.

This can be enforced by creating the default pricelist with a higher priority
(lower sequence).

closes odoo/odoo#130232

X-original-commit: ea1e83514bd6190a516f2cf92f800625876b789e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-01 22:31:01 +02:00
Victor Feyens 13bfb9eecd [FIX] product: correctly create/unarchive default pricelist when enabled
X-original-commit: 5e8547288f83e484ced67c4e44fda6df544f3c09
Part-of: odoo/odoo#130232
2023-08-01 22:31:00 +02:00
Renilkumar Kajavadra 8f1565dd74 [FIX] l10n_it_edi: logger error to warning while receiving file from SdiCoop
When there is an error in the proxy for incoming file for specified proxy user
from SdiCoop.
It will raise proxy error in the terminal.

This commit will change logger error to logger warning.

sentry-4297451894

closes odoo/odoo#130229

X-original-commit: a2882524371f39b210984c50b5702f142dff76ee
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-08-01 22:30:55 +02:00
tsm-odoo a6bc6d00da [FIX] mail, im_livechat: fix channel member wrap
Both language and country are displayed in the channel member list. Before this
commit, this was displayed in one line when available which looked bad. This
commit allow those items to wrap for a better display.

closes odoo/odoo#130220

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-01 22:30:51 +02:00
Sébastien Theys f9aedceb9f [REF] mail, im_livechat, *: move code and remove patches from sidebar
* = hr_holidays

Part of task-3265211

closes odoo/odoo#130003

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-01 22:30:47 +02:00
Géry Debongnie 600bd9c81f [IMP] web: only display technical tooltips if debug is set in url
This commit aims to minimize a very annoying issue that comes up
frequently: it is often necessary to go in debug mode to configure odoo
for a demo. Then, if we don't explicitely remove debug mode, it will
persist (because it is stored in the session). As a result, technical
tooltips will be visible during the demo, which may be distracting and
give a bad impression, because these tooltips are designed to provide a
lot of technical information.

It is not clear how we could solve the problem. Many questions arise
when discussing the issue:
- splitting technical and debug mode
- removing debug mode from the session
- but still making sure tests works
- what information should be displayed in ui?
- if debug mode is not persistant, find a way to make it temporarily
active

There are a lot of different opinions and needs that are not easily
solved.  This commit does not pretend to solve them, it is just a quick
way to reduce the issue mentioned above, by changing the JS code to only
use debug mode if it is explicitely set from the url.

Concretely, it means that the "js" specific debug features are
configured only with the debug parameter in the url:
- technical tooltips
- owl props validation
- displaying the debug menu

The rest will keep working as before:
- debug=assets
- debug=tests
- additional menu items/fields

Again, this commit is just a quick fix, until someone can find a spec
that get enough traction.

closes odoo/odoo#130060

Taskid: #3255925
X-original-commit: 59f49d6a8c856a5d8ca28dcfd7840baaa1c7672f
Related: odoo/enterprise#44783
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-08-01 17:56:45 +02:00
Nicolas Bayet 1feeeda8b8 [FIX] web_editor: synchronise fields with oe_unremovable
When the mechanism that synchronise odoo fields contained an
unremovable, even though no unremovable got removed, the Odoo editor
would rollback as the syncing mechanism would set innerHTML to the
synced nodes, which would remove the unremovable. To prevent the
rollback in that kind of circumstance, this commit introduce a new
method on the OdooEditor `withoutRollback`.

task-3436834

closes odoo/odoo#129320

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-01 15:09:24 +02:00
Deependra Solanki 0c4d747aaf [IMP] web_editor: different numbered list marker at each level
Purpose:

To make the marker of a ordered list different at each level.
- Numbers for first level.
- Alphabets for second level.
- Roman numbers for the third level.
looping back to numbers if nested further.

To make the marker of a unordered list different at each
level.
- Disc for first level.
- Circle for second level.
- Square for the third level.
looping back to disc if nested further.

task-3412826

closes odoo/odoo#128532

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-01 15:09:17 +02:00
Valentin Vallaeys (vava) b610f2502d [FIX] (stock_)delivery: move test for real invoice on back order
In this commit*, the forward-ported test was not moved with the fix on
stock.picking from delivery to stock_delivery, although the test relies
on real invoicing, which is defined in stock_delivery.

Fixes build error 22434

* e1e04f3a176e15fdce81ce3036093d3951401f52

closes odoo/odoo#130217

X-original-commit: 5518daae14aa91e3c2c6723c6059f337c6ee0914
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-08-01 13:51:47 +02:00
Valentin Vallaeys (vava) feb15f6be6 [FIX] website_sale: fix tour on free delivery
The tour was using a payment provider that was not installed. This
commit makes sure the test only runs when the payment provider is
installed.

Fixes build error 19829

closes odoo/odoo#130214

X-original-commit: ba75b1c023988e17852821ddaf32163c2e2f9d6e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-08-01 13:51:44 +02:00
Rodolpho Lima cdc8e4daad [FIX] web_editor: images stored as base64-encoded sources
Commit [1] introduced an option in the Wysiwyg widget to save pasted
and dropped images as attachments instead of keeping them as inline
base64-encoded sources.

In order to prevent records from having excessively large sizes in their
html field content, this commit makes such option the default one for
the Wysiwyg class.

task-3289061

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

closes odoo/odoo#130213

X-original-commit: 7e06b40ea58f58069729f881f7d4559d17778fe7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-01 13:51:40 +02:00
Rodolpho Lima eca5bfae0f [FIX] website: missing super call in _getEditorOptions
Since the refactor done in [1], the default Wysiwyg options is not
applied to the final options object when the website's
WysiwygAdapterComponent is instantiated. This happened because the
`_getEditorOptions` method is overriden without calling `super`.

As a result, before this commit, commands like "video" or "image" were
no longer available when editing text in website, as the options that
enable such commands were missing.

This commit fixes it by calling super in the overriding method.

[1]: https://github.com/odoo/odoo/pull/118966/commits/fed6569c9671c61269ed7ffa3bfcdb919a0daf14

X-original-commit: 9f2ebb7ffa3742d7da369f5020d57317c5a1794a
Part-of: odoo/odoo#130213
2023-08-01 13:51:40 +02:00
Victor Feyens f5de88f3b5 [FIX] sale: failing test with localizations
The test verifying the values of the sale report in a multi-comp & multi-curr
environment relies on the fact that the main company is by default in USD.
Nevertheless, the test fails when a localization is installed (if it changes
the currency of the main company).

This commit makes sure the tests always works, and resurrects the right tool
for that, which was dropped in commit 3752b3166e.

Cf runbot build error 22351

closes odoo/odoo#130201

X-original-commit: a73b5fce4fb02eefc681c55eab8f57cd35105226
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-08-01 13:51:32 +02:00
Pierre Pulinckx (pipu) 60fe2e9b17 [REF] *: remove _lt()
In a previous commit 8bfa76a, _lt() returns _t().
So, in this commit, all usages of _lt() are replaced by _t().

task-3292454

closes odoo/odoo#130179

Related: odoo/enterprise#44906
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-01 13:51:17 +02:00
Aaron Bohy 9ed6036861 [REF] web: RelationalModel: add option to display invalid notif
This commit removes a function from the Record datapoint, and
replaces it by an option to checkValidity, as we want Record to
have a few public methods as possible.

Part of task~3179751

closes odoo/odoo#130170

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 10:55:51 +02:00
Aaron Bohy 9d81cff6fd [REF] *: remove always_reload many2one option from archs
This option is no longer necessary since [1] as the value is now
reloaded by default.

[1] odoo/odoo#114024
Part of task~3179751

closes odoo/odoo#130169

Related: odoo/enterprise#44838
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-08-01 09:40:55 +02:00
Leloup Loïc (lole) b3740bc5ce [FIX] mail : fix activitycell date
When on helpdesk app (or any app with an activity view), if you go on the
activity view while having activities due on a previous year it will
cause a traceback "TypeError: date.toLocaleDateString is not a function"

This happens because the function tries to call toLocaleDateString on a
datetime variable, not a date one.

opw-3432005

closes odoo/odoo#130090

X-original-commit: 81ec723b3956f198d5de99a5a4214359f67b8327
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-01 08:39:24 +02:00
FrancoisGe 6424edb254 [FIX] *: convert record.data.id => record.resId
Since the relational model was rewritten (PR 114024), the record id is
no longer present in data by default. The correct way to access the id of
a record is to do record.resId.

closes odoo/odoo#130061

Related: odoo/enterprise#44785
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-08-01 07:04:57 +02:00
miad-odoo 7bc89a1c34 [FIX] base: fix traceback install demo data
This commit fixes a traceback when trying to install demo data from the UI.

Steps to reproduce:
	- create a database with website_event_track_live installed and without demo data
	- load demo data from the UI (settings)
	- odoo.exceptions.AccessError: You are not allowed to create 'Website Visitor'
(website.visitor) records.

There is a traceback because the installer can't create `website_visitor`
records because there are no groups that have create access rights for that
model.

This is because xml_import used to get an environment with root privileges, that
can bypass access rights, but now the environment is a parameter passed to the
function and doesn't necessarily have sudo

This change was introduced in
5bf1207#diff-8e4705d5ab335a8dfc2c70eeedc502a92695989f97c4f19184b49634c2c4ad55L583-R583
; with this commit, the environment used by xml_import doesn't necessarily have
sudo, so we simply make sure `load_demo` loads data with sudo.

Task-3202914

closes odoo/odoo#129946

X-original-commit: 85834371e0eede05858cb2dc33412396c6e5c5bf
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Adrien Milis (miad) <miad@odoo.com>
2023-08-01 07:04:53 +02:00
Thomas Beckers 6176d14500 [FIX] l10n_es_edi_sii: trim DescripcionOperacion for complience
Based on the SII documentation, DescripcionOperacion should have max 500
characters. Since it's based on invoice_origin field it can exceed this limit.

Now this value will be trimmed to the first 500 characters.

opw-3421094

closes odoo/odoo#130184

X-original-commit: 876d1a216eda4eb9ea1b3eb15a94cea10c4f25f9
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-08-01 05:59:54 +02:00
Jurgen (jugj) f05bfd6d52 [IMP] hr : Add job_id to employee form view
task-3373010

closes odoo/odoo#130182

X-original-commit: 0ec1d07fc3dce383efb709b0067939bd13e5e2eb
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Jurgen Gjini (jugj) <jugj@odoo.com>
2023-08-01 05:59:51 +02:00
Alexandre Kühn d1dbff25eb [FIX] mail: mention suggestions at bottom on editing chatter message
Before this commit, when editing a message in chatter and
typing `@` to display mention suggestions, the list changed
position between `top` and `bottom` based on content size of
suggestion list.

This happens because by default suggestion list in composer are
positioned `top`, as most composers are at the bottom of screen,
and message to be edited are recent messages, which are usually
at the bottom of screen.

Chatter is special in that composer is at the top of the screen,
and recent messages are shown at the top of screen too. The better
position in this configuration is `bottom`.

Condition was on composer being linked to chatter thread, which is
the case when posting a message for the 1st time. While editing a
message however, the composer is linked to a message and not a
thread, therefore the condition `thread?.type === 'chatter'` was
falsy and default position `top` was chosen. Due to position being
a recommendation and placement of composer at the top of screen,
with many mentions it was displayed at `bottom`, and with few
suggestions it changed to `top`.

This commit fixes the issue by relying on the context of the
composer with `env.inChatter`, which covers all chatter used in the
displaying of chatter with composer at the top, including when
editing a message.

closes odoo/odoo#130106

X-original-commit: a03705d0f55e887ec05cb41d7cf86db748f77955
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-08-01 04:32:07 +02:00
Maximilien (malb) b59e4f73b9 [FIX] account: automatic entries crash
When having a python format in the ref (or memo) of a payment, going to journal
items, select the move and doing an automatic entries, when changing the account
 a traceback appears.

 In the _format_new_transfer_move_log, we create a format that will be put in
 the chatter. In this message we use python format without considering the
 possibility that we can have one in the link of the move.

 By putting the python format before formatting the link, the issues is solved.

 task: 3434131

closes odoo/odoo#130091

X-original-commit: 12e0e6a492a010d61a8a1f763c72e25765654511
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2023-08-01 04:31:56 +02:00
FrancoisGe 9d2656720c [REF] *: remove model.notify()
Since the relational model was rewritten (PR 114024), it is now reactive,
so it is no longer necessary to use model.notify() to render the view.

closes odoo/odoo#130058

Related: odoo/enterprise#44781
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-31 23:21:18 +02:00
tsm-odoo b5896c9d03 [IMP] *: add generic make_jsonrpc method in tests
*: bus, crm_livechat, crm_mail_plugin, im_livechat, payment, payment_demo,
pos_online_payment, test_discuss_full, test_mail_full, tests, website_livechat,
website_sale.

Several python tests have their own way to make jsonrpc requests. This PR adds a
generic `make_jsonrpc_request` method to the `HttpCase` in order to provide a
generic way to do so.

At the same time, calls to `_open_livechat_channel` are removed in favor of
jsonrpc request to `get_session`. This makes the tests more realistics (some
incoherences were present like passing `country_id` to the open channel method
while the user country id is not set...)

Finally, this will ease the diff in the PR introducing livechat visitors as mail
guests.

part of task-3332628

closes odoo/odoo#130036

Related: odoo/enterprise#44840
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-31 23:21:10 +02:00
Samuel Degueldre 8f68a146bf [IMP] web: check for undesirable module dependencies
Previously, we have accidentally made some core modules depend on some
modules outside of the core folder (eg views), this is undesirable as it
can make assets bundle hard to write using globs, and can make it easy
to introduce circular dependencies, it also doesn't make sense from a
code-organisation perspective.

This commit introduces a QUnit test that checks the modules in some
folders only depend on other whitelisted folders.

closes odoo/odoo#129982

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-31 20:54:01 +02:00
Julien Alardot (jual) 55f8f3b1c0 [FIX] hr_expense: fix create report button
On the hr.expense.tree view the create report button
raises an error since some recent framework refactor
This applies the related changes missed during the refactoring

related commit: 8723f020c3

closes odoo/odoo#129910

Task-id: None
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-31 20:53:58 +02:00
Pierre Rousseau 036307ba26 [REM] web, *: remove legacy dialog
OwlDialog is not used anymore, therefor we can remove it.

Task-id 3439226

closes odoo/odoo#129774

Related: odoo/enterprise#44634
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-31 19:02:58 +02:00
Pierre Rousseau 3b2ba11b20 [REF] website_sale_product_configurator: remove legacy dialog
This commit replaces the legacy dialog by the new one.

Part of task-id 3439226

Part-of: odoo/odoo#129774
2023-07-31 19:02:58 +02:00
Pierre Rousseau 72dbb75d4d [REF] web, barcodes: remove legacy dialog
This commit replaces the legacy dialog by the new one.

Part of task-id 3439226

Part-of: odoo/odoo#129774
2023-07-31 19:02:57 +02:00
niyasraphy 83ed99d973 [IMP] account: remove unused function
before this commit, the create_cash_statement function
defined in the journal model is not called from any
where.

left over in:  https://github.com/odoo/odoo/commit/9299f81f19a87d6e6eb9ee19a79d96d3fb1050b2

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

closes odoo/odoo#129304

Related: odoo/enterprise#44453
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-31 19:02:49 +02:00
Pierre Pulinckx (pipu) 3bc94e52ce [REF] *:Replace moment usages with luxon
luxon and moment are both used in the solution,
but these two libraries facilitate the manipulation
of dates. It was decided to replace all uses of
moment with luxon so we can then remove
moment.js from the code and lighten the assets.

task-3391739

closes odoo/odoo#128752

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-07-31 19:02:45 +02:00