Commit Graph
96494 Commits
Author SHA1 Message Date
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
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
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
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
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
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 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
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
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
Joren Van Onder 6e945de681 [FIX] point_of_sale: don't error when splitting an order
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.
2015-12-09 10:33:15 +01:00
Christophe Simonis 12d799623c [MERGE] forward port of branch 8.0 up to 83a4a58 2015-12-08 13:03:08 +01:00
Christophe Simonis 83a4a582fa [MERGE] forward port of branch saas-3 up to 513cea6 2015-12-08 12:28:41 +01:00
Christophe Simonis 513cea69c6 [FIX] auth_oauth: do not transfer debug flag to OAuth provider
This parameter is not part of the spec [1] and may not be supported by
all OAuth providers.

[1] http://tools.ietf.org/html/rfc6749#section-4.2.1
2015-12-08 12:16:42 +01:00
Christophe Simonis 47b2f7ea9e [MERGE] forward port of branch 7.0 up to 3a1c693 2015-12-08 12:16:00 +01:00
Denis Ledoux 74b4f5d2ea [FIX] crm: Leads analysis graph view
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
2015-12-07 15:55:58 +01:00
FalcoBolger 4ba2e91aa4 [FIX] base_action_rule: pass kwargs when calling create/write's origin method 2015-12-07 12:26:40 +01:00
Goffin Simon 85e33c8e1d [FIX] account_anglo_saxon: incorrect account tax
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
2015-12-07 11:29:25 +01:00
Odoo Translation Bot 0de99dd2c8 [I18N] Update translation terms from Transifex 2015-12-06 02:56:34 +01:00
Jeremy Kersten 3a1c693259 [FIX] osv: fix boolean in domain for custom field
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
2015-12-04 18:22:32 +01:00
Jeremy Kersten de3b64018a [FIX] osv: fix boolean in domain for custom field
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
2015-12-04 16:31:31 +01:00
Christophe Matthieu 0b34903388 [IMP] website_sale: no change in behavior but allow other comportment for new ecommerce designs
Allow toupdate the order content in js on an other page that the cart. An allow to use table instead of only div.
2015-12-03 12:00:00 +01:00
Goffin Simon cccb2351c4 [FIX] account: Bank statement reconciliation
To avoid to reset the partial reconciliation when the number of selected
lines is different to 1.
2015-12-03 11:24:07 +01:00
Christophe Matthieu d478b45e43 [FIX] website_sale: forEach doesn't exist for some browsers 2015-12-03 10:45:05 +01:00
Christophe Matthieu d0375a6f07 [IMP] website_sale: no change in behavior but allow new ecommerce designs 2015-12-03 10:45:05 +01:00
Goffin Simon 2749f73f9b [FIX] sale: update_tax in product_id_change
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.
2015-12-03 09:21:03 +01:00
Goffin Simon 8af539b202 [FIX] website_sale: "Add to Cart" button with inactive variants
When clicking on "Add to Cart" button(a link in fact) with an
inactive variant in the Shop, the button must be disabled.

opw:657967
2015-12-02 17:13:05 +01:00
Goffin Simon d9f92ba160 [FIX] account: included tax with fiscal position
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 503820a

Closes #9811

opw:658109
2015-12-02 16:47:51 +01:00
qdp-odoo 077a168d4c [FIX] stock_account: counterpart account of a cost price adjustment is more likely the expense account instead of the stock input/output. Backport of commit 57d0903154 2015-12-02 16:20:32 +01:00
Martin Trigaux 16e4cd15f0 [FIX] stock_dropshipping: multicompany filter
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
2015-12-02 16:07:11 +01:00
Christophe Matthieu 4d8ec5f931 [FIX] web: readonly fields not transferred from dialog to 2many field
'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.
2015-12-02 13:29:51 +01:00
Joren Van Onder 911e49c1d5 [FIX] point_of_sale: don't ignore iface_tax_included
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
2015-12-02 12:39:50 +01:00
Martin Trigaux 27d439901c [FIX] base: create translations of a duplicated record
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
2015-12-02 10:57:46 +01:00
Christophe Matthieu ae175d1574 [FIX] website_blog: change_background doesn't work occasionally
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.
2015-12-02 10:40:16 +01:00
Nicolas Lempereur bcd7273ba8 [FIX] web: pivot axis switch groupby field
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
2015-12-02 09:55:05 +01:00
Denis Ledoux 258c11a9a6 [FIX] mass_mailing: unsubscribe link when testing the mailing
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
2015-12-01 17:23:32 +01:00
E.R. Spada II fc61bfe993 [CLA] Update eugeconsulting CLA
Add support email.
Closes #9803
2015-12-01 15:56:00 +01:00
Martin Trigaux 44eeb387d3 [FIX] purchase: updating existing PO should keep origin
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
2015-12-01 15:23:46 +01:00
Christophe Matthieu 1cd03ed7fe [FIX] web: one2many set_value must use dataset last_default_get as default values 2015-12-01 13:41:28 +01:00