Commit Graph
153409 Commits
Author SHA1 Message Date
Habib (ayh) 4f4e31c623 [IMP] account: mail activity kanban widget - owl migration
Part-of: odoo/odoo#96672
2022-08-27 19:01:12 +02:00
Habib (ayh) c2e3f94bde [IMP] account: open_move_widget owl migration
Part-of: odoo/odoo#96672
2022-08-27 19:01:12 +02:00
Habib (ayh) 41b32b47c4 [IMP] account: account_type_selection widget owl migration
Part-of: odoo/odoo#96672
2022-08-27 19:01:12 +02:00
Habib (ayh) 3d08246818 [IMP] account: fixes for owl. underscore.js removed
Part-of: odoo/odoo#96672
2022-08-27 19:01:11 +02:00
Habib (ayh) 43f516e90d [IMP] web: file_uploader: callback after all files have been uploaded
Part-of: odoo/odoo#96672
2022-08-27 19:01:11 +02:00
Habib (ayh) db008ff03a [IMP] account: bills upload wowl migration
Part-of: odoo/odoo#96672
2022-08-27 19:01:11 +02:00
Habib (ayh) b0ee5be676 [IMP] account: account_payment_field wowl migration
Part-of: odoo/odoo#96672
2022-08-27 19:01:11 +02:00
Habib (ayh) 5a21823f43 [IMP] account: section_and_note_fields wowl migration
Part-of: odoo/odoo#96672
2022-08-27 19:01:10 +02:00
EmanAliYousef 305e2ffd78 [CLA] signature for EmanAliYousef
closes odoo/odoo#99052

X-original-commit: db0084f3753e67480a7a9ed81b28a78d6fb2161a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-27 11:40:22 +02:00
tafaRU 3c5975e4d4 [CLA] Agile Business Group
closes odoo/odoo#99061

X-original-commit: 02b4e98ebb2c45d9a4af10fe1bc732f048708f85
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-08-27 09:24:55 +02:00
aliya 2de3e3cbe5 [FIX] account: constrain foreign currency in bank statements
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

closes odoo/odoo#99028

