When editing the followers, the "pencil" icon that leads to the edition
of subtypes should be displayed only when "debug" mode is activated.
This commit restores this behaviour, as it was not the case anymore.
`has_group()` looks for static groups stored in database, whereas
`base.group_no_one` is dynamically added/removed depending on the flag
`debug` of the request.
We thus use `models.user_has_groups()` that adapts on the `debug` flag.
opw-2055848
closesodoo/odoo#36327
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
From calendar create a recursive event and add some guests. Delete one
event of the chain.
Invitations (Mail) will be created for the deleted event, and should not
be the case because the event has been deleted.
This happens because the recursive event is really just a record in the
database representing all the generated events. When the user want to
delete an event in the chain, a new event, copy of the "parent" event
has to be registered and subsequently disabled.
In the process of creating the event the mail is sent as
side effect. Note that the code to prevent this was partially there
because a context flag "dont_notify" is sent by the unlink in
Calendar.Meeting but was ignored from the mail subsystem.
opw-2039576
closesodoo/odoo#36270
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Before this commit, the domain applied to the field
employee_id on hr_expense was wrong, so a simple officer (no other rights)
could not see the relevant people
After this commit, the domain is correct and matches the one on the
officer group's record rule
OPW 2058512
closesodoo/odoo#36292
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, when a message body contains a big image with
inline dimensions, the image was stretched.
For instance:
- `<img width="4096" height="2304">`
- on 1080p screen in the discuss app:
- max-width for image: 1542px
- image ratio: ~ 1,78
- expected height: 867.38px
- actual height: 2304px
This issue had been fixed[1], but was reintroduced[2].
Note that this fix only works when inline dimensions are set as attr
of the `<img>` tag. It won't work with dimensions attached as inline
styles (e.g. `<img style="height: 4096px; width: 2304px;>`), due to
high CSS specificity of inline styles.
[1] https://github.com/odoo/odoo/commit/e7bc4e9703954fa952f24b4f96e75dc4299bbb28
[2] https://github.com/odoo/odoo/pull/15542/commits/46699c5214229ea8aebcc04e08d0786fd2b67f35Closes#36227closesodoo/odoo#36243
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Create a voucher in pay_now mode
set another account that the one of the partner
Validate
Before this commit, the automatic payment and payment entries
were done in the account receivable/payable of the partner
which means that the voucher and the payment were never reconciled
After this commit, the payment and its entries occur in the same
payable/receivable than the voucher's
OPW 2056240
closesodoo/odoo#36232
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
studio
opw2062025
In some cases, when there is no attachment (on an invoice for example)
and reports have been modified with studio, the self.attachement value
is false and an error appears
closesodoo/odoo#36291
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
Fine tuning of https://github.com/odoo/odoo/commit/6236ed1a5b138c5165929aa3f5c1d1f4f6aa061c#diff-2f6cca7f38255368e4a54b0a19406aa4
Steps to reproduce the bug:
- Install Sales and Purchase modules
- Create a user U with access rights to Sales
- Try to open an existing SO or try create one with U
Bug:
An access right error was raised because the non stored field purchase_line_count must be computed
PS: the compute_sudo had no effect on field purchase_line_count because it's a non stored field.
opw:2056746
closesodoo/odoo#36247
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
When selling a digital file on the web shop, if the file 'name'
has no extension (e.g. the pdf "Free Booklet"), the buyer
will download "Free Booklet" even when the mimetype is application/pdf).
This causes issues on Mac, as pdf files without extension are renamed
with .dms extensions.
We follow what is done in ir_http's binary_content for the extension management,
using the new one if provided in the name, then the original filename extension
if it exists, and we fallback on guessing it from the mimetype.
OPW 2057302
closesodoo/odoo#36294
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
The fixes that this patch includes are:
- The tag URL for tags printed in short and expanded blog posts had no slug, thus producing a brand new URL. Now they have the slug.
- Any request landed without that slug is slugified with a 301 code, as with the rest of Odoo.
- The `<a>` elements in right column archives have now `rel="nofollow"`.
- The `<a>` elements in right column tag cloud, where more than 1 tag is used, have now `rel="nofollow"`.
closesodoo/odoo#30832
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, when a message contains invalid HTML, it crashed
with error such as: "TypeError: Cannot read property 'childNodes' of
null".
This commit fixes the issue by wrapping the content of messages with
invalid HTML in a `<pre>` tag.
OPW-2048140
closesodoo/odoo#36196
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Fine-tuning 180866fe1e
- Go to Sales > Configuration > Settings
- Enable "Multiple Sales Prices per Product" and select option "Prices
computed from formulas (discounts, margins, roundings)"
- Go to Sales > Catalog / Pricelists
- Select "Public Pricelist" and set "Discount Policy: Show public price
& discount to the customer"
- Add a discount to an event (20 % to "Open Days in Los Angeles" for
example)
- Go to the eCommerce, buy a ticket to "Open Days in Los Angeles" which
as a 20 % discount
Since 180866fe1e the discount is applied
two times.
opw-2058709
closesodoo/odoo#36106
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Fine-tuning of 1da058f8ed, for the same use-case.
The _valid_barcode method is here to bypass the barcode_company_uniq constraint.
The constraint is put on barcode/company couples;
however if checked without a given 'company_id' in the values,
which ends up as False, then the check is actually not the correct one:
the company_id is going to be filled later by the default_get.
Instead we use the value given by the default_get, consistently with the create.
The same error could affect _create_missing_locations,
since it gives an explicit value to company_id that was not passed in values.
We give it to make sure that the company is consistent there to.
opw 2058888
closesodoo/odoo#36102
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Have a product template, assign a dynamic attribute to
(the corresponding variant will be created when used in a SO)
Try to name_search for it
e.g.: in the product configurator modal, type some letters to catch it in theory
Before this commit, the product template was not found by the name search
this is because the template doesn't have any variant yet
After this commit, it is found by the name search
OPW 2060603closesodoo/odoo#36215
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Create a partner with a child *WITH THE SAME NAME*
Create an invoice for the child
Create bank statement and line, with the field partner_name equals
to the child's name (and to its parent)
Open the reconciliation wigdet for that statement
Before this commit, the widget searched lines for the child partner
because partner_name matches the child in priority
Hence the invoice just created was not present
This is because when validating an invoice or a payment
the journal entry's partner will be the commercial_partner_id of the child
By definition the commercial partner_id doesn't have a parent_id set
After this commit, the invoice is visible in the widget
OPW 2039768
closesodoo/odoo#36184
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Fixed backgrounds are disabled when using a mobile/tablet device,
which is not a big deal but, on some of them (iOS...), defining the
background as fixed breaks the background-size/position props.
So we enable this only for >= XL devices.
We may want to find a better alternative for future versions.
opw-2055073
closesodoo/odoo#36187
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit changes the '_get_combination_info' signature according to main
method signature to avoid inheritance problems.
closesodoo/odoo#36125
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
PURPOSE
Test frontend and UI tools of eLearning.
SPECIFICATIONS
Commit fe518f1fea introduced a search on sale order model in checkout
process. However this may fail as access rights are not always granted
* portal users can see orders linked to their company;
* salesman and a lot of specific groups (accounting, ...) can see their own
orders, all orders, or depending on some condition;
* BUT standard users (employee only for example) cannot see any sale order.
Indeed they do not even have right to read, meaning a search fail. Let us
sudo the search as this is contained in a sub method used to fetch some
data.
LINKS
Task ID 1937768
closesodoo/odoo#36166
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
-Create a second blog
-Move one post to this second blog
-Access the post with the url from the first blog
Before this commit:
You will get redirected to the new url with a code 302 (temporary).
After this commit:
You will get redirected to the new url with the code to 301 (permanent).
OPW-2059194
closesodoo/odoo#36161
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When validating a picking from location A to B, location A's quant.quantity
may be updated to a quantity != 0 with _update_available_quantity.
This is because the quant value is written as quantity - float_round(quantity).
As a result, the consistency check would find two existing quants, and raise.
Therefore the picking cannot be validated.
opw 2040091
closesodoo/odoo#35913
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Before this commit, a channel in mobile with option "Send messages
by email" had no composer when opening in mobile.
This issue happened because channel views in mobile are in fact chat
windows. Chat windows with such channels do no display any composer,
which is intended in desktop.
This commit fixes the issue by enabling the extended composer for
chat windows with email channels, just for mobile.
opw-2059468
closesodoo/odoo#36120
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
The color picker in snippet options has two way to set a color: have a
data-color attribute => it is used, or have a o_custom_color class and
the background-color is set directly on that color.
In the case where we select no background color (transparent), it would
work in preview, but when applied the opaque color of the transparent
button (since opacity is not copied) is set which is wrong and
unexpected.
opw-2053636
closes#36131
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This reverts 0164c9dfcb
Have exchange rates:
Domestic - Domestic: 1.0
Domestic - Foreign : 1.113900
Make an invoice: 480 Foreign
Make a credit note: 140 Foreign
Make a payment: 287.20 Domestic
Reconcile all this with a writeoff: 18.04 Domestic
Before this commit, the first invoice was not fully paid
this was due to wrong summing of the partial lines that applies to it
account.partial.reconcile are made between only 2 move lines at a time
Whatever the amounts they hold, it has been computed at creation
and it makes no sense to aggregate their rounding error when computing
their impact on a move line (because, the information is already lost)
After this commit, the use case works, all invoices and payments are fully consumed and reconciled
Note that this is a simple use case, no dates or exchange rates involved
OPW 2057845closesodoo/odoo#36087
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Commit 54d30d5194 introduced `lastmod` and `priority` on sitemap locs.
This was broken with 4ecbacaf59 which introduced `website.page` model as it
removed the `PageConverter`.
Before website.page:
1. PageConverter returned records with `__lastmod`
2. `enumerate_pages` loop on converters would remove the prefixed `__`
After website.page:
1. code to remove `__` was still there but the pages would be found and looped
on after that code, making it useless.
With this commit:
1. The code to remove the `__` is moved after searching the pages.
Following #36090
Related to #35464
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Backport from 12.0 to 11.0
When using barcode to change the customer to a customer with a different
pricelist than the pos default, the customer pricelist was not
automatically selected.
This is a fine-tuning on 5603b778f6
opw-2047070
closesodoo/odoo#36050
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
When uploading an attachment from a chat window, the label
"Uploading..." was not visible. This comes from attachment preview
being too small, thus cutting entirely the filename and the upload
progress bar.
This commit fixes the issue by increasing the size of attachment
previews in chat window, so that it takes 50% width. It also provides
more space for labels on attachment preview while uploading, by
removing the right padding for the animated "unlink" feature that
works only for uploaded attachments anyway.
Note that this commit does not entirely solve the issue: half the
width of a chat window being enough to display the icon, the file
extension, and sometimes the label "Uploading..." completely. The
width of the icon and text extension combined is always the same,
but the label "Uploading..." changes with the locale. The extra space
from the padding removal makes this label fully visible in English,
but not necessarily in other languages. The proper fix requires
re-designing the style of attachment preview, which will be done in
master.
Task-Id: 1978640
closesodoo/odoo#33638
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
- Create a new tax, using the 'Python Code' tax computation
- In 'Applicable Code' field, use a field only available on the
`product.product` model (e.g. `product.code`)
- Attach this new tax to a product that is available in the eCommerce
- Access the eCommerce, search for the product if not displayed.
The template `website_sale.products_item` crashes at rendering because
`code` is not available on a `product.template`.
`product` is supposed to be a `product.product` recordset. However, the
method `_get_combination_info` of `sale` is made in such a way that we
can fetch the information of a template, not a product. Utlimately,
methods `compute_all` and `_compute_amount` are called with the wrong
object.
We fall back on the first variant in this case.
opw-2056722
closesodoo/odoo#36134
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When a COA is installed being loaded for current company, the
translations of taxes, account name, ... (in l10n_be, l10n_ca, l10n_ch,
l10n_sa) are copied from the templates to the accounting records.
This is done in `post_init_hook` which is correct since then
translations are available to be copied.
But when an accounting localization is already installed and we set it
to a company, the translations are not copied.
eg. install l10n_be for company1: accounts name are translated in
french and dutch, set company2 to belgian accounting: only original
language is available.
With this changeset, the translation copy is also performed when an
accounting localization is loaded for a company after it has been
installed.
note: if we install language for first times after setting accounting
localizations, chart of account are translated in that language.
opw-2047013
closes#35985
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>