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 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
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.
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
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
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
4b003afd0a made it so that the constructor
of an orderline calls set_quantity(). The issue is that this function
first asserts that the order is editable. pos_restaurant uses the
clone() of orderline when splitting an order, and this method did not
set order, leading to an error.
This fixes the issue by temporarily cloning the order reference, and
then setting it back to null. It's not the cleanest fix, but seeing as
how the clone() method is only used in one place this will have to do
for now.
In saas-6, the pivot and the graph view have been
split in two separated type of views.
Otherwise said, there is no longer any graph view
with as type "pivot".
opw-658725
When changing the account_id of an invoice line, all the tax line,
created from this invoice line and with a tax which has no
"account_collected_id" set, must be set with the same account_id.
Inspired from the function "compute" in model "account.invoice.tax"
closed#9727
opw:657499
When a new column has been added after that some data already exists,
the old lines will keep an empty/null value. So when we search is the new field
is equals to False or if it is different of True, we need to match the null
values.
Backport of de3b64018a
When a new column has been added after that some data already exists,
the old lines will keep an empty/null value. So when we search is the new field
is equals to False or if it is different of True, we need to match the null
values.
close#9925
Thanks to the fix 503820a, when a fiscal position mapped an included
tax on a SO line, the price unit of the product is recomputed.
This fix has been applied in the function product_id_change in
the model "sale.order.line"
Before the fix, when changing the product uom on a SO line, the price
unit of the SO line was reset with the pricelist price without taking
into account the fact that a included tax could be removed on the SO line.
To avoid this kind of problem, the price unit must be recomputed in any
case according to the taxes.
When creating an invoice with a fiscal position(fp) which maps an included tax(itax)
to an excluded tax(etax). Each invoice line mapped by fp must recompute its unit price
to substract the included tax.
Inspired from 503820aCloses#9811
opw:658109
The multicompany rule on procurement.rule may not be working as the field
company_id is not displayed with no default value (so probably often empty).
This means that the user may have access to rules from another company from the
product but failing to read the stock.picking.type
To avoid regressions introduced by 35f3dea, make a search on stock.picking.type
to filter on the one the user really have access to.
opw 658141
'write_function' transfer the options to 'write' method from the popup form
Steps to reproduce:
1. Create custom model to add a product quantity on hand(readonly) field on stock.move
2. Show this field on Warehouse>All operations>Create a Transfer> Create: Internal Moves
3. Add a Internal Move, then open it again, the quantity on hand field's value show 0. But change the product, the value is correct.
In 22c8db7fcb the concept of
iface_tax_included was introduced. It was not actually used for the
display price though. It looks like a mistake during merging or
something because it adds the code responsible for dealing with the
option after a return statement in get_display_price().
opw-657983
When creating translations (click on blue flag) of a duplicated record, it used
to have the module information of the duplicated record.
It is also not useful to check the module when trying to find if a translation
exists on this record as the res_id is present in the query.
Fixes#9480
Some time new background image, which I set via "Change cover" button don't saved. Because super is called before the jsonRpc and don't wait that the background is saved.
In ee0caa246 we solved some issue when a field was used in a "group by"
filter, but was not considered "groupable" (which does not resolve
related field in their related model to see if they fit the bill).
This was fine, but this has to be also taken into account when these
group by are applied to columns, which is possible by switching x and y
axis.
opw-647401
When testing a mass mailing before sending the mailing
to the contacts (which well, is always the case),
the local links were not replaced by absolute links,
and the override done on the method `send_get_email_dict`
to convert the link `/unsubscribe_from_list` to the actual
unsubscription link was not working, as it relied
on the absolute link.
opw-657982
When a make to order product is sold, a purchase order is created or added to an
existing one. In the second case, the origin of the sale order was lost.
It is now added to the existing source.
opw 656688