X-original-commit: 1dfa3d074c7368abb51df56cb7fd1ee5115399b1
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2022-08-27 07:06:48 +02:00
Alexandre Kühn b8f0ccf6ed [FIX] im_livechat: properly display operator avatar in posted message
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`.

closes odoo/odoo#99022

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-27 05:25:53 +02:00
Alexandre Kühn 0d06e5aae8 [FIX] im_livechat: make bubble background behind message content
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.

closes odoo/odoo#99020

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-08-27 05:25:50 +02:00
Romain Derie c5a10d2cd7 [FIX] web_editor: prevent sizing to trigger changes events on focus
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

closes odoo/odoo#99014

X-original-commit: 66213cfb33f4545d4c70af1a72c3db47ca687e92
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-08-27 03:34:12 +02:00
Romain Derie 7859df06cd [FIX] website: mark steps snippet as not working in sanitized fields
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
2022-08-27 03:34:12 +02:00
Ivan Yelizariev d05effb6b3 [FIX] account_edi{,_facturx}: properly retrieve product/description
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

closes odoo/odoo#99006

X-original-commit: c5e08b8dcb9041235721afb99a5d05a0f51789e4
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2022-08-27 03:34:07 +02:00
William Braeckman 3754600694 [FIX] website_sale: fix cart popover
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.

closes odoo/odoo#98991

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-08-27 03:34:01 +02:00
Alexandre Kühn c0532b6aec [IMP] im_livechat, *: Refactor JS Public Livechat (step 15)
*: 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

closes odoo/odoo#98987

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-08-27 03:33:58 +02:00
Laurent Smet 8b1ed8e510 [REV] account: cash discount improvements
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.

closes odoo/odoo#98986

Related: odoo/enterprise#30783
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-08-27 03:33:55 +02:00
Abdelouahab (abla) 124ae0f340 [FIX] hr_attendance: take into account employee's leaves
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

closes odoo/odoo#98969

X-original-commit: 3da24993f5ad6d7b56ee332589ff822eac8ada5c
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-27 03:33:43 +02:00
Jinjiu Liu 7130939bcd [FIX] product: a temporal variant copy for future convenience
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

closes odoo/odoo#98809

X-original-commit: 34a2948d3d6e0f597c1b5d65f9f118e891c07cc4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
2022-08-27 03:33:39 +02:00
Camille Spiritus b373d12252 [IMP] account: import soda files
Added ids necessary for the soda files to be imported on l10n_be.

see https://github.com/odoo/enterprise/pull/30680

closes odoo/odoo#98904

Related: odoo/enterprise#30680
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2022-08-27 03:33:36 +02:00
Pierre Paridans 062ef13483 [FIX] web: restore sizing for XXL Form View
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.

closes odoo/odoo#98686

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-27 03:33:30 +02:00
debu-odoo 71fb845fb5 [IMP] stock_picking_batch: added Draft checkbox in batch wizard
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

closes odoo/odoo#97084

Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-08-27 03:33:15 +02:00
Daniel Blanco b4772177e6 [FIX] l10n_cl: add l10n_cl_activity_description field to community
since this value is used as a required field in website sale
[FIX] l10n_cl: add activity description field to company

closes odoo/odoo#95964

Related: odoo/enterprise#29462
Related: odoo/upgrade#3764
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-08-27 03:33:07 +02:00
Valentin Chevalier 7612de7227 [FIX] payment(_transfer): only leave the status page when state is final
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

closes odoo/odoo#95933

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-08-27 03:33:03 +02:00
sofiagvaladze 40a82e1fe4 [IMP] hr_expense,sale_expense: UX improvements
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

closes odoo/odoo#93802

Related: odoo/enterprise#28474
Related: odoo/upgrade#3778
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-27 03:32:54 +02:00
Pierrot (prro) edfcb5e626 [MOV] account: move reconciliation scss to enterprise
The commit https://github.com/odoo/enterprise/commit/0063d7d6a09c16716dcd9125c291a1041f9ed255
forgot to include the corresponding scss file.

closes odoo/odoo#98920

Related: odoo/enterprise#30748
Signed-off-by: Laurent Smet <las@odoo.com>
2022-08-26 23:15:51 +02:00
Samuel DegueldreandAchraf Ben Azzouz b9bdf2a139 [FIX] web: display translation alert after status bar
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.

closes odoo/odoo#98434

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Achraf Ben Azzouz <abz@odoo.com>
2022-08-26 21:36:58 +02:00
Brieuc-brd 8fa6e923d0 [REF] web, website: FormView, review and simplify scss
Review, simplify SCSS and adapt legacy code.
Part of the overall v16 SCSS optimization/restyle, task-2704984

task-2918464

closes odoo/odoo#98101

Related: odoo/enterprise#30421
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-08-26 18:41:36 +02:00
Brieuc-brd d84af2aa46 [MOV] web: move FormView variables into the component folder
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
2022-08-26 18:41:35 +02:00
Rob Coekaerts e1a580b013 [IMP] hr: streamline user creation from employee form
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

closes odoo/odoo#97632

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-08-26 18:41:29 +02:00
Xavier Morel cf221d4ba7 [ADD] cli: db manager
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.

closes odoo/odoo#97365

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-08-26 18:41:26 +02:00
aliya 514ff773a2 [IMP] account, base_import: improve accounting import
- 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

closes odoo/odoo#96291

Related: odoo/enterprise#29627
Related: odoo/upgrade#3794
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-08-26 17:16:52 +02:00
svs-odoo 81c801c894 [IMP] mrp: BoM overview button in forecast report
In the product's forecast report, if the product has a BoM, a button is
displayed to go to the BoM overview report.

task-2628323

closes odoo/odoo#93194

Related: odoo/enterprise#28191
Related: odoo/upgrade#3686
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2022-08-26 17:16:42 +02:00
clesgow 2b2a7712e1 [IMP] mrp: Add automatic Days to Prepare MO
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
2022-08-26 17:16:42 +02:00
clesgow a974290237 [IMP] mrp_subcontracting_purchase: Buy route for BoM Overview
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
2022-08-26 17:16:42 +02:00
clesgow 5e2d48fbfa [REF] mrp_subcontracting: Adapt subcontracting for BoM Overview
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
2022-08-26 17:16:41 +02:00
clesgow 42f1d31130 [IMP] purchase_mrp: Buy route for BoM overview
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
2022-08-26 17:16:41 +02:00
clesgow 02cd750da6 [REF] mrp: change BoM Structure&Cost into Overview
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
2022-08-26 17:16:41 +02:00
Odoo's Mergebot a6791e3b95 [IMP] web_editor: handle advanced table edition
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

closes odoo/odoo#92200

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-26 17:16:34 +02:00
Antoine Guenet f35f62599d [REF] web_editor: remove add(Row|Column)(Left|Right|Above|Below)
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
2022-08-26 17:16:33 +02:00
Antoine Guenet aca5aea475 [FIX] web_editor: prevent triggering color_leave after color_picked
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
2022-08-26 17:16:33 +02:00
Antoine Guenet 7a64a04421 [ADD] web_editor: add UI for tables
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
2022-08-26 17:16:32 +02:00
Antoine Guenet aaea489f6d [ADD] web_editor: apply colors to whole selected table cells
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
2022-08-26 17:16:32 +02:00
Antoine Guenet f3cff78472 [ADD] web_editor: allow drag and drop table resizing
This allows the user to grab table borders in order to resize its rows
and columns.

task-2858455

Part-of: odoo/odoo#92200
2022-08-26 17:16:32 +02:00
Antoine Guenet d8ec51f47a [ADD] web_editor: when hovering a table border, use the resize cursors
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
2022-08-26 17:16:32 +02:00
Antoine Guenet 3d9be78fbc [ADD] web_editor: support gdocs style selection in table
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
2022-08-26 17:16:31 +02:00
Antoine Guenet 7da2b1f2a8 [FIX] web_editor: properly size new rows added with TAB
New rows added with TAB in a table were missing a <br> in each cell,
making them appear less tall.

task-2858455

Part-of: odoo/odoo#92200
2022-08-26 17:16:31 +02:00
Antoine Guenet 3da301fcb2 [IMP] web_editor: change selection color in editable
Update the blue text selection color to #bad3fc.

task-2858455

Part-of: odoo/odoo#92200
2022-08-26 17:16:31 +02:00