Commit Graph
96537 Commits
Author SHA1 Message Date
Denis Ledoux cccec4ac62 [FIX] mail: To: me, To-do display messages to_read
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
2015-12-24 14:13:17 +01:00
Martin Geubelle 4f1bfdf640 [FIX] delivery: tracking button traceback
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
2015-12-23 16:30:37 +01:00
Richard Mathot 6191e3f6d0 [FIX] mail: format_tz crash if server locale returns non-ascii month name
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"...
2015-12-23 10:44:51 +01:00
Denis Ledoux aef8a4d618 [MERGE] forward port of branch 8.0 up to f9f7669 2015-12-21 18:24:22 +01:00
Nicolas Lempereur 9bdaf45de6 [FIX] website_version: typo write return value
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
2015-12-18 16:33:36 +01:00
Denis Ledoux c9acaa428c [FIX] web: view pivot, start must wait load_fields
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
2015-12-18 15:49:38 +01:00
Martin Geubelle dc25eac8d4 [FIX] sale_stock: replace except_orm exception by UserError
As the raise of this `except_orm` exception
has been replaced by a `UserError`
from revision 0fd773a

opw-658566
2015-12-18 13:15:05 +01:00
Joren Van Onder 6d43387f58 [FIX] point_of_sale: print amount of guests correctly on ESC/POS receipt
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.
2015-12-18 12:21:30 +01:00
Denis Ledoux 7bae4098b2 [FIX] website_sale: stronger inheritage and handle not published products
- 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
2015-12-18 12:09:02 +01:00
Denis Ledoux 3ddbb0bd19 [FIX] website_portal: ol.product_id is already sudo
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.
2015-12-18 12:05:53 +01:00
Denis Ledoux 950d66c086 [FIX] website_portal: variant name and images rights in portal quotations
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
2015-12-18 11:46:13 +01:00
Richard Mathot 43aaf30b15 [IMP] delivery: re-enable the ability to display delivery price in name_get
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")
2015-12-17 15:31:22 +01:00
Joren Van Onder 682e66043f [FIX] point_of_sale: fix the +10, +20 and +50 buttons
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.
2015-12-17 15:13:36 +01:00
Joren Van Onder 631d6b19d4 [FIX] point_of_sale: make tipping adhere to correct number formatting
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).
2015-12-17 15:13:36 +01:00
Joren Van Onder da9275abde [FIX] point_of_sale: use correct decimal separator for payment amounts
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
2015-12-17 15:13:36 +01:00
Jérome Maes b6fa479000 [FIX] inter_company_rules : misplaced sudo to prepare value to create PO/SO lines
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
2015-12-17 11:26:33 +01:00
Nicolas Lempereur a2cb0e96e3 [IMP] website_slides: improve not pretty thumbnail
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
2015-12-16 17:33:09 +01:00
Holger Brunn f9f7669e60 [FIX] pass context as keyword argument to search()
closes #10080
2015-12-16 11:42:05 +01:00
Richard Mathot 494e481b6e [FIX] website_sale_delivery: use sudo mode for reading carrier info
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.

Closes odoo/odoo#9812
2015-12-15 16:59:25 +01:00
Danimar Ribeiro 1ac94db8e8 [FIX] context to map_tax
Missing context to map_tax calls
Fixes #9909
2015-12-15 16:10:16 +01:00
Goffin Simon 1995c347b6 [FIX] stock_account: _store_average_cost_price
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
2015-12-15 16:03:25 +01:00
Nicolas Lempereur 61398b2b46 [FIX] calendar: recurrent event after first occurences
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 #9165
closes #10084
opw-658241
2015-12-15 15:41:12 +01:00
David Monjoie f1ed73e5ea [FIX] stock_account: default on lst_price instead of list_price
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
2015-12-15 12:29:02 +01:00
Nicolas Seinlet 5f35530615 [IMP] Stock: various small optimization to load barcode interface faster
Perform search_read instead of read then search
Perform some RPC in parrallel instead of sequentially
Do not reload uls everytime
2015-12-15 10:27:36 +01:00
Florian Bruhin ccc26849e4 [CLA] Florian Bruhin
Closes #10045
2015-12-15 10:10:34 +01:00
Goffin Simon eb993b7f3b [FIX] purchase: supplier taxes in onchange_product_id
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
2015-12-14 12:15:12 +01:00
Goffin Simon 2150a6f1e9 [FIX] crm: on_change_partner_id in crm.lead view
The function "on_change_partner_id" defined in the model "crm.lead"
must be triggered each time the field "partner_id" is modified.

