On a bank statement line:
If a foreign currency is set and the amount in currency is not set, the line is reconciled automatically (because the amount is 0) and this should not be the case.
Add a constraint on `account.bank.statement.line`: raise an error if the foreign currency is added, but the amount in currency is not.
This conflicts with the tests that allow this behaviour, so the related tests are deleted as this should not be allowed anymore.
task-2956422
closesodoo/odoo#99028
X-original-commit: 1dfa3d074c7368abb51df56cb7fd1ee5115399b1
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
Before this commit, avatar of operator was not displayed properly.
This is due to src of avatar being wrongly computed: the serverUrl
data is in `PublicLivechatGlobal`, not in `LivechatButtonView`.
Because of this, the src was prefixed with `undefined/` instead
of the server url, hence no displaying the avatar of operator.
This commit fixes issue by getting actual `serverUrl` in correct
model `PublicLivechatGlobal`.
closesodoo/odoo#99022
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, bubble background was on top of message content.
This prevent user interaction on the message.
This commit fixes the issue by properly putting background behind text.
closesodoo/odoo#99020
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this commit, when one was clicking/focusing an element which was
receiving the sizing option(s), it would directly trigger some onchanges
internal events, even if no changes were done yet.
One of those events was `change_column_size` directly called on the
steps snippets options.
That event was then listened by the steps options and was making the
connector to be reloaded.
While it was useless as there were no real changes yet (just focused),
it was also leading to a traceback if one was clicking on an outdated
steps snippet, for instance after a migration from v15.
In saas-15.1, the connectors were improved with [1] and became svg
elements instead of pseudo elements.
The internal method reloading the connector thus can't find those
selectors on an outdated snippet.
This commit now splits the code in 2, to extract the firing of the
onchange events when there is actually some changes.
This will allow to click on outdated steps snippet without having a
traceback as the code won't try to reload the connectors anymore.
That outdated block will then be marked as such in the right panel and
the user will be able to delete it to recreate it if needed.
Remember than without this commit, since there would be a traceback, the
whole current page edition / changes would simply be lost.
[1]: https://github.com/odoo/odoo/commit/aba31e9f2d8a44ce1586403f2a621a6caeed57b4
opw-2895569
closesodoo/odoo#99014
X-original-commit: 66213cfb33f4545d4c70af1a72c3db47ca687e92
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Since [1] the website builder is able to warn and prevent a user that a
snippet is not going to be able to be saved in a field if that field is
going to be sanitized.
Back then, we didn't mark the steps snippets as such as we were planning
to make it work in sanitized field by refactoring the JS code, as we did
for the s_map snippet at [2].
It was supposed to be done at [3] but was cancelled as it was making the
UX worst due to some flickering + we are also working on [4] to make the
sanitation conditional and able to be bypassed.
Note that the conflict with the sanitation for the steps snippet starts
in saas-15.2 with its connector improvement/ refactoring [5].
Those connectors are now svg elements targeted by the options, which
ultimately crash if those connectors are not found, which is the case
when the DOM is going through the sanitizer as it is removing SVGs.
[1]: https://github.com/odoo/odoo/commit/8920f7d09fe020c8f182b3ea1acbafcb955afdce
[2]: https://github.com/odoo/odoo/commit/c2e9bd0e60014b6a42931cf300e0f89f8cf7c225
[3]: https://github.com/odoo/odoo/pull/96734
[4]: https://github.com/odoo/odoo/pull/97398
[5]: https://github.com/odoo/odoo/commit/aba31e9f2d8a44ce1586403f2a621a6caeed57b4
X-original-commit: 515a7e1705bed48f10e844d0f183dddeda27277d
Part-of: odoo/odoo#99014
Odoo attaches factur-x doc to every invoice pdf. That data can be used to upload
invoice to another Odoo instance.
On uploading such an invoice, Odoo tries to find product in its DB. But it
doesn't work if original product has Sales Description which is by default
copied to line's Description (field `name`).
Fix it by searching by first line in the name value of factur-x. Product name
doesn't contain \n symbol in most cases anyway.
This commit doesn't fix factur-x doc generation because of stable version
policy. In next Odoo release we should use separate factur-x attributes for
product name and invoice line description.
opw-2878530
closesodoo/odoo#99006
X-original-commit: c5e08b8dcb9041235721afb99a5d05a0f51789e4
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
The cart popover was broken since the bootstrap changes as data that was
previously set on the jquery element upon creating the popover was not
set anymore.
closesodoo/odoo#98991
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
*: website_livechat
This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.
Task-2963842
closesodoo/odoo#98987
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Current task is not covered the whole cash discount feature. For now, we decided to revert the current feature and make a new more complete one later.
This reverts commit 7482aff6d7.
closesodoo/odoo#98986
Related: odoo/enterprise#30783
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
To Reporduce
=============
1. Create employee with Standard Working Schedule (100% presence / 40 hours / 08:00 - 12:00 & 13:00 - 17:00)
2. Create Time off type: Paid time off with following settings:
- Take time off in: Hours
- Deduct Extra Hours: No
3. Create a time off request for half a day for this employee (8/17/2022; morning)
4. Approve Time Off Request
5. Create an attendance record for this employee for the afternoon on this day (13:00 - 17:00)
Problem
=======
On the attendance report, this employee has -4:00 Extra Hours, which means that the leave wasn't taken into
account when computing Extra Hours
Solution
=========
to solve the issue we take into account the Employee's leaves when computing Extra Hours
opw-2956895
closesodoo/odoo#98969
X-original-commit: 3da24993f5ad6d7b56ee332589ff822eac8ada5c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Reproduction:
1. Create a dynamic attribute "dyn_att" with a couple of values
2. Create a product template "dyn_prod" with those attribute values
3. Create an order for "dyn_prod", this will trigger creating a variant
4. Make sure to check Variant Grid Entry in Sales Settings
5. Open variant form view of dyn_prod and edit it to allow duplication
6. Duplicating it leads to an error
Reason: copying the variant is not possible and disabled here:
https://github.com/odoo/odoo/pull/38303 For future convenience, maybe
it’s better to give a temporal working solution. The function
_create_first_product_variant is used in the product module but only
defined in its child module website_sale
Fix: copy the product template, create and return its first possible
variant. Added test for dynamic variant copy. change the definition
place of _create_first_product_variant to module product
opw-2790543
closesodoo/odoo#98809
X-original-commit: 34a2948d3d6e0f597c1b5d65f9f118e891c07cc4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
XXL Form View doesn't apply the right max-width (1320px instead of
1140px).
This is due to the precedence of the selector for `.o_xxl_form_view`
since https://github.com/odoo/odoo/pull/96627. Also this code block
applies to both legacy an new FormView instead of only the new one.
This commit fixes it by properly targetting the `.o_form_view` with the
`.o_xxl_form_view` and restores the previous behavior.
closesodoo/odoo#98686
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Purpose
=======
Confirm batch when `Draft` checkbox is unchecked.
So in this commit, we have added one `Draft` checkbox in the batch wizard.
While creating a new batch, if this `Draft` checkbox is checked then batch will be
create in draft state and if it's not then the batch will be create in confirm state.
TaskID - 2925593
closesodoo/odoo#97084
Signed-off-by: Tiffany Chang <tic@odoo.com>
Before this commit, customers never waited on the status page for their
payment to be confirmed. Instead, they were redirected to the landing
route before that the transaction reaches a final state.
Although this bug is present since version 15.0, it not considered as a
problem worth fixing in stable since redirecting customers in advance is
already supported. It is fixed in master to lay ground for further work
that will require customers to wait for the payment confirmation.
After this commit, customers will remain on the status page until their
transaction state is updated to a final state ('authorized', 'done',
'error'). An exception is made for Wire Transfer's payments that are
never confirmed and should not block the customer on the status page.
task-2908493
closesodoo/odoo#95933
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Major changes:
- converted list view to owl
- merged menus
- added CREATE REPORT button on hr.expense that reports either
ticked draft expenses, or all the draft expenses for the user
- added dynamic buttons on expense.sheet list view
- added searchpanel on expense.sheet for team approvers and above
- moved (and changed) expense categories from demo to data
- added support on drag'n'drop while in list and kanban view of
expense for quick upload
task - 2831036
closesodoo/odoo#93802
Related: odoo/enterprise#28474
Related: odoo/upgrade#3778
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The newly converted form view displays the translation alert above the
form renderer, but we want the translation alert to be present below the
status bar when there is one.
This commit fixes that by moving the display from the form controller to
the form renderer.
closesodoo/odoo#98434
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Achraf Ben Azzouz <abz@odoo.com>
This commit moves the form variables from primary_variables.scss to
the FormView folder.
Part of the overall v16 SCSS optimization/restyle, task-2704984
task-2918464
Part-of: odoo/odoo#98101
When selecting the action "Create User" from the employee view, use the available
employee information as default values for this new user. Additionally, make the
"Create Employee" option invisible as this is not relevant when the employee
already exists and save an extra click by closing the user form upon saving.
task-id 2942602
closesodoo/odoo#97632
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Currently dbs can only be managed via the UI in order to take
filestores in account: while it's possible to load/copy/rename/drop
databases via `psql`, that will not manage the related filestores so
the result of the operation is incomplete DBs and leftover filestores
littering the disk.
Seems like a good idea to add a CLI to perform the same
tasks. Currently the CLI calls into the corresponding service, rather
than both calling into (possibly better designed) unified APIs, but
that seems fine for an initial version.
The top-level `db` command acts as a db manager, with git-style
sub-sub-commands for the various operations:
- `load` to load a dump file into a database (with a specified name or
not)
- `dump` to dump a local db to a zip dump (pg_dump can be created via
the corresponding command so not a concern)
- `duplicate` and `rename`
- `drop` in order to drop both the database itself and the
corresponding filestore
Notably, `create` is currently left out because a database can
trivially be created by invoking odoo using a dbname which doesn't
exist, so doesn't seem useful.
`list` is also left out, because `psql -l` generally does the job.
closesodoo/odoo#97365
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
- Remove FEC from res.config.settings - everything is now linked in the import guide (in enterprise)
- Compute debit and credit from opening_balance
- Update import templates for account.account, account.move, res.partner
- Small UI changes in base_import: add an action title and improve the template button design
task-2888243
closesodoo/odoo#96291
Related: odoo/enterprise#29627
Related: odoo/upgrade#3794
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Since the new Overview report can compute the lead days and availability
delays from a BoM and all of its components and/or subassemblies, we can
use this data to compute the days that would be required to resupply all
components from a BoM.
So we add a button to compute it directly on the product form.
Task-2628323
Part-of: odoo/odoo#93194
Add additional requirement to identify buy route in BoM Overview report
if mrp_subcontracting is installed to not get confused between the two
cases.
Task-2628323
Part-of: odoo/odoo#93194
The 'Structure & Cost' report has been changed to 'Overview', changing
some of its functionnalities. The override previously done in
mrp_subcontracting must be adapted to match the changes done in the mrp
module.
Also, the report has been converted to OWL in the process, requiring
changes in the overriden files as well.
Finally, the now obsolete code only related to the old 'Structure &
Cost' report has been removed.
Task-2628323
Part-of: odoo/odoo#93194
Add support for "buy" route recognition in the BoM overview report, as
well as calculating receipt delay for this kind of route
Task-2628323
Part-of: odoo/odoo#93194
Changes "Structure & Cost" report to "Overview", as the goal for this
report is improved.
The point is to have on a single report all components and sub-assemblies
that make it up, in parallel with the route and lead times associated to
each. This way it becomes easier to identify issues, such as:
- Missing routes.
- Longer lead times on a specific sub-assembly.
- Unavailable component in the foreseable future.
- ...
Also did the conversion to OWL, changing drastically the structure of
the report.
Task-2628323
Part-of: odoo/odoo#93194
This adds many improvements to table editing in Odoo Editor, as well as some styling improvements.
New features :
- Rectangular cell selection
- Changing the color of a cell
- Buttons to add/remove/move rows/columns
- Resize rows/columns
task-2858455
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#92200
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The commands to add rows and columns in certain positions were
superfluous as commands to add rows and columns suffice if you pass them
a position argument.
Part-of: odoo/odoo#92200
When the user picks a color, the colorpicker closes, triggering
color_leave. This is conceptually wrong and can cause issues as it
reverts the current history step.
Part-of: odoo/odoo#92200
This adds a menu to manipulate table rows and columns when hovering
over them. Hovering over the first row shows the menu for the hovered
column.
Hovering over the first column shows the menu for the hovered row.
The buttons in the menu allow the user to add/move/remove rows/columns.
task-2858455
Part-of: odoo/odoo#92200
With this, when whole table cells are selected and the user picks a
color in the toolbar's colorpicker, that color is applied to the whole
cell rather than to the text only.
task-2858455
Part-of: odoo/odoo#92200
This adds the feature of showing the appropriate resize cursor depending
on which border (vertical or horizontal) is hovered in a table.
task-2858455
Part-of: odoo/odoo#92200
This adds the possibility to select whole cells, rectangularly rather
than line per line from left to right then top to bottom.
task-2858455
Part-of: odoo/odoo#92200