This snippet is already no longer in use.
The snippet is very similar to the call_to_action snippet
[REM] mass_mailing: title_text snippet removed
This snippet is already no longer in use.
In order to get the same result, we can use a combination of the title
and the text snippets.
Part-of: odoo/odoo#95940
Replaced bootstrap classes by inline styles. Added .o_cc on columns to
allow background color edition with builder.
Mobile stacks the columns, the paddings top and bottom are thus moved to
the columns to allow top and bottom spacing between them.
Part-of: odoo/odoo#95940
Replaced bootstrap classes by inline styles and removed unused classes.
`<h4>` and `<h5>` are no longer supported, these have been changed to
`<p>` or `<h3>`.
Added .o_cc on columns to allow background color edition with builder.
Part-of: odoo/odoo#95940
Replace bootstrap classes by inline styles.
Added a <p> around the ENDOFSUMMER20 text so it can be edited with the
design-tab along with other text.
A `.o_mail_no_margin` class is added to the <p> element otherwise the
text isn't vertically centered inside the the table cell.
Part-of: odoo/odoo#95940
Removed unnecessary classes and replaced bootstrap classes with inline
styles.
Removed `.btn-block` classes because it isn't an option supported
by the builder.
The `<li>`'s `.list-group-item` class overrides the design-tab's text
color. For this particular case, the list elements have a `<p>` added
around the text.
When selecting text inside the second block's list and backspacing,
the line would become purple and impossible to remove. This was probably
due to the text being inside a <span> inside a <p> (this issue isn't
present in the first block which only contains <p> elements).
Part-of: odoo/odoo#95940
Placed all the columns in a single row, litmus tests approve.
Removed unnecessary classes which prevented to move columns around and
add background colors to the columns.
Also changed all `<h4>`s into `<h3>`s
Part-of: odoo/odoo#95940
Replace bootstrap class for text alignment with inline style
Wrapping the `a` inside a `p` and placing the text alignment on the `h2`
and `p`s allows the user to align the elements individually.
Part-of: odoo/odoo#95940
Removed unnecessary classes and placed necessary styles as inline styles
for better support by the builder.
Removed options.js which allows to change the blockquote's style as in
the web editor, but none of the other options is well supported in
emails. Due to this change, the blockquote's cover image is removed.
Changes to text done via the Design tab in the builder weren't being
applied to text inside `<span>`, so this has been changed to a `<p>`
element in order for the changes to be applied.
Part-of: odoo/odoo#95940
Structure and styling changed to allow padding X when this snippet is
not inside another snippet. Otherwise the alert block, in w-100, didn't
have any space between the edge of the email template and the block.
The "Type" option wasn't working: as all the elements can be changed
with other options anyway, the code for this one has been removed
instead of trying to fix it.
Part-of: odoo/odoo#95940
Column classes have been updated and outdated classes ones have been
removed.
Paddings have been improved for better display on mobile.
Part-of: odoo/odoo#95940
Previously, the social icons column could not be resized and we couldn't
change their alignment. This is now possible by removing the extra div
surrounding the social links.
A general cleanup has been done.
The order of the classes is more consistent.
Unused classes (ie: `o_mail_table_styles`) have been removed.
Text-align classes have been replaced by inline styles.
Part-of: odoo/odoo#95940
In previous versions of templates, all the styles were needed in every
template in `<styles id="design-element">`. This is no longer the
case and it has been cleaned up to only use the styles that differ from
the "default" ones found in the `mass_mailing_design_constants.js` file.
There was a priority problem (ex: `a.btn` inside `p` takes
`p`'s text color instead of `.btn`), this is resolved by placing the
default styling in `theme_default.css`
`theme_default.scss` contained classes that were no longer necessary or
would override styles from the builder. These have been removed from the
SCSS file and from snippets and templates where these were applied.
If the styles are needed, they should be added as inline styles.
The theme_default template was calling snippets with `t-call`
which prevented customization of the theme.
Snippets have been added in full with further customization.
task-2835454
Part-of: odoo/odoo#95940
The current implementation of sharing screen uses the
`MediaDevices.getDisplayMedia()` API. Sadly this API is not currently
supported by all major existing mobile browsers[1].
Some users were confused about the browser request permission
notification. As this is a way more complicated than just adding a
permission. We prefer to hide this feature by removing the screen
sharing button on mobile devices.
Links:
[1] https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=487935
opw-2915773
closesodoo/odoo#97947
X-original-commit: 2bf5ce06ef18d10c79ebab57551267eb31de872f
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Task 2888341
After the OWL update the drag and drop feature doesn't work anymore.
This little change does both things mentioned in the task: fixes the upload + shows the list view when the documents are uploaded
closesodoo/odoo#97671
Signed-off-by: William André (wan) <wan@odoo.com>
To reproduce the issue:
(Need stock_barcode)
1. Create a product:
- Barcode: 1234567890123
2. Print the label
3. Try to scan the barcode and check the value read.
Error: The value is 1234567890128, the last digit is incorrect (8
instead of 3)
When printing a barcode, we use the library 'report-lab' to generate a
barcode image from a value and a barcode type. In case of EAN-13, if the
value contains a non-digit character, it will raise an error. We then
catch the error and retry to generate the barcode according to the
barcode type Code128:
https://github.com/odoo/odoo/blob/87698d90f02bfe93c6e643f4876a5ccd74788eff/odoo/addons/base/models/ir_actions_report.py#L569-L575
However, if the value contains only digits, the method will use the 12
first digits:
https://github.com/mattjmorrison/ReportLab/blob/dade0f303cb6fcdbe535c4cc92e6102c2417b699/src/reportlab/graphics/barcode/eanbc.py#L187-L188
and will then add the last one, the check digit, which is computed by
the library. This explains why, in the above use case, the barcode value
returned by the scanner is not the same than the expected one.
Note: Similar behavior with type EAN-8
OPW-2902150
closesodoo/odoo#97052
X-original-commit: a2c7470f8fd46b2520f7b8f0750c63216273ce96
Related: odoo/enterprise#30160
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
When duplicating a mailing with a template already set, especially with a slow
connection, hitting the save button as soon as possible was causing the help
overlay to be superposed with the template. This solves the problem.
Task-2937045
closesodoo/odoo#97930
X-original-commit: 89ecb17f56b34b7e3875fa36cde70a2666dca4d8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Add a new subtype_id for 'RFQ Sent' state. This removes
the need to join on mail.tracking.value when computing
'all_sent_rfqs'. Since mail.tracking.value is usually
a big table, removing this join leads to a substantial
speedup when loading the purchase.order dashboard on big
databases.
closesodoo/odoo#96921
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
When creating a receipt with products tracked by lot or serial number,
empty move lines are automatically created when the receipt is validated
Steps to reproduce:
1. Install Inventory
2. Go to Inventory > Configuration > Warehouse Management > Operations
Types
3. Open Receipts and enable 'Show Detailed Operations' and 'Pre-fill
Detailed Operations'
4. Go to Overview > Receipts and create a new receipt, in Detailed
Operations add product 'Cable Management Box' with any serial number
and a quantity of 1
5. Validate the receipt, a new line is added in Detailed Operations with
quantity 0
Solution:
When we create a stock move line and we need to create a lot, we create
the lot with the context key `do_not_unreserve`
Problem:
When we create and write the lot on stock move lines, we detect that the
`product_uom_qty` is not set. Because we are in an immediate transfer,
we will try and assign it the `quantity_done`.
https://github.com/odoo/odoo/blob/7fec535f3d84d15899aea5e61b51947f260d9697/addons/stock/models/stock_move_line.py#L467-L469
By writing the `product_uom_qty` on the stock move, we will try to
unreserve and reserve again the stock move (if `do_not_unreserve` is not
in the context)
https://github.com/odoo/odoo/blob/ba3bb9b701a382c4052ddb57392baeee32625937/addons/stock/models/stock_move.py#L569-L576
This will then create the undesired empty move lines (that are supposed
to be the 'Pre-filled Detailed Operations') in _action_assign
https://github.com/odoo/odoo/blob/3e8a45fce0af0aa5792f0aea978d4ab78ab50a40/addons/stock/models/stock_move.py#L1586
opw-2897875
closesodoo/odoo#95983
Signed-off-by: Tiffany Chang <tic@odoo.com>
With the conversion to the new views, legacy x2many fields go through a
thin and incomplete compatibility layer to talk to the new model. This
compatibility layer is not very robust and as such most custom x2many
fields are broken in this configuration, in this case the field
"slide_category_one2many".
The proper fix is to convert this field widget, but in the mean time,
the simple fix is to force this view to keep using the legacy view
instead of the new view.
closesodoo/odoo#97936
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
The "name" attributes set on the filter nodes in a search arch are now
kept in the search items created from them. This will allow an easier
manipulation of search items (e.g. toggle a filter with a given name).
closesodoo/odoo#97913
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2896849
closesodoo/odoo#94767
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit improves the design and removes unnecessary SCSS.
Part of the overall v16 SCSS optimization/restyle, task-2704984.
task-2896849
Part-of: odoo/odoo#94767
Current behavior:
When using taxcloud for tax computation and using a giftcard on the
website shop, the giftcard amount is incorrect.
Steps to reproduce:
- Setup taxcloud for user A
- Setup EasyPost or any other not free shipping methods
- Activate giftcards for website
- Login as user A in the website shop
- Add an article to the cart
- Process to checkout and pay with giftcard
- The amount due is incorrect (negative value)
See this video for full explanation on how to setup taxcloud and
EasyPost :
https://drive.google.com/file/d/1E5ADDDwr_UbjYq-0t4whllFaQlkRBUCD/view
opw-2883592
closesodoo/odoo#97915
X-original-commit: 703b2d0f5ef520202361fd275b82b8dd12074f15
Related: odoo/enterprise#30300
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Commit [1] moved the edition of website from the frontend to the backend
and in doing so, introduced an iframe from which the website is edited.
This broke some behaviours as the event binding for jQuery widgets (such
as the carousel) is no longer done from the same jQuery as the editor.
So bootstrap events triggered inside the iframe do not reach options
that are listening using the top window's jQuery (simple $()).
This commit adds the $bsTarget property to the SnippetOption class.
It wraps $target[0] using the iframe's jQuery instance.
This allows for options to listen to bootstrap events.
(using $bsTarget.on)
Options that were doing that previously are adapted by this commit.
(Carousel, Popup, Accordion (collapse))
Note: Popup was already adapted locally (by [2]), this commit only
changes its use of an $iframeTarget property to the $bsTarget one.
This commit also fixes "Add item" on accordion snippet to properly
assign a unique ID to the new tab.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af
task-2687506
Part-of: odoo/odoo#94564
Commit [1] changed the way styles are handled. Now that the edition of
website is done in an iframe, the styles are computed inside the iframe
instead of the top window / global document element.
But for computing the gray colors, a base style defined
by `web_editor/color_palette.scss` is needed. This style is not part of
the frontend assets, so using the iframe to fetch it creates bogus gray,
which results in the feature not working.
Steps to reproduce:
- Go on the website editor
- Select the THEME tab
- At the bottom expand the gray color picker
- Use the settings
- The preview is not updated while sliding.
- The colors are not updated in the page.
This commit fixes the bug by fetching the base style from the top
window (where backend assets are present).
[1]: https://github.com/odoo/odoo/commit/212a8bfdd21269b18054200b9e2585e1c95540d6
task-2687506
Part-of: odoo/odoo#94564
Steps to reproduce:
- Go on website
- Click on edit
- Add a snippet
- Click on discard
- Close the popup using the 'X' at the top of the popup
- Buttons are still disabled
Commit [1] adapted the website dialogs to the OWL Api but also
introduced this bug.
This commit fixes that behaviour and re-enables the buttons
if the popup is closed.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
Part-of: odoo/odoo#94564
Commit [1] moved the website builder in the backend and in doing so
transferred event handling to the wysiwyg_adapter from the edit button
widget. Unfortunately, during that process, handling of event for
cloned snippets was forgotten.
This commit restores that and adds a test.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-2687506
Part-of: odoo/odoo#94564
before this commit:
users without read permission of ir.module.category cannot search
res.groups by names. An access error will be raised.
after this commit:
all users with read permission of res.groups can search res.groups
by names
closesodoo/odoo#97877
Signed-off-by: Raphael Collet <rco@odoo.com>
Since the new views, the empty domains on the archs were not be taking
into account.
Now, the empty domains are taken into account, this was the legacy
behaviour
closesodoo/odoo#97791
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
An HTTP Partial Request is a regular GET request with a Range header
that indicate what chunk of the data the browser wishes to download. It
is useful to peek in a video stream or to resume an interrupted
download. The server can respond with a 206 - Partial Content response,
set the appropriate Content-Length and Content-Range headers and only
send a chunk of the data in the body.
Werkzeug's `send_file`, the library function we use to stream files over
http, is fully compliant with partial requests and responses. It
understands the Range request header and create the corresponding
response.
NGINX does also comply with the Range header even via X-Accel-Redirect.
closesodoo/odoo#97422
Signed-off-by: Julien Castiaux <juc@odoo.com>
Have a legacy field with the noLabel attribute to true (in the actual widget definition).
Put that field in a list view (new OWL framework).
Before this commit, the noLabel attribute was not taken into account.
After this commit, it is.
closesodoo/odoo#97899
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The mistake was made in odoo#81904
Instead of 'default_partner_bank_id' we have 'partner_bank_id' in the
context of action_register_payment.
In this commit, we undo that mistake and also backport the change to v15.
task - 2774594
closesodoo/odoo#97886
X-original-commit: 5c8b74bb3bddd67b5a76d37f7d97a1d5d77c00c4
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Purpose: When re-invoicing the expense on the SO, the cost (purchase_price)
is not correctly set. For expenses with zero product it is set to zero,
and for the expenses with price on it, it is set to unit_price of the product.
As a result, the margin is calculated incorrectly on SO.
It should be set to the untaxed_amount of the expense in case of zero
product, or untaxed_amount of the product in case of a product with
price defined on it.
task - 2867723
closesodoo/odoo#96981
Signed-off-by: Kevin Baptiste <kba@odoo.com>
In case there is no need for currency conversion, the return value of
_sale_get_invoice_price is not rounded. While, when currency conversion
takes place, the return value is rounded. First of all, the behavior is
not universal, It should be the same across these cases.
Secondly, not rounding the return value causes discrepancy when computing
margin (in the sale_margin module) for expense products; as price_unit
is not rounded (in the first case), while purchase_price is rounded.
task - 2867723
Part-of: odoo/odoo#96981
Before this commit, in translate mode, the toolbar and the
table-container were shown when initializing the SnippetsMenu (and
removed for a click on an element that was not a translation).
To reproduce:
-> Install another language on website 1,
-> Click on translate
-> Click on a button of the informative dialog
-> The toolbar was there, then was removed on the click on the dialog,
and won't reappear.
(If the informative dialog is not shown, because it was permanently
dismissed, click on an image, the toolbar is still there and won't be
removed).
To fix that, the clicks on translations elements are not stopped from
the TranslatePageMenu and are taken into account in
_checkEditorToolbarVisibility to show/hide the toolbar.
Related to task-2687506
closesodoo/odoo#97855
X-original-commit: fbe35ed2f4c0727d097227fa6decf544f5db27fe
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce:
- Create a quotation
- Add a product that is invoiced on "ordered quantities" and set the
quantity to a negative number.
- Leave 'delivered' to 0
- Confirm the quotation
- Create the Invoice and validate it.
- Go to the SO list view (Orders > Orders)
You should see that the Invoice Status of the order you just created is
'Upselling Opportunity', which is not correct.
Why this is happening:
Here's an explanation on the 'Upselling Opportunity' state (found in
the code):
" upselling: this is possible only for a product invoiced on ordered
quantities for which *we delivered more than expected.* "
In our case, the invoice line's state is set to 'upselling'
because we have a negative ordered quantity and a zero delivered
quantity (i.e. we delivered more than expected)
opw-2895218
closesodoo/odoo#97830
X-original-commit: 5f10583336bf39430a304e2c47dfd0310ee4fa3d
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
Have a section of a settings view that can be search in.
Have a dynamic invisble modifier (governed by a domain) on it.
Before this commit, the condition were just juxtaposed, which will cause problem
if one of them contains a "OR" operator. So, sections that should have been invisible were visible
because the if looked like: search() or search_other() and isVisible().
After this commit, the t-ifs are correctly combined so that they look like:
(search() or search_other()) and isVisible().
closesodoo/odoo#97811
Signed-off-by: Samuel Degueldre <sad@odoo.com>
During qunit test, the audio notification is never used but the audio
element is still computed. This leads to unnecessary get requests
being triggered on the server. This PR prevent computing the audio
field of the user_notification_manager if canAudio is set to false.
closesodoo/odoo#97785
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Have a field declared in python with a "help" property.
Put that field in a view with a "help" attribute.
Before this commit, the xml declaration was not taken into account.
After this commit, xml declaration has precedence over the python one.
closesodoo/odoo#97782
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Have a one2many in a form view. It displays its records with a kanban.
Add a record, now click on that new record.
Before this commit, there was not "Remove" button, preventing to effectively
remove a new (virtual at this point) record from the one2many.
Aftet this commit, there is a remove button that effectively removes the
record from the one2many.
closesodoo/odoo#97775
Signed-off-by: FrancoisGe <fge@odoo.com>
In order to prepare the ground/reduce the noise in the PR
introducing the websockets in Odoo, the mocks of the longpolling
route in tests is replaced by calls to sendone/sendmany.
This will allow to keep the same code while changing the underlying
technology.
task-2053917
closesodoo/odoo#97771
Related: odoo/enterprise#30244
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The `key` field is often (`_get_view_id`/`_get_specific_views`) used to
find an ir_ui_view. Because `key` doesn't have index, PostgreSQL will
always do a SeqScan. Because the table is small, it doesn't create a
huge performance bottleneck, but it still not very efficient.
closesodoo/odoo#97478
Signed-off-by: Julien Castiaux <juc@odoo.com>
Prior to this commit, the dashboard was a table and there was
unnecessary scss.
This commit changes the table into the new bs5 grids
and clean the scss files.
In the portal view, a class(orders_label_text_align) that didn't affect
the design was removed.
task-2906527
closesodoo/odoo#95902
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>