opw:659239
2015-12-14 12:04:38 +01:00
Sylvain GARANCHER 80b373f1e5 [FIX] ir_model: Fixed XML data recreation when inherited part are not deleted
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
2015-12-14 11:46:49 +01:00
Odoo Translation Bot 63414bef54 [I18N] Update translation terms from Transifex 2015-12-13 02:56:20 +01:00
Richard Mathot 48cdd1e77f [FIX] website_sale_delivery: unavailable carriers don't hide the other ones anymore
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.
2015-12-11 16:16:27 +01:00
Nicolas Martinelli e04b9d5542 [FIX] crm: same salesperson
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
2015-12-11 14:02:00 +01:00
Goffin Simon 47e7f5d9bd [FIX] stock_account, sale_stock: _get_partner_to_invoice
When getting the partner to invoice, the function _get_partner_to_invoice
must check the type of the invoice to create.

opw:658460
2015-12-11 13:13:48 +01:00
Martin Trigaux 44dd7c5077 [FIX] hr_payroll: recursive search of salary rules
.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
2015-12-11 12:48:00 +01:00
Nicolas Lempereur df638109a3 [FIX] website: min-width of quantity spinner input
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
2015-12-11 11:45:12 +01:00
Thibault Delavallée 345f393ac0 [FIX] mail: performance in find_partner_from_email
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.
2015-12-11 11:22:40 +01:00
Thibault Delavallée 3f758e2fab [FIX] tools, mail: do not strip name from email_to
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.
2015-12-11 11:22:40 +01:00
Thibault Delavallée d4a1eb4435 [FIX] mail, mail_group: recipients of mail groups
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.
2015-12-11 11:22:40 +01:00
Raf Ven a1db9c3ac0 [FIX] l10n_be_invoice_bba: constraint _check_communication
The constraint checks a non-existant field 'Communication'.
Should be 'reference' and 'reference_type'

Closes #9739
2015-12-11 11:10:37 +01:00
andreparames 6b9b2274e5 [FIX] doc: http.route auth=public instead of admin
Removed the `admin` option, since it was removed on 04a5264, and added the
option `public`.

Fixes #9688
2015-12-11 10:52:52 +01:00
Luis Felipe Mileo 16dbef4a13 [FIX] sale: missing digits precision on sale/th_weight
Make sense as the weight field has the 'Stock Weight' precision in product and
delivery.
Closes #9932
2015-12-11 10:14:23 +01:00
Joren Van Onder 697739dd64 [FIX] point_of_sale: make tendered amount adhere to currency formatting
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.
2015-12-11 09:45:35 +01:00
Denis Ledoux da563bcf5c [FIX] delivery: Ensure carrier availability iteration after a fail
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
2015-12-10 18:28:17 +01:00
Antonio Espinosa d0ccd87e79 [FIX] mass_mailing: Confirmation when sending a mass mailing
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
2015-12-10 17:41:53 +01:00
Nicolas Lempereur 73d5f62acd [IMP] web_calendar: refresh event after fail
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
2015-12-10 17:01:49 +01:00
Stefan Rijnhart b139c5819d [FIX] email_template: allow override of in new API
If context is passed as a non-keyword argument to a new-API override of this
method, it ends up as the positional fields argument.

Closes #9911
2015-12-10 15:28:21 +01:00
Jonathan Nemry (ACSONE) 43482d2d1e [FIX] mass_mailing: translatable unsubscribe link
Display the unsubscribe link in the language of the user

Closes #9995, opw 659075
2015-12-10 14:30:18 +01:00
Christophe Matthieu 267ab22d00 [FIX] website_sale: variable reference
'message' variable was not always defined.
Set a default value.
Closes #10006
2015-12-10 14:17:03 +01:00
Sébastien Maillard feef50adae [CLA] Corporate CLA for Elico Corporation
Closes #10010
2015-12-10 13:58:29 +01:00
Alexandre Fayolle 9f65dad250 [FIX] stock: mutation of the context
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
2015-12-10 12:25:34 +01:00
Nicolas Martinelli 35a390daf1 [FIX] sale: change qty updates weight
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
2015-12-10 11:37:34 +01:00