Edit a website menu label with:
& < > " ` '
This is what is shown after saving:
& < > " ` '
This is happening since ea4dbcd240: characters &, <, >, ", `, and ' are
now always escaped. Before that commit, only < and > where escaped and
only when an image was inside the label.
With this change, we unescape the label when we are editing a menu.
opw-2609413
closesodoo/odoo#74558
X-original-commit: ab77054987287444c5f6141b047a63bab4b67baa
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Step to reproduce:
- Change the language to any language other than english
- Go to PoS and open a session
- Click on "Client" and select a client
- The button 'Select Customer', 'Deselect Customer' and 'Change Customer'
are not translated.
Cause of the issue
- The term 'Change Customer' was missing in pos.pot
- Translation was not enabled in JS file
This fix complete the one "done" in commit 00e177b
opw-2596436
closesodoo/odoo#74565
X-original-commit: da5b236f7375d35309a59d8e548309d5381a81cb
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Hook to be overridden when we need to add some field to product and use it in variable factor from price rules.
closesodoo/odoo#74561
X-original-commit: 6ec768d084da6bd7344c45750a2a5037ec366143
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
We are getting the order lines out of the main receipt template, to be
able to override it the sweden localissation module, and so having lines
separated depending on the type of products.
closesodoo/odoo#74554
Related: odoo/enterprise#20004
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Before this commit, the payment function `_get_validation_amount` was
overridden by Stripe to specify a validation amount of one currency unit
while that amount was in fact never passed to Stripe in the validation
flow. The amount stored on the transaction was therefore incorrect.
This commits removes the override to let the default amount of 0 being
set on validation transactions.
task-2612977
closesodoo/odoo#74543
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Prior to this commit, not all operations of the Stripe webhook were
encapsulated in a try/except clause. If a `ValidationError` was raised
outside of that clause, it was returned as-is to Stripe.
This commit encapsulates the whole webhook event processing with a
try/except clause to make sure that only an empty string is returned to
Stripe, hence properly acknowledging events.
task-2612977
*base_automation,iap,im_livechat,point_of_sale
This commit introduces a new file in core/utils: hooks.js
This file contains custom hooks (useEffect, useService, useBus...).
The useHotkey hook is tightly related to hotkeys, so it has been
moved to core/hotkeys.
closesodoo/odoo#74535
Related: odoo/enterprise#20003
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Previously, when killing the server, the longpolling bus stopped but
didn't start polling again after a few seconds, this was caused by the
fact that ConnectionLostError wasn't treated like a legacy error and
remapped to an object with a message, meaning it didn't trigger
guardedCatch callbacks.
Since ConnectionLostErrors should be handled much the same way as
RPCError when interacting with legacy code this commit simply adds
ConnectionLostError in the same places we already have RPCError during
error handling of legacy errors, but delegates behaviour to the new
lostConnectionHandler when appropriate.
closesodoo/odoo#74530
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Steps to reproduce:
- Create Bill from Purchase order
- Raise Refund for the Same Bill
Current Behavior before commit:
Field Unit Price is readonly in PO line as invoice is already created.
Expected behavior:
Price should be editable as Qty Invoiced is Zero after Refund.
With this commit, Price unit will be readonly based on `qty_invoiced`
closesodoo/odoo#74526
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
1. Activate 'Deliver Content by Email' in the Sales>Configuration>Settings
2. Create a mail template with Product Template for 'Applies to' and
a dynamic field (e.g. ${object.company_id.name}) in the body
3. Add this mail template on a [DEMO] product 'Automatic Email at
Invoice' field, in the Sales tab
4. Create an invoice with [DEMO], confirm it.
5. If the ID of the invoice does not exist as a product.product, you get a
traceback
The reason is that the model used for the template rendering is the
one specified on the template, but the res_id given to the composer
is the one from the invoice.
opw-2476169
closesodoo/odoo#74519
X-original-commit: 67bdd9cada7b06bc73d7bebedb7f10547e425055
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Commit 3d90d02 removed the integration with the Flexcheckout API but the
dedicated views were left behind, as it was not possible to remove them
in stable version.
This commit removes the unused views in master.
task-2494916
closesodoo/odoo#74505
Related: odoo/upgrade#2699
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Before this commit, the current dialog (in the action service's state) was either an empty object
when there was no dialog, and a filled object when the dialog was present.
After this commit, when there is no dialog, the dialog state is null.
closesodoo/odoo#74442
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Have an action in the breadcrumb (A)
Do an action (B) that has a button which spawns a dialog with a onClose callback executing an`history-back` event.
This may be useful when the action (B) acts as a selection buffer between (A) and the dialog.
(e.g. stock_barcode: execute `stock_barcode_client_action` from a picking)
Before this commit, the history-back event just closed the dialog without going back to the action (A)
This was because the wrong condition was used to determine if the dialog was still alive or not.
After this commit, the action (A) is displayed when closing the dialog from any point.
Remove the custom messages and replace with the default odoo tracking message that uses tracking_value_ids as parameters
Journal Items will log all changes of tracked fields in the chatter of the associated Entry - including one2many and many2many fields (by overriding _mail_track)
references original task 2061399
closes task 2469621
closesodoo/odoo#72023
Signed-off-by: William André (wan) <wan@odoo.com>
This commit adds an option to disable horizontal scrolling in the
smoothScrollOnDrag feature options and use it when dragging and
dropping a snippet into the editor to prevent the wrapwrap from
scrolling horizontally when an element overflow the page (e.g. an
animated element).
task-2215118
closesodoo/odoo#74518
X-original-commit: fdbc109780f336c4b7dcac31585beaad682e029a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
*: web, website_livechat, website_sale_comparison
Before this commit, bottom fixed elements (e.g. the livechat button)
hid the buttons to go to the next step in website sale when these
buttons are located at the bottom of the page, on some screen sizes.
After this commit,
- A bottom fixed element is hidden if this element hides a button at
the bottom of the page.
- Bottom fixed elements are hidden if a modal is open
to prevent it to hide buttons or any important part of the modal.
task-2501400
closesodoo/odoo#74515
X-original-commit: a851db9495fe9d8c1951f218a71e4d4a427cf96d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The configurator takes care of the organization of the links to the different
pages. Some links are put in the menu and some are put in the footer. The order
is predefined. If too many links are present in the menu then a sub-menu 'Company'
is created and some links are put in it. For the 'News' and 'Succes Stories' features
a website specific blog is created.
Links have the following order in the menu and are present only if their corresponding
website.configurator.feature has been selected in the configurator excepted for the 'Home'
and 'Contact us' links which are default links:
- 'Home'
- 'Shop'
- 'Event'
- 'Courses'
- 'Services'
- 'Pricing'
- 'Company': if more than 8 links in menu and more than 1 item in this submenu
otherwise the three following links are in the top menu.
- 'News'
- 'Success Stories'
- 'About us'
- 'Appointment'
- 'Contact us'
Links in footer:
- 'Privacy Policy'
- 'Help': if website_helpdesk installed. This is not a website.configurator.feature.
- 'Forum'
Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930
Upgrade: https://github.com/odoo/upgrade/pull/2682
task-2518565
closesodoo/odoo#71993
Related: odoo/enterprise#18930
Related: odoo/upgrade#2700
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The goal of this module is to be able to write tests that run and test the
`website` module business code with all the website modules installed (like
website_blog, website_sale etc).
This is, among other things, useful to test the configurator behavior.
Testing the configurator inside the `website` module would require the tour to
install modules, which is against our testing suite policy.
Such tests end up in `@standalone` testing suite, run only in nightly, meaning
anyone can break stuff without knowing. Such tests are way, way less efficient.
Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930
task-2518565
Opportunity is taken to clean the various follow/join/invite methods into only
one `add_members` method.
Part of task-2360169
closesodoo/odoo#74425
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The goal of this commit is to add a "Python version" of the
shape-on-image feature using a controller.
Since the whole logic to apply shapes on image is JS-based, we need
to use this URL (just like for background shapes) when we want to add
a shape by default on images in themes. When the configurator replaces a
snippet image (which the theme defines to have a shape), the shape
option should still be applied on the new image.
On the JS side, loadImageInfo() is overridden in order to mark
images (with theme default shapes) with corresponding attachment
data (original-id, original-src, mimetype).
Here is an example of the minimum xpath required to add a shape on a
snippet image in a theme:
```
<template id="s_image_text" inherit_id="website.s_image_text">
<xpath expr="//img" position="attributes">
<attribute name="src">/web_editor/image_shape/website.s_image_text_default_image/web_editor/solid/blob_1_solid_rd.svg?c2=o-color-1</attribute>
<attribute name="data-shape">web_editor/solid/blob_1_solid_rd</attribute>
<attribute name="data-original-mimetype">image/jpeg</attribute>
<attribute name="data-file-name">s_image_text.svg</attribute>
<attribute name="data-shape-colors">;o-color-1;;;</attribute>
</xpath>
</template>
```
task-2593454
closesodoo/odoo#73938
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The configurator takes care of the organization of the links to the different
pages. Some links are put in the menu and some are put in the footer. The order
is predefined. If too many links are present in the menu then a sub-menu 'Company'
is created and some links are put in it. For the 'News' and 'Succes Stories' features
a website specific blog is created.
Links have the following order in the menu and are present only if their corresponding
website.configurator.feature has been selected in the configurator excepted for the 'Home'
and 'Contact us' links which are default links:
- 'Home'
- 'Shop'
- 'Event'
- 'Courses'
- 'Services'
- 'Pricing'
- 'Company': if more than 8 links in menu and more than 1 item in this submenu
otherwise the three following links are in the top menu.
- 'News'
- 'Success Stories'
- 'About us'
- 'Appointment'
- 'Contact us'
Links in footer:
- 'Privacy Policy'
- 'Help': if website_helpdesk installed. This is not a website.configurator.feature.
- 'Forum'
Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930
task-2518565
Co-authored-by: Sébastien Mottet (oms) <oms@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
Before this commit, if the configurator was applied without a module to install
it would still go through `_button_immediate_function()` which does
```
self._cr.commit()
api.Environment.reset()
modules.registry.Registry.new(self._cr.dbname, update_module=True)
```
for no reason, even if `self` is an empty module recordset.
This code is taking ~5 seconds.
This flow will occur when you either:
- Create a new website when selecting only page feature
- Create a new website when some modules feature are already installed
Community: https://github.com/odoo/odoo/pull/71993
Enterprise: https://github.com/odoo/enterprise/pull/18930
task-2518565
Image gallery snippet when dropped is throwing a traceback.
This lead to the editor not usable anymore, as any JS error will prevent any
further action (no JS will work anymore).
This introduce a test that will drag and drop every snippet in a page and click
on it to load its settings in the right panel.
Note that it will remove the snippet before drag & dropping the next one, as
having too many snippet will impact the perf, even killing the browser entirely
if there is a lot.
task-2604383
closesodoo/odoo#74135
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
*: web_editor
Provide the user with an option to hide or display a section tag
depending on the visitor's location (if geoip enabled), language,
utm_medium, utm_source and utm_campaign.
Users can use a M2M widget to select different records. These will be
used to create a CSS selector on save that will hide the section tag
depending on the various options they selected.
This CSS selectors will be applied, as well as various data attributes
when the page loads to hide the targeted tag. All of these operations
are handled client side.
The geoip country had to be added to the session for the feature to work
with countries.
Part of https://github.com/odoo/odoo/pull/67140
task-2381049
closesodoo/odoo#67140
Related: odoo/enterprise#19907
Related: odoo/upgrade#2658
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
This commit changes the sanitization of the welcome_message to be on par
with other modules that take advantage of web_editor.
Part of https://github.com/odoo/odoo/pull/67140
task-2381049
*: im_livechat
Cookie utils will be required on the frontend side but before the lazy
loading. This commit splits them out of default utils to achieve that.
Note: kept as "legacy" utils anyway, we'll handle that when the time is
right...
Part of https://github.com/odoo/odoo/pull/67140
task-2381049
Multi-Application Management and UX improvements.
Improve in Recruitment app Job Positions Kanban view;
It is more intuitive if list is applications default view; improve the applications form;
Task - 2404610
closesodoo/odoo#63946
Related: odoo/enterprise#15750
Signed-off-by: Kevin Baptiste <kba@odoo.com>
These rules cause the scss compilation to increase dramatically in both
time and volume of the compiled file (for assets backend with no modules
closesodoo/odoo#74480
Installed: 1s -> 3s, 900kB -> 1.5MB)
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
The license was missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
The missing licenses were add in all version starting from
12.0 in repos odoo, enterprise and design-themes.
Starting from this commit, when a license is not defined,
a warning will be triggered.
closesodoo/odoo#74347
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
mrp - when a MO is generated from replenishment report, a log note is added
to chatter with the link of replenishment report, as this report got deleted
when to to qty is 0.0 then link dost not work. Hence added the simple text
for Relenishment report.
purchase_stock - When click on the order once button of replenishment report,
if vendor is not added on product then, added a new wizard with functionality
to directly jump on the edit product.
Added log note to the PO if po lines are generated through the Replenishment
report.
TaskId - 2427738
[IMP] stock: split method to create new or unlink unused OP
As, server action was added to the Replenishment menu, unless
until user clicks on the menu, new order point will not get
generate. Hence splitted the method and added to auto vaccum for
this.
TaskId - 2427738
closesodoo/odoo#66130
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Usecase:
- Product A 10 units in stock
- Do a planned transfer of 7 units to customer
- Reserve
- Do an rpc or execute code to call copy on the stock.move.line
It will result with 2 sml that have 14 units reserve and 7 units
reserved on stock.quant
It's the same result if you create twice the stock.move.line without
updating the stock.quant at the same time. However in stable we
try to only use _update_reserved_quantity on stock.move or some
override in create/write method for 'done' stock.move.line in unlock
cases.
So we never use the copy in stable and define the basic behavior as
'we don't copy the reservation' could prevent some usecase where
the update on the stock.quant is forgotten after.
closesodoo/odoo#74489
X-original-commit: e5041ee1d9b5036cab55f4332977aeb818a3b1e1
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
The readonly would not clear the old content when new content was put
through an onchange.
closesodoo/odoo#74476
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
PURPOSE
Rework the existing badge report to ease its override and make it look better
and introduce a new ticket report that contains more detailed information.
SPECS
Improve the existing badge report
Change the event badge report to create a proper action report so that it
shows accordingly on form (and other) views.
Remove the duplicate template for event badges and unify into one template
The "event badges" report can be printed from 2 different sources, from the
event.event itself as a preview and from the event.registration as an actual
badge for a specific attendee.
Improve the general layout of the report and remove unnecessary fields.
Introduce a new badge report with the A4 format.
This report is meant to be printed for the attendee and contains more
detailed information that the existing "badge report", which is only meant to
be folded and used as a badge.
We also introduce a new field that allows easily customizing these reports by
adding "extra instructions".
See underlying commits for more details.
LINKS
ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-2120259
closesodoo/odoo#72935
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
We increase the time (if we can call this a fix) while the switch from frontend
to backend become faster. It seems to be a problem of (useless?) regeneration of
assets + a slow refactoring of scss in backend which use extend that is slow...
closesodoo/odoo#74477
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit removes a savepoint call when running the event mail scheduler.
Indeed, this save point registration was colliding with the fact that we commit
the assets bundle during the reporting process, see 'commit_assetsbundle'
context key.
Since the transaction was commit during the report generation, when reaching
the end of the savepoint block, the system was trying to release a savepoint
that was no longer existing.
Indeed, committing removes all savepoints, since (quoting the Postgres doc)
"Savepoints can only be established when inside a transaction block.", which
makes total sense.
This was leading to a:
bad query: RELEASE SAVEPOINT "669516d2915811eba8d2b4d5bde7cdcc"
Aborting the whole event mail scheduler process.
As it's rather unclear why this savepoint was introduced in the first place,
we attempt to remove it. This change is done in a singular commit to be easily
revertable if ever necessary.
Task-26779