These menus are supposed to display the message
to: me / to do that matches the `To Read` filter.
The filter was correctly displayed in the search
view, but the records displayed were not the
result of the search, because the call to
`message_read`, in `message_fetch` was done
too early, with the wrong domain.
This is because `searchview.has_defaults`
& `searchview.ready` have disapeared in saas-6,
with the refactoring of the search view.
opw-659137
If one set a carrier_tracking_ref on a stock.picking,
but the carrier_id is not set, the button Tracking
will appear but crash as this button calls a method on
the carrier.
opw-660659
When there is no lang set, format_tz uses server locale to format a
date. If my server is in French, date is formatted using '%B' (full
localized month name). This can lead non-ascii strings like
"décembre"...
Models' write function has a return value which was not propagated when
overriding it for ir.ui.view in website_version module.
opw-658965
note: fix was already present in enterprise f0975cb
in `view_pivot.js`,
the method `view_loading` must wait the `self.fields` variable
to be defined before working properly.
This `self.fields` variable is filled in the `prepare_fields` method,
which is called in the `start` method, through a deferred named
`load_fields`.
`view_loading` is called in `start`, in `views.js`.
Therefore, in the overriden method `start` of `view_pivot.js`,
the call to `_super`, calling the `start` of `views.js`, must wait for
the `load_fields` deferred to be resolved.
Otherwise, the `self.fields` variable, mentioned above, won't be
filled in time.
opw-660153
Before this the only thing that would ever be printed was 'Guests: ',
because it was only added when receipt.customer_count evaluated to
false. Another issue is that receipt.customer_count doesn't exist in the
point_of_sale module. It is created by pos_restaurant, so there's where
it should be added to the receipt.
- The revision 950d66c086 brokes
the current inheritage. We replace it with a stronger inheritage.
- If the product is not published, the portal user cannot access
it on its product page `/shop/product/`, there is therefore
no need to set the link to this page.
opw-660191
This revision is related to 950d66c086
There is no need to browse the product as `sudo`, this is already
the case, as the template `website_portal.orders_followup` is rendered
with `order` browsed as `sudo` in the qweb context variables.
1.In a SO, it's the line description that should be displayed rather
than the product name, for multiple reasons:
- The portal user may not have the right to see the variant attributes
values, and therefore the portal user would see which variant
he bought
- The description line can be customized by the salesman, adding,
extra information and so on
- The description line is within the customer language
2.If the product is not published on the website, the portal user
cannot see the product image, but the image should nevertheless
be displayed for his portal quotations. In addition, this is possible
to install `website_portal` without having installed
`website_sale`, and in such a case, the field `website_published`
is not even available on `product.product`.
opw-660191
Was available before 3098ab7fd1.
This time, a special key in the context is required as this behaviour is quite slow.
(This commit could have been named "Dirty Hacking")
Because we now correctly format numbers, we have to parse the number
strings with web.parse_value(), then calculate the new amount and then
convert them back to a correctly formatted number string.
The number popup uses gui.numpad_input() which now only allows the
correct decimal separator (before this it was hardcoded as '.'). So we
now have to use the correct decimal separator in that particular popup.
Because of that we also have to correctly format the default tipping
amount AND also parse whatever value we get back from the popup through
web.parse_value().
Although you could do this formatting directly in the NumberPopupWidget
constructor, this would not be ideal because this widget is also used
for numbers that shouldn't adhere to the formatting (eg. PIN numbers).
In some places '.' was hardcoded as a decimal separator. Because now
payment amounts now get passed through web.parse_value() this causes
issues when the the decimal separator is not '.'.
opw-660024
The initial problem is when generating a PO from SO (or the inverse) the taxes were not propagated to the new created line. Taxes are company dependent field : so when we create a PO in company A, the PO line contains the taxes of company A, but we want the corresponding SO line in company B to have the taxes of company B, which wasn't the case.
This commit makes the taxes propagation works. The initial line is now browse as sudo() to get all the taxes related to this line (or its product). Then we filter them to keep only the ones from the right company.
Do not forward port this commit, since the same patch will be applied in 9.0e
In 9.0 image_medium and image_thumb route are used to display thumbnail
of website_slides document.
These in 9.0 will scale the image, but also crop it so it has a good
aspect ratio.
In saas-6 this croping feature is not present and these thumbnail will
be scaled in diverse ugly way.
To improve a little the situation, this commit use some CSS (currently
not supported only by internet explorer) which give a similar aspect as
9.0's got.
opw-658957
The "delivery" module restricts the access to delivery.carrier objects.
There is no reason to relax this in website_sale_delivery.
Furthermore, nearly all the code of website_sale_delivery accesses
delivery.carrier in sudo mode already.
Closesodoo/odoo#9812
The function "_store_average_cost_price" doesn't have to update
the average cost price of a product if qty of the product in the move
is equal to zero.
opw:659329
The current code to show reccurent event would mingle on a searched
domain and add recurrency test leaves as alternative next to a leaf:
('start{,_date,_datetime}', '>=', '{date value}')
But in 43a12e9 the domain generated by the client was simplified, but
the had not yet been updated to reflect this change.
fixes#9165closes#10084
opw-658241
The list_price field doesn't take the extra price of variations
into account. Actually, it's not even a field of product.product.
The lst_price, however, is defined on both product.template and
product.product and does account for the extra price of variations.
OPW 659330
When adding a line in a PO with the SUPERUSER_ID all the record rules
didn't apply on him. Then all the supplier taxes set on the product
were written in the PO line even if some of its were not in the company
of the user. Then with the SUPERUSER_ID, just the company taxes of this
user must be applied. Inspired from product_id_change in model
'sale.order.line'.
opw:659236
Description: When updating the product module, if the "Service"
product.product has been deleted, but not the corresponding
"product.template" part, the update will crash on a "duplicate xml id"
error.
This commit fixes the bug by :
- Adding the link to existing inherited model xml id in values
- Avoid creating the duplicated XML ID
If the XML ID is found, but orphan, it's simply deleted.
Closes#8966
opw-658454
Backport of 48156efcd9 + 44f6409731 that fixed the problem in next versions
Revert of da563bcf5c that hid warning for users in backend
One day, we will have to refactor website_sale_delivery. But today, we are the dung beetles.
When a lead is converted into an opportunity and a new partner is
created, the user_id of the partner is not in line with the user_id of
the opportunity.
opw-659028
.insert() is not possible on a recordset
Generating the payslip details report with at least one payslip category
having a parent, the rendering of the report was crashing.
Closes#9778
The size of the ecommerce cart quantity component (- button, input with
quantity , + button) is by default fixed at a given width, but given
some theme styling the padding of the buttons are so big there is not
even one figure visible in the input.
With this change, the appearance doesn't change for most themes, but for
bootswatch Cosmo and Flatly we go from seeing 0 figure to at least two
figures.
opw-658224
This is a backport of commit 3d32e99665 done
in 9 and ported to the old API. The purpose is to avoid searching on
the res.partner table with a domain leaf being user_ids != False. Indeed
this search is costly. Use a direct search on the user table instead.
When sending a mail.mail with email_to, the processing split the email_to into
a list of addresses. However if the found addresses use the form name <email>
the name if lost in the process. A new email_split_and_format method is introduced
in tools and used to avoid loosing that information.
Mailing lists (mail.group) should not send specific notification emails.
Indeed there can be a lot of recipients and customizing each email can
take time to compute. This leads to posting a message on a mail.group
being very slow.
It is now possible for a model to customize the notification email
recipients computation. The first use is to ensure that mail.group
encodes recipients using email_to instead of recipients_ids. This way
less processing is performed on notification emails.
Part of the number formatting overhaul done in
5c9b4556e3,
4b003afd0a,
261ccf7c56 and
6e945de681. The only place left where we
didn't correctly format the numbers was in the tendered column on
the payment screen. This fixes that by not directly displaying the
inputbuffer anymore. Instead we pass the payment line amount through
format_currency_no_symbol() and display that instead. We also give a
default amount of 0 to parse_value so it doesn't return false for an
empty string.
With a UPS delivery type carrier,
`ups_get_shipping_price_from_so` can return a `ValidationError`,
making the carrier unavailable for this order.
Nevertheless, the iteration checking the availability of the remaining
carriers must be ensured.
opw-657161
When a user clicks on the `Send to all` button in a mass mailing form,
then all emails (sometime thousands) are sent inmediatly.
With this fix, a confirmation dialog appears
and the user is asked to confirm this operation.
This simple fix prevents common human errors.
opw-659117
Closes#9796
If an event is moved at another time, its appearance would only be
refreshed if it was successful. But in this particular instance, the
refresh may even be more useful when the change failed.
part of #9837
second half of:
opw-657863
If the method do_enter_transfer_details is called form the new API, the context
is a frozendict and can not be updated and the previous code would crash.
Copying it before updating.
Closes#9872
The method `product_id_change` has become quite a mess with time as it
gathers a lot of onchanges. Therefore, previous commits were made in
order to prevent unwanted side effects, such as af07b2a0, 1cedcf6a and
136bd723.
This revision fixes the weight which was lost with commit af07b2a0.
opw-658712