Before this commit when a dynamic snippet was fully configured but
returned no data, the rendered section remained empty in edit mode.
After this commit when a dynamic snippet is fully configured but has no
data to display, some sample data is generated in edit mode to give a
feel of how the page will look like when data will be available.
task-2446024
https://github.com/odoo/odoo/pull/65176
Purpose of the commit is to prevent the hierarchical name of
category in search panel.
So in this commit, Override the the name_get to prevent the category
hierarchy on search panel as we already displaying parent categroy
in search panel.
closes odoo/odoo#65442
Taskid: 2417252
Closes: #65442
Related: odoo/enterprise#15550
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, the preview of the dragged snippet didn't work
when moving a dragged snippet from a drop zone to an other drop zone
when there was no space between those drop zones.
It is because, in this case, the over event of the second drop zone is
triggered before the out event of the first drop zone.
task-2312878
closesodoo/odoo#66267
X-original-commit: 66b468626e046a13a463cff3a2285801016f3ed7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
In "Inventory Valuation", when click "Inventory at Date" then "confirm".
Record for consumable products will be shown in the report.
Previously fix in #62622 which disabled svl for consumable products,
then rolled back in #63386 due to mrp need to create svl for consumables
to analyse cost.
In this commit, we add a domian filter to not show consumables in
"Inventory Valuation"
Task 2449211
PR #65726closesodoo/odoo#66260
X-original-commit: 415a65f6b6da4a8aca394e189d72b93244af745b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>
Create a product with variants attributes that NEVER create variants.
Configure Variants to add some extra-prices (1$) to some variants.
In POS settings activate "Product Configurator" and
"Advanced Pricelists", add the public pricelist and one that applies 50%
to
the product.
Open a session and select the product created (say price = 1$)
Select the attributes, the extra-price is added to the product (say the
total price now is 2$).
Change pricelist from public to 50% and the order line will show our
product = 1@50% + 1 = 1.50, not applying the pricelist to the extra-price
opw-2439445
closesodoo/odoo#66251
X-original-commit: ee451c61550fc7577efa42e05f8d0094cb1513e1
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
The company is used to compute currency of:
- discount_fixed_amount
- discount_max_amount
- rule_minimum_amount
If currently we don't set a company, we have an error when using the
company.
opw-2458950
note: forward-port in master set the company field as required setting
it as required in the view.
closesodoo/odoo#66231
X-original-commit: d260dddcdeddecd2bc0649d948f5e0cc30607e09
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In some location, a long unbreakable word would cause following columns
to be hidden (depending on size of unbreakable word, font, font size,
...). For example, this happened in the cart summary on payment page.
With this changeset, if not possible otherwise, line break happen inside
the word.
opw-2451496
note: from 13.0 the shop product lists are inside .card so the h5
override (that is now h6) is not necessary.
note: also adds similar CSS propery for case where word-wrap doesn't
word (added in `#66194` for 12.0 up to 13.0).
closesodoo/odoo#66208
X-original-commit: 9193776417f9da3083ad5c2e1760d0dacfb6bd59
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
As `standalone` tests were introduced in 14.0 (see 0453566a76), this commit
adds tests to ensure the `inherit_id` of COW views are correctly updated on
module updates.
This test could not be rewritten in a regular test and merged in 12.0 as module
operation in tests try to be avoided (see 5e7e7b00b7d).
See #64446 for more information about the original fix.
closesodoo/odoo#66096
X-original-commit: 9d2787b1dc1485ed132ca51d2b2a4c85b8c77d0c
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Before this commit, only whitelisted fields would be updated on cow views
during a module update.
A field would be whitelisted if he had the same value than the original view,
see it as a heuristic to not write on modified fields.
But `inherit_id` is not that simple, even if the cow view has a different value
than its original view, it doesn't mean it was modified by the user, it is just
because of the cow mechanism that assigned a copied view as inherit_id, which
is just a copy ofthe original one.
We can thus consider `inherit_id` as unchanged and whitelist it if the `key` is
the same.
In practice, it means that cow'd views did not receive the `inherit_id` updates
as in commit https://github.com/odoo/odoo/commit/c8577568a1e39f6692889b3e21652fa3b8df06b2#diff-823e5db841dca1798ff1300e243059a4e1c93343598d2be5a1d1dcd1d2d0c273R537
where `portal.my_account_link` had its `inherit_id` changed from
`portal.frontend_layout` to `portal.user_dropdow`, see https://github.com/odoo/upgrade/pull/2059:
Considering a module update changing `inherit_id` of D from A to B, the
following use cases are expected. Without this fix, D' never move:
CASE 1
A A' B A A' B
| | => / \
D D' D D'
CASE 2
A A' B B' A A' B B'
| | => | |
D D' D D'
CASE 3
A B A B
/ \ => / \
D D' D D'
CASE 4
A B B' A B B'
/ \ => | |
D D' D D'
Opw: 2422773
Opw: 2422727
Opw: 2422770
Opw: 2423406
Opw: 2423859
X-original-commit: ff69f11e9c97d63d9319a8094a87af93984aba38
This PR adds a class to be able to show/hide
other fields depending on a checkbox status.
This class is needed to have this behavior on desktop but also
on mobile.
We can now fix some alignment issues encountered on mobile.
Related task-ID: 1929043
closesodoo/odoo#66153
Related: odoo/enterprise#16345
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Allow to delete a non validated time off in the future to a simple user
Add some tests
Task - 2428789
closesodoo/odoo#65361
Related: odoo/upgrade#2127
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce:
- Go to Survey
- Click on Create
- Go to the "Options" tab and see
1) "Survey Time Limit" Field in "Questions"
2) "Attempts Limit" after clicking on "Login Required"
Related task-ID: 1929043
Steps to reproduce:
- Go to "Purchase / Orders / Vendors"
- Click on "Create" to enter in form view
- Go to "Sales & Purchase" tab
- See "Receipt Reminder" in "Purchase"
Related task-ID: 1929043
This commit adds a class to be able to show/hide
other fields depending on a checkbox status.
This class is needed to have this behavior on desktop but also
on mobile.
Related task-ID: 1929043
Before this commit when toggling shapes on a snippet background, the
shape color palette was always set to the default one.
After this commit when toggling shapes on a snippet background, the
shape color palette is computed by combining the default palette with
the palette of the previous shapes in the page.
task-2431445
https://github.com/odoo/odoo/pull/64515closesodoo/odoo#64515
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit when toggling shapes on a snippet background, the
shape selection dropdown was shown as closed.
After this commit when toggling shapes on a snippet background, the
shape selection dropdown is automatically opened.
We have to use a click() on the toggler instead of an open() on the
dropdown to make the page containing the selected shape appear when
opening.
task-2431445
https://github.com/odoo/odoo/pull/64515
Color palette are only visible once they are opened. However, we
instantiate them a lot to build the "options" editor panel which caused
the editor to appear buggy for some users... even if they would never
open a colorpalette. This fixes that issue. The fix is not entirely
stable but was made as stable as possible... better implementation will
be done in master.
task-2439295
https://github.com/odoo/odoo/pull/65223closesodoo/odoo#66217
X-original-commit: 9aeba7dec95b397ef894f5a181920dff269d6ad4
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Before this commit the palette was rendered each time it was opened.
After this commit if the palette has already been rendered only the
selected color is being updated in the palette (and its colorpicker).
task-2439295
https://github.com/odoo/odoo/pull/65223
X-original-commit: 7f19f63b18bc7d17a393b3535492c7f90595ca39
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Before this commit the loader did not always get displayed when
switching to the options tab.
After this commit the loader always gets displayed ASAP when switching
to the options tab until the tab is ready and displayed.
task-2439295
https://github.com/odoo/odoo/pull/65223
X-original-commit: f2fa17540e130b5cf3f70570a3a97495cfbb7499
Co-authored-by: Samuel Degueldre <sad@odoo.com>
When closing pos.session and it turned out that during the creation
of journal entry the move lines are not balanced, pos automatically
balances the lines by crediting the amount to balance and recording
it to the default pos receivable account.
In this commit, we are changing the behavior by allowing the user
to choose which account the imbalance amount be recorded. So the
workflow becomes:
1. Close pos session fails.
2. Wizard shows the amount to balance and asks which account to
record it.
3. Confirm the wizard to successfully close the session.
closesodoo/odoo#62425
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
before this commit: when searchbar has autocomplete and user press Tab key then
focus goes out of searchbar input while it should keep focus on searchbar so that
user can do search on other term.
after this commit: when searching on searchbar and pressing Tab key will keep focus
on searchbar input so that user can search again.
task-2393772
closesodoo/odoo#66239
X-original-commit: ae90842be8a87999e0cdbbf00b86b1bbf92992ce
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
before this commit: when there is a horizontal scroll in view say for example
kanban view where there are too many columns and user scrolls horizontally and
go to form view by clicking on any record and then come back to kanban view
horizontal scroll is not preserved and user is moved to scroll position 0
this is due to commit: https://github.com/odoo/odoo/commit/19eacf7d23c9413de4430a3422b5ed74b37ef242
after this commit: scrolling horizontally and then go to form view and come
back to previous view will preserve scroll position, we also consider case for
kanban view where there are too many columns and user click on 'Add Column'
user will be scrolled to new column element.
task-2418275
closesodoo/odoo#66230
X-original-commit: 171036aefe21799f7a791cc3cd73a7d249aa0b00
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Install event_sale;
- On the Sale's settings check 'Sale Warning';
- Create a blocking message for a product;
- Create a SO;
- Add the product with the blocking message.
Before this commit, a traceback was raised before the blocking message
is shown.
Now, only the blocking message is shown.
opw-2458568
closesodoo/odoo#66202
X-original-commit: 768bcf58e8dc215b96b11bafa632c07dc683e297
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Fix pre-printed report so that invoice date remains
in same position as if not pre-printed
closesodoo/odoo#66193
X-original-commit: ab99aa426f5cd317ea69f26c213635b0ab39e716
Signed-off-by: Josse Colpaert <jco@openerp.com>
The update of fullcalendar (ebce7719b) in 14.0 made #45881 not working
(they both happened in same month).
opw-2214445
closesodoo/odoo#65503
X-original-commit: 3ad005a49e44ce35800edcb8a178fc3544d99633
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Currently, when you edit a paragraph with the lead class, the font-size
is set to x px. This value is not available in the font-size dropdown of
the editor. So no value is set as active (checked). With this change,
the lead font-size will now be 18px and match a default value from the
editor.
task-2209960
closesodoo/odoo#46902
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Have grouped list with reference a m2o or a reference field
Select some records, edit them
Before this commit: the names of the reference fields and m2o disappeared
That was because the saveRecords function did not take into account a grouped list
manual forward port of #65999
After this commit: it works as expected
closesodoo/odoo#66043closesodoo/odoo#66175
X-original-commit: 8b6e86927941dce2018ea93f191b59856ea67e4b
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Have a list with multi_edit enabled
Have a widget boolean_toggle displayed on some field
Select some records to be in multi edit mode
Before this commit, the record on which the boolean toggle button was clicked was written
and then the multi edit feature was triggered and wrote on all the records
The first write is unnecessary and counter intuitive
After this commit, only the write with all the multi edited records is done
X-original-commit: 23fcaeda6830f2dc0de17337f9c3da8faf0338ce
Previously, edition of many2ones in the front-end was done through a
snippet option. While this works fine for raw many2ones in the page, it
is desirable that other snippet options can leverage a many2one as a
part of a more complete or comprehensive option. This commit introduces
a many2one userValueWidget that will be able to be reused by snippet
options, and adapts the existing many2one snippet option to use it
instead.
The interface has also been reworked so as to lean on the existing
we-select UserValueWidget for the sake of interface consistency.
Thanks to fja-odoo for first iteration.
task-2190603
closesodoo/odoo#63835
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- Go to Accounting > Configuration > Reconciliation Models
- Create a Reconciliation Model:
* Type: Suggest counterpart values
* Amount Nature: Amount Paid/Received
* Label: Contains test
* Counterpart Values: [Add a line with "Percentage of balance" as Amount Type and 100 as Amount, for example]
- Create a Bank Statement of any amount with "test" as Label and no Partner
- Post Bank Statement and Reconcile it
Created Bank Statement matches conditions of Reconciliation Model but Counterpart Values are not suggested.
No counterpart values are suggested if there is no Partner on Bank Statement
During preparation of reconciliation, reconciliation is skipped because an open balance
has to be created but no receivable/payable account is retrieved as there is no Partner
on Bank Statement.
If no Partner is set, receivable/payable account is retrieved from company.
opw-2441484
opw-2442491
closesodoo/odoo#66167
X-original-commit: b9052f30dd8c26e0402a7f4a55b72204e9f1e633
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Combining domains using `+` is not ideal as it's somewhat easy to
unwittingly create broken ones and perform unexpected
selections. Combining with `expression.AND` should be a lot more
reliable.
closesodoo/odoo#66160
X-original-commit: 696819972d5a51f826fb675f0cb712f819c2cdf4
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Before this commit it is rather hard/unsafe to xpath into this view.
As the view is huge and quite some HTML elements are used a few times (table for example) it is risky. Especially since some enterprise modules build further on this.
After this commit all major elements have a name which allow easy xpathing for inheritance.
closesodoo/odoo#66131
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
before this commit: when form view have buttonbox or notebook tag and form does
not have sheet tag then form will have horizontal scrollbar in screen, this is
because we added scss mixin which always add negative margin of 32px because we
added mixin by considering form will have sheet tag and because of that when
form does not have sheet tag it shows useless horizontal scrollbar.
after this commit: if formview does not have sheet tag and form contains button
box or notebook tag then form will be displayed properly without unnecessary
horizontal scrollbar.
task-2411627
closesodoo/odoo#63961
Related: odoo/enterprise#15519
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Create a puchase order for a portal customer with sections and notes in
the order. Confirm and send email.
Access portal with the customer and look for the PO.
Section and notes will be displayed as products, with quantity 0, unit
price 0,...
opw-2429376
closesodoo/odoo#66116
X-original-commit: 56185d04a98a2238b11e6d2eef0d8fcdb30d7b68
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
We actually want to keep on computing tax tags this way. Consider the following example:
- configure a sales tax like this
amount : 20%
100% - base : +01
100% - taxe : +02
-10% - taxe: -03
- Make an invoice for 100. It looks like this:
credit 100 - debit 0 - +01
credit 20 - debit 0 - +02
credit 0 - debit 2 - -03
===> Since the repartition line was configured with a negative factor, and because credit lines with + tags do + in the report, we actually expect the tax report to contain +2 in grid 03, since we're applying tag -03 to a negative amount. That's why this fix was a bad idea.
closesodoo/odoo#66115
X-original-commit: 9cf77f67adb9bc96f266c675c64d58217a334129
Related: odoo/enterprise#16334
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Small improvements to the Product Moves (move line) report:
- added 3 new filters: Last 12 Months, Last 3 Months, and Last 30 Days
(default Last 12 Months)
- added standard Date filter (i.e. by quarter, month, year)
- updated the Stock Moves stat button in product [template] view to
display # incoming/outgoing moves within the past 12 months
Task: 2371067
COM PR: odoo/odoo#63598
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
Because of the way Odoo works at its core, we do not know before hand
which files will be loaded as an asset in the browser, because it
depends on the installed Odoo addons. This is why it is historically
difficult to integrate Odoo with standard JS tooling, and this is why
Odoo needs to use a custom javascript module system.
However, there is a way to use native JS modules (and gain all the
benefits from it: IDE autocompletion, ease of refactoring, intellisense,
...): we can write JS as native JS modules, but convert them at runtime
into Odoo custom modules. This is exactly the strategy applied by this
PR.
This has a lot of benefits, but there is a downside: we can no longer
serve statically JS files in debug=assets. This would be a dealbreaker,
if we did not have sourcemaps.
So, this PR introduces
- support for native JS modules
- add a specific asset controller `/web/assets/`
- generate sourcemaps (for debug=assets mode)
Note that part of the complexity of this work is cause by the debug=assets mode, where we need to have a fixed route for the debug asset bundle (so we do not lose breakpoints when debugging), but we still need to safely regenerate the bundles whenever the JS code is modified.
closesodoo/odoo#63177
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
The previous work on adding support for native JS modules needs to adapt
some existing files, which have an incompatible name (with a '/').
Also, we convert a few JS file in /web to the native JS module system,
to show that it can work.
Part of PR 63177
Co-authored-by: Simon Genin (ges) <ges@odoo.com>