The current asset_bundle version uses the last modified date.
This can be problematic in some case.
Even if it is a long time issue, the problem was rediscovered on runbot
with a commit being in the future. Runbot will export all file and set
the write date of the file to the commit date. The main purpose is to
have deterministic bundle version between different builds. This also
allows to generate assets bundle once at install for all post install
subbuild.
The issue here is that the commit date was greater than now(), meaning
that some tests setting custom css in attachment won't trigger the
regeneration of assets bundle. This wasn't really noticeable before
assets pregeneration.
This is not the first time strange issues occurs because of the
last modified logic.
This commit combined all last_modified to generate the bundle
version.
The current adaptation is quick and dirty and this will be reworked in
another post 16.0 freeze assets refactoring and cleanup.
closesodoo/odoo#100160
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
The field is related towards the 'manager' field of the expense sheet,
which means that when the approver is suggested automatically based
on hr data, the expense records get written a value for this field
(which is not in the view) which gets logged as:
- None -> Mitchell Admin (Approved By)
which seems to suggest that:
- the expense has been approved (it has not, a report was created)
- Mitchell Admin has approved: it may not be him (as when approving,
the 'manager' field does not log who did the approval but who was
supposed to initially)
Disabling tracking for this field (which contained no actionable
information at best, and incorrect suggestions at worst) makes this
problem go away.
closesodoo/odoo#100241
Signed-off-by: Kevin Baptiste <kba@odoo.com>
In legacy, hide_model attribut on FieldReference was used to hide
the model input, but it was not implemented in ReferenceField
(new version).
closesodoo/odoo#99819
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
The context before click button cancel in expense sheet not cleaned yet.
closesodoo/odoo#100288
X-original-commit: 6f8d3d989cc024c8e5b3e9e1a6b2f4af636721d6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose :
Improve multiple use cases while handling the Accounting part of Cash Discounts in Odoo.
When creating a Payment Term, the user can now specifically design an early payment discount for each payment term lines.
The user can choose between three different kind of tax computation for the discount. If the conditions for the cash discount are fulfilled, the tax will either be:
- included : the tax and base amounts will be discounted.
- excluded : the tax will be left untouched, the base amount will be discounted.
- mixed : the tax is durably discounted, the base is discounted if the early payment occurs.
The discounted amount and the conditions to fulfill are printed below the invoice PDF if the option to do so is checked.
Took the opportunity to improve the display of the payment terms on the invoice in general.
Registering a payment while filling the condition for an early payment discount will prefill the fields accordingly.
The Journal Items in the account.move, the payment and the reconciliation are modified as needed to take the discount into account.
Reconciliation --> In the reconciliation widget, the logic of Early Payments Discounts is also applied to allow as often as possible for an automatic reconciliation.
Related : odoo/enterprise#28607
Task-2968644
closesodoo/odoo#99572
Related: odoo/enterprise#31225
Signed-off-by: Laurent Smet <las@odoo.com>
This related field is useful in sale to simplify the logic of the
product configurators (incoming adaptation to OWL).
Thanks to that, we'll be able to avoid an useless rpc to get the
detailed type of the SOL product.
closesodoo/odoo#100310
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
For now, the graph view completely ignores the order attribute set on
its arch root node if written in the correct way, i.e. with "asc" or
"desc" (lower case). We fix that.
closesodoo/odoo#100302
X-original-commit: 0fb64bef16914937cf4a1d1618fb58ade6d16f14
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Steps to reproduce the issue:
- Create a presentation in a course (model `slide.slide`)
- Create an entry referencing the presentation in `slide_embed` table
- Remove the presentation from the course and save the changes
Bug:
A validation error was raised
opw:2902062
closesodoo/odoo#99468
X-original-commit: e5c239fcef2ee29856428c8f0d337fffc0a22e56
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Simon Goffin <sig@odoo.com>
The RappresentanteFiscale and CessionarioCommittente nodes must be in this order in the invoice xml. The RappresentanteFiscale node is only added if the company has a tax representative configured. In that case, before this fix, submitting an invoice to the SDI (Italian tax agency) would not go through and generate an error :
The invoice has been refused by the Exchange System
File non conforme al formato : Invalid content was found starting with element 'RappresentanteFiscale'. One of '{TerzoIntermediarioOSoggettoEmittente, SoggettoEmittente}' is expected.
How to reproduce :
- Install l10n_it_edi_sdicoop
- Configure a tax representative on the company
- Go to accounting settings > Electronic Document Invoicing and choose the test mode + check the “Allow odoo…” checkbox.
- Create a new invoice and confirm
- Click on “Send now”
- Click again on “Send now” until there is an update and the error is displayed.
closesodoo/odoo#100264
Task: opw-2952098
X-original-commit: 71da80deb044852a2af6b111d695f94aad7803ac
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Allow to paste font tag as it is used to style colors.
Allow style attribute on tag B, STRONG, I, S, U, FONT.
task-2980754
closesodoo/odoo#100262
X-original-commit: 0b907fe5cfb9a1f83da4079e30e46e6711ade797
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This transforms text between two backticks into a code element, when
typing the closing backtick.
task-2985108
closesodoo/odoo#100218
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit allows to define steps in tours that drag&drop records
in (wowl) kanban views. The former helper is based on jQuery,
mostly because the drag&drop feature comes from jQuery. This
feature is still necessary for the legacy codebase using jQuery.
This commit thus introduces a new helper to allow the drag&drop
in wowl Component using, for instance, the `useSortable` hook.
This commit also fixes the project tour by making it use that
new helper. Note that even though the tour was broken (when run
"automatically", not in a user onboarding), runbot was green
because there's no test running this tour. It would be nice to
add one.
closesodoo/odoo#100208
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Before this commit, a record quick created in kanban would have values
left from the quick create form view in its `data` object, that would
then be used by the model of the parent view to perform onchange
actions.
This would cause a crash if said values were set on a field not included
in the parent view's active fields.
In this commit, records data are cleared at each load, ensuring that
they only contain values for their current active fields.
closesodoo/odoo#100182
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the groups returned by `web_read_group` were
unpacked using the current 'group by' field name, and not the entire
'group by' value (potentially including a granularity for date/datetime
fields). This caused mismatches in some cases and the value couldn't be
retrieved.
Also, a needless 'sum_field' parameter was passed to the
'read_progres_bar' calls, which does not exist in the request API.
This commit fixes the first issue and removed the excess parameter.
closesodoo/odoo#100149
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit aims to make the behavior of the mocked 'read_progress_bar'
requests closer to their server implementation.
Namely, the returned dictionnary is supposed to contains the display
names of the current groups in its keys. This was not the case and has
been fixed.
Part-of: odoo/odoo#100149
Avoid starting the patcher two times to not create two separate
instances of it, and only stopping one of it.
closesodoo/odoo#100058
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Now that web_studio no longer uses the legacy graph and pivot views and
that all their extensions have been converted, we can finally remove
them from the code base.
closesodoo/odoo#99734
Related: odoo/enterprise#31112
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
With [1] moving the website in backend, it is now possible to display
a backend discuss chat window while browsing your website.
This window is unfortunately hidden behind the SnippetEditor when it is
open.
The choice was made to hide the chat window when the edit mode is
activated, as it could hide some content of the page.
Steps to reproduce:
- Open a Discuss chat window using the systray item from the app grid
- Open website
- Click on Edit
Chat window is hidden.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
closesodoo/odoo#100098
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the website service method fetchWebsites was not
clearly defined: it was fetching the user groups, the websites, the
current website and it was also setting the service's current website.
There is a difference between the get_current_website backend method and
the getter from the website service, introduced in [1]: the
websiteService.currentWebsite value referes to the website currently
edited in the WebsitePreview client action. From that value depend other
components visibility (like the contextual menus).
So when a fetchWebsites call was done from outside the client action,
from a PageListController with [2], it was breaking the flow by setting
a currentWebsite outside the client action and it could lead to bugged
flows:
- Go to the "Pages" list view
=> The contextual "This page" menu is not shown, it's correct
- Refresh the page
=> The "This Page" menu is shown (and broken).
To fix that, the fetchWebsites method is divided into a fetchUserGroups,
the searchRead on the websites, and another call to get_current_website,
located in the client action. It allows to load the client action iframe
with the last viewed/edited website.
Also, the menu "This Page" is shown only when there is a pageDocument at
the website service level.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/940f4ee875332dafa1f379970a7683be6b3ee606
task-2687506
closesodoo/odoo#100055
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Short summary:
- People can now use the snippets option to show/hide based on country
- We never use / test / maintain this feature, if it still works since
its introduction 4 years ago that's by luck
- It is probably barely used, we never got a single question or issue
about it
-----------
When we introduced the multi-website feature, it came with 2 main use
cases:
1. Multi website by domain -> Every website has its own domain and based
on that we serve the expected website
2. Multi website by geoip -> Multiple website can have the same domain
and based on GEOIP/country we serve the expected website
We never really supported, highlighted or promoted the geoip case.
We actually never use it ourselves when doing tests, and we don't
consider it when doing specs / improvements.
At most, only a very few people know about it in Odoo.
That GEOIP case is probably not useful at all, as displaying a whole new
website based on lang is not easy since nothing can be shared out of the
box -> Every website has its own COW records.
For instance, one could think of having its main website A and another
website B on which he just added 3 products specific to that website B
country.
But such a case won't even work properly, as any adaption on website A
won't be reflected on website B (design, theme etc).
closesodoo/odoo#99938
Related: odoo/upgrade#3892
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, the RtcSession fields were updated in the
`_willDelete` which could cause tracebacks.
closesodoo/odoo#99701
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When you are in odoo community, you have to set an ip adress to
configure iot box and check boxes to add devices to your POS. When you
use the devices in POS this way, you get a traceback because of trying
use 'this' which is not the correct scope of the function.
To avoid such issue, we are using arrow functions that keep the 'this'
of wherer they are called.
closesodoo/odoo#100226
X-original-commit: aaa0f836dfce9efa27e9b2603edddd68781c2048
Signed-off-by: Masereel Pierre <pim@odoo.com>
Before this revision, the number of inserted lines was not saved in
the list datasource. This revision fixes that.
closesodoo/odoo#100198
Related: odoo/enterprise#31333
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Before this revision, the code to ensure that a list has a name was done
in the import function instead of the migration process.
Part-of: odoo/odoo#100198
Before this revision, it was quite confusing to know which plugin was
the Core one and the UI one.
Having {Pivot|List}CorePlugin and {Pivot|List}UIPlugin is self explanatory.
Part-of: odoo/odoo#100198
Not sure what I was thinking (there was no chance the validation would
be structural, probably didn't think about the validation itself).
Possibly thought of creating a proper `Recommendation` type then ended
up not doing it, but left the props types in.
closesodoo/odoo#100206
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
b3b85cae9b unwittingly broke
auth_password_policy_signup when it ported everything to owl.
- move the CSS file back to assets_common
- reintroduce the old password gauge, moved over to signup (as it's
not used anymore by auth_password_policy), and converted to modern
JS style
- convert signup_policy to more modern JS style (for consistency)
Manifest file doesn't need to be updated because it globs.
closesodoo/odoo#100169
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this commit, an empty many2one field in readonly rendered
an empty `<a href"...">` node. Even though that link was no visible,
it had a non null width, and was thus clickable (the cursor changed
when hovering it). When clicked, it opened the form view of the
comodel, in create mode.
This commit fixes the issue by not rendering anything if the value
is false.
closesodoo/odoo#100158
Signed-off-by: Géry Debongnie <ged@odoo.com>
The purpose of this PR is to inline the "Validate" button
with the `country_id` field on the partner form view
when using Avatax.
task-2947705
closesodoo/odoo#100093
Related: odoo/enterprise#31277
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Make sure there is no migration issue in the module. Adapt the design
to ensure visual consistency. Remove custom SCSS and use BS classes
when possible
task-2950589
closesodoo/odoo#98706
Related: odoo/enterprise#30616
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
"Notebook" component had to be adapted to make the use of tabs
more consistent trough the app. The component now allows a use of
default tabs style in a vertical display
task-2950591
Part-of: odoo/odoo#98706
Steps to reproduce:
- Accounting > Customers > Invoices > Create
- Add one product line with tax 15% and one with no tax
- Print > Invoices
Issue:
In the report, the 15% tax is applied correctly on the first
product, but the taxed amount is not displayed. This is because lines
without a tax are not being considered as a separate tax group.
Fix:
Add an additional condition in the xml to check if the amount of taxed
money is equal to the invoice value. If not, then only a part of the
invoice amount is being taxed, so it must be displayed.
can be considered a forward-port of e213dab810724985dd62fb5f9a57f2bf6686a491
opw-2945837
closesodoo/odoo#100190
X-original-commit: 51064f233ca65b98d34503e2a11481d64ae8436a
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
savepoint do a flush that throw the current context and then recompute
the stored field (with a random matching context from the transaction).
In the case of qty_to_order, it will call qty_forecast and then
_compute_quantities on product.product.
Currently it will call _compute_quantities with a mix of self.env.context
(from the transaction) and a context generated from the orderpoint (with
deterministic data). But sometimes in the context took from the
transaction it could remain some other key used by _compute_quantities
(e.g. warehouse_id). Since qty_to_order doens't depends from context
it should not use self.env.context and only use the deterministic
context from the stock.orderpoint
closesodoo/odoo#100150
X-original-commit: 79694a88978ebc1213d6ba0ac0dcc59640f16d04
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Before this commit there is a widget `many2one_barcode` that allows
to scan a barcode.
After this commit, we have converted it to OWL, but it's more than a new
component. From now, the logic is in the basic Many2One as a
property/option (`canScanBarcode`) and we also have the equivalent
Component (`widget="many2one_barcode"`). This choice has been made to
support multiple use cases (e.g. having the product_configurator and the
barcode on the same product field).
Note:
now we use the `browser` class to allow to patch the browser feature
during testing.
Part-of: odoo/odoo#100082
Move all file related to Barcode scanner (JS/XML/CSS)
Note: also the CSS class is renamed as it's not related to mobile
exclusively
Part-of: odoo/odoo#100082
This commit makes FCE Is Cancellation Field inivible in non Argentinean Companies
closesodoo/odoo#99339
X-original-commit: da6b17dec3a4b13e3bf1b1cf5557aa8267f236a6
Signed-off-by: Josse Colpaert <jco@odoo.com>
Cookies should be used internally by the web UI. The server-side is not supposed to be aware of it at all.
Reverts:
odoo#88745
Based on odoo#93812
discussion. It has been decided to revert the fix to avoid further unattended behaviours.
closesodoo/odoo#100178
X-original-commit: bdde7dda7356744d459e3991a7f382fee42bf8c5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Before this commit, a global filter did not update the domain of a chart
in dashboard mode.
Task-id 2961578
closesodoo/odoo#100047
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>