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>
When a user either joins and leaves a channel, it posts a message of
type 'notification' with either action as content.
Before this commit, such messages above were incrementing the unread
counter of the channel. As a result, the messaging menu was showing
this channel as unread with this message.
Messages of type 'notification' should never increment the unread
counter of channel.
This commit fixes the issue by preventing new messages of type
'notification' to increment the unread counter of a conversation.
This should also prevent increasing the counter of the messaging
menu, in addition to highlighting this channel as unread from the
messaging menu.
Task-Id 2059515
closesodoo/odoo#36293
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
It's due to MRP refactoring that confirm raw moves before finished
moves. It implies that in _assign picking, SFP with final product
will search a picking but the stock.move do not have a created_production_id
and it will be merged inside the intermediate SFP (it works before
because it was the intermediate SFP that was merged in the finished SFP).
_key_assign_picking is also added if multiple moves are confirmed w/
and w/h created_production_id, we won't merge them in the same picking.
closesodoo/odoo#36335
Signed-off-by: Christophe Simonis <chs@odoo.com>
Before that, when removing a tax previously set on an account.move.line in tax_ids, the onchange event did not remove the corresponding tags from the base line, causing possible errors in tax report.
closesodoo/odoo#36283
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Now, Swiss users can auto populate BVR number generated for invoice in it's 'Payment Ref.' field
by simply configure it in 'Communication Standard' of invoice's journal.
task: 1999530
closesodoo/odoo#36253
Signed-off-by: Josse Colpaert <jco@openerp.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>
Doing filtered on all_post is problematic in case there are many
blog.post records (>5000 were observed). It will trigger prefetching
which will run the content fields through html_translate which can
take many seconds to complete.
Instead replace the filtered call with a more precise search domain.
opw-2060704, opw-2060706
closesodoo/odoo#36207
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Like in other places where we have social sharing buttons, when we pass
a URL or title as a parameter it needs to be properly encoded.
closesodoo/odoo#36197
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When we try to change the color of kanban, the kanban record is re-renders,
kanban record is replaced with kanban-box and subWidgets are re-rendered,
reset of all subWidgets are called which will re-render widget but it is not
rendered in DOM as DOM element is destroyed and hence dashboard_graph widget
can not computed proper height of the canvas element and disappear
Call on_attach_callback after widget reset is called on kanban record, as widget
element is removed from DOM and new element is added in DOM so
on_attach_callback should be called again.
task-2036256
closesodoo/odoo#35254
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Have a product valued in real time
make a PO to a vendor with that product, with a tax
validate
Before this commit, it crashed because of a typo
After this commit, the invoice is validated
OPW 2061472
closesodoo/odoo#36216
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
On top of leading to AccessError in multi-company (if the PO was created
by OdooBot), it might also assign a user without Accounting rights to a
vendor bill.
This reverts commit 392f6f2b2b.
opw-2056061
closesodoo/odoo#36173
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Have a pricelist Pl set as property_product_pricelist on some partner Pa.
Archive Pl, so that the public user Pu use another pricelist Pl'.
Go to the shop, create some order.
The prices are obtained from Pl'.
Log in as Pa; prices are updated using Pl.
However since Pl is archived, it is not visible on the pricelist views,
so the end user cannot explain why the prices changed.
When the pricelist is archived, nothing is done regarding the ir.property
storing the partner/pricelist mapping, so the pricelist is retrieved as default
nonetheless.
We filter out the active pricelists when getting the property.
opw 1946476
co-authored with JKE-be
closesodoo/odoo#36389
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Take a landed cost with an amount_total of 2464788.5
in a currency with no decimals, so precision_digits is 0.
Now let the sum of the lines 2464788.499999999.
Additionally, we have that 2464788.5 is rounded up to
2464789 and 2464788.499999999 is rounded down to 2464788.
So float_compare returns a nonzero value.
However, it turns out that the docstring of float_compare contains:
Warning: ``float_is_zero(value1-value2)`` is not equivalent to
``float_compare(value1,value2) == 0``
So the intended use was to use float_is_zero.
opw-2048388
closesodoo/odoo#36208
Signed-off-by: Nans Lefebvre (len) <len@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>