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.
closesodoo/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>
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
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
closesodoo/odoo#130323
X-original-commit: e00e253658cb0eefa8ea0f726f0a3bec6eaca7e6
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
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.
closesodoo/odoo#130319
X-original-commit: a2c693795081953ed0ba07bfad210701fcf6f1f0
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/odoo#130318
X-original-commit: d6171eb1c0e94cb1a22241dd250bc23247de3481
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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
closesodoo/odoo#130315
X-original-commit: c55f01cff7e415c48f823201ace63074bf9a9146
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
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.
closesodoo/odoo#130310
X-original-commit: 11a4beea5cbcd817cca02d81b772a5e8b3d097b6
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
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
closesodoo/odoo#130301
X-original-commit: fbd8c96d0ea097a23fc1e283721f8219fe7ebcd0
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
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.
closesodoo/odoo#130292
X-original-commit: fff3323cb82fb51dbbe8ac6790479530bbc51ba9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#123420
Related: odoo/upgrade#4759
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
There was a traceback when right clicking on a spreaded cell beacause
of the list "see record" context menu item. Fixed it.
closesodoo/odoo#130289
Task: 3425493
X-original-commit: 330381dbeac9a4783d7cef8130471d81be214504
Related: odoo/enterprise#44892
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
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.
closesodoo/odoo#130287
X-original-commit: f541ef903085ed95b0aa0bc6d3e82bf9efa2a23d
Signed-off-by: John Laterre (jol) <jol@odoo.com>
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
closesodoo/odoo#130285
X-original-commit: fae7beacd950fcc349728f98681b6aa281572aa4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#130236
Related: odoo/enterprise#44869
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
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
closesodoo/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>
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).
closesodoo/odoo#130232
X-original-commit: ea1e83514bd6190a516f2cf92f800625876b789e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
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
closesodoo/odoo#130229
X-original-commit: a2882524371f39b210984c50b5702f142dff76ee
Signed-off-by: John Laterre (jol) <jol@odoo.com>
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.
closesodoo/odoo#130220
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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>
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
closesodoo/odoo#129320
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
closesodoo/odoo#128532
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
closesodoo/odoo#130217
X-original-commit: 5518daae14aa91e3c2c6723c6059f337c6ee0914
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
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
closesodoo/odoo#130214
X-original-commit: ba75b1c023988e17852821ddaf32163c2e2f9d6e
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
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/b8e7fb4a5ec8c75deff37dc1737b6a3d3b123cc3closesodoo/odoo#130213
X-original-commit: 7e06b40ea58f58069729f881f7d4559d17778fe7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
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
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
closesodoo/odoo#130201
X-original-commit: a73b5fce4fb02eefc681c55eab8f57cd35105226
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
In a previous commit 8bfa76a, _lt() returns _t().
So, in this commit, all usages of _lt() are replaced by _t().
task-3292454
closesodoo/odoo#130179
Related: odoo/enterprise#44906
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
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
closesodoo/odoo#130170
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
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
closesodoo/odoo#130090
X-original-commit: 81ec723b3956f198d5de99a5a4214359f67b8327
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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.
closesodoo/odoo#130061
Related: odoo/enterprise#44785
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/odoo#129946
X-original-commit: 85834371e0eede05858cb2dc33412396c6e5c5bf
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Signed-off-by: Adrien Milis (miad) <miad@odoo.com>
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
closesodoo/odoo#130184
X-original-commit: 876d1a216eda4eb9ea1b3eb15a94cea10c4f25f9
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
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.
closesodoo/odoo#130106
X-original-commit: a03705d0f55e887ec05cb41d7cf86db748f77955
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
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
closesodoo/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>
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.
closesodoo/odoo#130058
Related: odoo/enterprise#44781
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: 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
closesodoo/odoo#130036
Related: odoo/enterprise#44840
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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.
closesodoo/odoo#129982
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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: 8723f020c3closesodoo/odoo#129910
Task-id: None
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
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
closesodoo/odoo#128752
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>