Commit Graph
108551 Commits
Author SHA1 Message Date
Holger Brunn 8a4a232e54 [FIX] project_issue: use issue_count instead of counting issues
It is costly to compute all issues, return the full list of all issues, only to
compute the length and display it.
Use proper issue_count field.

Closes #18858
2017-08-22 15:25:12 +02:00
David Vidal 04cddc447b [FIX] website_sale: Avoid compute tax for every company
When a product has multiple company taxes and b2c prices is enabled, price is
not computed properly and adds to the base price every company tax present.

This patch filters the company set on the company so taxes are computed just
for that company.

This closes odoo/doo#18840
2017-08-22 13:18:05 +02:00
Jairo Llopis 48fe0a5953 [FIX] website: get website-specific view ids if available
In a multiwebsite environment, (de)activating some theme views produces
undesired results if the same view exists in different ways for different
websites.

With this patch, we search before for a website-specific view with the provided
 key, and fall back to the XMLID-found one if there is no specific view.

This commit closes odoo/odoo#17970
2017-08-22 13:18:05 +02:00
Jairo Llopis 7c6714d7fe [FIX] website: check website_id on view when applying inheritances.
Before this patch, if some view had both `inherit_id` and `website_id`,
its inheritances were being applied even in different websites.

After this patch, if a view inherits from another, inheritances will only apply
 when both views belong to the same (or none) website.

Refactoring based on the pr #17635
This closes odoo/odoo#17635
2017-08-22 13:18:05 +02:00
Jairo Llopis 15bf41270d [FIX] website: Make Qweb cache website dependent
Without this patch, all Qweb cache is shared among all available websites.
This turns impossible in practice to actually create multiple websites with
different look.

This closes odoo/odoo#18462
2017-08-22 12:03:23 +02:00
Goffin Simon d7481a9bb1 [FIX] website_portal: Wrong word
Typo error.

opw:766578
2017-08-21 14:55:48 +02:00
Yenthe V.G e25b8356e5 [IMP] sale: hide analytic info
Make the view consistent, hide the analytic information to users no in analytic
accounting.

Courtesy of Andrius Laukavičius

Fixes #18875
Closes #18955
2017-08-21 14:04:29 +02:00
Mariano Fernández - https://www.vauxoo.com/ ddc24f63f8 [CLA] add Batuto to Vauxoo's CLA
Done at #18420
2017-08-21 08:45:06 +02:00
Odoo Translation Bot 8cb991c772 [I18N] Update translation terms from Transifex 2017-08-20 04:40:12 +02:00
Joren Van Onder 89cade3bff [FIX] pos_restaurant: wrap product names on OrderChangeReceipt
Reuse generate_wrapped_product_name() which was implemented for
regular POS receipts at 62a8def918.

Fixes #18688
2017-08-18 13:56:39 -07:00
Nicolas Martinelli 110bf158f6 [FIX] website_sale_digital: special character in filename
- Create a product with attachment, and name the attachment 'テスト'
- Purchase the product, make a payment, validate and pay the invoice
- Go to My Orders under My Account, open the order, and try to download
  the file 'テスト'.

An error 500 is raised due to a UnicodeEncodeError.

```
  File "/home/nim/src/odoo/addons/website_sale_digital/controllers/main.py", line 104, in download_attachment
    return http.send_file(data, filename=attachment['name'], as_attachment=True)
  File "/home/nim/src/odoo/odoo/http.py", line 1595, in send_file
    headers.add('Content-Disposition', 'attachment', filename=filename)
  File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 1093, in add
    _value = _options_header_vkw(_value, kw)
  File "/usr/lib/python2.7/dist-packages/werkzeug/datastructures.py", line 830, in _options_header_vkw
    for k, v in kw.items()))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 212, in dump_options_header
    segments.append('%s=%s' % (key, quote_header_value(value)))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 165, in quote_header_value
    value = str(value)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)

```

opw-766568
2017-08-18 11:26:08 +02:00
Martin Trigaux cf8985e37d [FIX] models: properly format load error
In case of foreign language, using unicode characters, the error message may be
badly formated.

e.g.
Unknown error during import: <class 'odoo.exceptions.AccessError'>: เฉพาะผู้ดูแลร..

insted of
Unknown error during import: <class 'odoo.exceptions.AccessError'>: (u'\u0e40\u0e09\u0e1e\u0e32\u0e30\u0e1c\u0e39

opw-766580
2017-08-18 11:12:16 +02:00
Nicolas Martinelli c00267bc34 [FIX] stock: inventory adjustment
The inventory adjustment form is not suitable for large inventories.

First, a list view embedded in a form view is not convenient since it
doesn't provide any search capabilities. The user has to rely on the
search feature of the browser, which has restricted features in
comparison to the Odoo search field.

Then, the existing onchange mechanism coupled with computed fields
triggers heavy computations impacting all lines each time a single
line is modified. This leads to a hanging page for every inventory line
modification, which causes a non-negligeable loss of time.

This commit introduces a new tree view for inventory lines, accessible
thanks to a stat button on the inventory page. This button is available
in debug mode, if the inventory is in state 'Confirmed'. The tree view
contains the same fields than the tree view embedded in the form view,
without the flaws of the latter.

opw-760614
2017-08-17 13:32:02 +02:00
qsm-odoo 1472d92a5d [FIX] website_blog: do not sanitize blog content field
Fixes commit https://github.com/odoo/odoo/commit/02c748be59ac8abc44c945218587e7b8a8e06a28:
Blog content field should not have been marked for any sanitization at
all as it is a field whose content is editable only by users through the
website editor. Any content should be authorized there. In particular,
some snippets contain form elements (like <input/> tags) which are
never accepted during sanitization.

opw-752458
2017-08-17 13:31:22 +02:00
Nicolas Martinelli 99e5a601b0 [FIX] payment_stripe: charge creation failed
To reproduce:
- Buy a product costing 0.01
- Validate the cart, pay with Stripe
- Enter the credit card info, validate

Stripe cannot process the transaction (minimum charge is not met), but
the user is not warned about it. The Stripe pop-up is closed and the
error is recorded in the console silently.

opw-765775
2017-08-17 12:16:28 +02:00
Nicolas Martinelli c9cd44cf56 [FIX] payment_stripe: UTF-8 encoding
For proper comparison with 'PYGí'
2017-08-17 10:43:23 +02:00
Nicolas Martinelli 0888602831 [FIX] website_sale: return sale.order object
Always return a `sale.order` object, otherwise calling method may crash
since they expect receiving such an object.

opw-761344
2017-08-14 16:00:13 +02:00
Nicolas Martinelli 7aa9a7edeb [FIX] website_hr_recruitment: hr department
To reproduce:

- Create department 'Art' parent Department 'Management'
- Create job position and set department 'Art' & publish
- Allow 'Filter by department' from the frontend page
- As a public user, open job => Access Forbidden

The record rule should be adapted to allow accessing departments which
have children.

Actually, the rule could probably be removed since the controller
already lists only the necessary departments.

opw-765736
2017-08-14 15:05:15 +02:00
Martin Trigaux 232885811c [IMP] doc: explain db-filter case
The %d %h options in db-filter are case sensitive but the URL are not.
If you happen to use databases with uppercase in the name, using (?i) may be
needed to match the correct database.

Fixes #17407
2017-08-14 14:18:25 +02:00
Nicolas Martinelli 5c2380e9f4 [FIX] product: create variant
1. Create an attribute with create_variant boolean un-ticked (ie. don't
   create variants from these attributes). For example 'Test Attribute'
2. Create attribute values related to the above attribute. For example
   'Test 1', 'Test 2', etc
3. Create a product (product.template) and assign an attribute (eg.
   Color: black and white)
4. On one of the product variants, add one of the attribute values for
   the attribute we've created in step 2 to the attribute_value_ids
   field to allow for filtering by product attributes that do not create
   variants.
5. Go back to product template and add another attribute value to an
   attribute where create_variant is True (eg. Memory: 16 GB)
6. Our value from attribute_value_ids is gone, and the product has been
   deactivated

When attributes are set with create_variant is False, they are
obviously not used to create variants. Therefore, when we are looking
for existing variants, we should filter out these attributes.

Partially closes #18682
opw-762743
2017-08-14 11:10:43 +02:00
Edi Santoso 8102698dfd [FIX] hw_proxy: error when check status in debug mode
when access status hw_proxy in debug mode it's will raise error,
it's happens because hw_proxy uses subprocess module to get a list of usb
but the subprocess module not imported.

Introduced at 56456359

Closes #18820
2017-08-14 10:47:50 +02:00
Edi Santoso 0004b0e8c4 [CLA] signature for repodevs
Done at #18820
2017-08-14 10:44:31 +02:00
ODOO aaa70fb433 [I18N] remove es_DO translations
Dominican team is focused on Transifex traductions using es.po,
as es_DO.po has a lot of issues in the website and reviewed strings
with wrong wording and mixing english and spanish. From now on
Dominican Republic will inherit es.po and just make specific changes
on github just in the needed words or setences that change base on
region.

Closes #18834
2017-08-14 10:20:37 +02:00
Odoo Translation Bot 55d955691d [I18N] Update translation terms from Transifex 2017-08-13 04:40:05 +02:00
Denis Ledoux cbb52702dd [FIX] point_of_sale: test pos_basic_order do not actually jump in the backend
We avoid to actually jump in the back-end, to prevent
phantomjs to send requests to the server without waiting for them.

Indeed, clicking on the close & confirm button jumps ine the backend,
but the tour is actually finished (and succeeded) once these buttons
are clicked, and just clicked. The test does not actually check if these buttons
makes the user come back in the backend, and it does not wait
for the requests sent because of the jump in the backend to be completed.
Besides, the jump in the backend triggers the compilation
of the common and backend assets, which take some time.

These requests for which phantomjs does not wait triggers
the method `def _wait_remaining_requests(self)` in the
class `class HttpCase(TransactionCase)`, which
leads to the ugly tracebacks in the runbot, waiting
for the requests triggered by phantomjs to be finished.
2017-08-11 16:05:43 +02:00
Yannick Tivisse d7c248e3c0 [FIX] res_config: manage m2o,m2m and o2m for default_ fields
Backport of 81352d47 and f5df7c60 to 10.0

Fixes #5721
2017-08-11 15:31:09 +02:00
Nicolas Martinelli fab24b0011 [FIX] report: do not delete report linked to paper format
A One2many field will unlink the content by default.

opw-765552
2017-08-11 14:11:04 +02:00
Nicolas Martinelli 5d47f68fd9 [FIX] sale, sale_stock: date planned
That shouldn't have been merged. Oops.

This reverts commit ce8ed1c007.
2017-08-11 10:19:08 +02:00
Nicolas Martinelli ce8ed1c007 [FIX] sale, sale_stock: date planned
The date planned of a procurement should be the confirmation date of the
SO + lead time.

opw-756875
2017-08-11 09:00:52 +02:00
Dave Lasley 851e669972 [FIX] website_sale: return ID instead of record during create
partner_id was either a recordset (in create mode), either an id (in edit more)
in the `_checkout_form_save` method.

An id is expected as the result is used in the ORM method (4, partner_id)

Closes #18533
2017-08-10 17:13:53 +02:00
Christophe Simonis 544aa9b04a [MERGE] forward port branch saas-11 up to cfbac106b4 2017-08-10 15:00:33 +02:00
Christophe Simonis cfbac106b4 [MERGE] forward port branch 9.0 up to 1aed433f54 2017-08-10 14:58:24 +02:00
xmo-odoo d140f0ef0e [FIX] prefetch issues on computed/related fields (#18644)
When deciding to prefetch records (getting records from the cache with
no value for the field being fetched), if the field was computed
`determine_value` would just get all records, not limited by the normal
prefetch limit; for large recordsets this would generate gigantic
prefetch lists for records we may not need at all.

Fix by applying the `PREFETCH_MAX` limit to records from the cache as is
done in `_prefetch_field`.

Complementarily, when traversing related fields the prefetch
environment would be lost and every record would get an empty prefetch
environment, so the values would ultimately be read one by one.

Example: select (search) 1000 product.product records, access a
related field (e.g. categ_id) in a loop, on the first iteration the
system would first read 1000 templates, then it would read each
categ_id individually, resulting in >1000 SQL queries rather than the
~2 we would expect.

Fixes #18511
2017-08-10 14:51:27 +02:00
Nicolas Lempereur 354539942d [FIX] website_sale: no-cache IE11 cached cart XHR
IE11 seems to be always using cache when doin an XHR request with the
same GET request.

It can be changed in several ways:

- returning a header: "Cache-Control: no-cache"
- altering the GET request with a nonce
- using the POST method instead of GET

to solve it, in this change the HTTP header is added on the response.

opw-752270
closes #18787
2017-08-10 13:41:37 +02:00
Goffin Simon 1aed433f54 [FIX] website_event: Website Event Error when you encode a 0 value in the registration
The function registration_new must return a type json.

opw:765643
2017-08-10 09:27:05 +02:00
Nicolas Martinelli ac392096d8 [FIX] stock: recompute display name
The display name of a location should be recomputed when the name of the
parent location is changed.

opw-761463
2017-08-10 09:00:59 +02:00
Christophe Simonis f69655829a [MERGE] forward port branch saas-11 up to acbcfa3703 2017-08-09 14:43:39 +02:00
Christophe Simonis acbcfa3703 [MERGE] forward port branch 9.0 up to baca743cc0 2017-08-09 14:14:44 +02:00
Christophe Simonis baca743cc0 [FIX] mail: force attachment type
Do not rely on default value. The context can contains a `default_type`
value intended for another model.
2017-08-09 14:06:13 +02:00
Christophe Simonis 6a767a8900 [MERGE] forward port branch 9.0 up to 3d119c44f3 2017-08-09 13:57:30 +02:00
Nicolas Martinelli 0c92b616e8 [FIX] website_sale: mandatory fields
All fields appears in bold (= mandatory) in the checkout form, while ony
some of them are.

opw-760328
2017-08-09 11:21:17 +02:00
Lucas Perais (lpe) 3d119c44f3 [FIX] point_of_sale: correct inheriting from pos_order_line being an issue
Before this commit, when creating a pos_order_line_pro_forma, which inherits from pos_order_line but in a different table, the create confused an overriden field (order_id)
When pos_blackbox was installed, pro forma lines would search for an pos_order instead of a pos_order_proforma upon their creation

This commit allows an inheritant of pos_order_line to use the super.create function

OPW 745685

Closes #18755
2017-08-09 11:09:35 +02:00
Jerther 64190abec5 [FIX] web: display full error message
Add missing parenthesis, fixes ebc23b5
2017-08-09 09:53:26 +02:00
Sylvain GARANCHER c29ac80c11 [FIX] product: Avoid browsing on product.product when using product.template
Steps to reproduce the bug:

On an empty database, install the sale module
-Activate product variants : Sales > Settings > Check Products can have
several attributes, defining variants (Example: size, color,...)
-Activate advanced pricelists : Sales > Settings > Check Advanced pricing based
on formulas (discounts, margins, rounding)
-Activate the developer mode
-Go to the product.templates list : Sales > Products
-Go to the debug menu > Edit TreeView and add the price field in the view
-Go to the debug menu > Edit Action and add the value 'uom': 1 in the context field
-Search for a pricelist : Type the name of an existing pricelist, then go to the pricelists
proposal, open the list of proposed pricelists, and select the pricelist

Bug:

The wrong value was sometimes displayed in the price field. To be more exact, the displayed
value for each product.template was the price of the product.product that has the same id.
If a product.template has an id which doesn't exist in the product_product table,
this product disapears from the list.

opw:762663
2017-08-09 09:13:50 +02:00
Sylvain GARANCHER 10f6e145dd [FIX] product: The pricelist variable must be a recordset, not a list
Steps to reproduce the bug:

-On an empty database, install the sale module
-Activate product variants : Sales > Settings > Check Products can have several attributes, defining variants (Example: size, color,...)
-Activate advanced pricelists : Sales > Settings > Check Advanced pricing based on formulas (discounts, margins, rounding)
-Activate the developer mode
-Go to the product.templates list : Sales > Products
-Go to the debug menu > Edit TreeView and add the price field in the view
-Search for a pricelist : Type the name of an existing pricelist, then go to the pricelists proposal,
open the list of proposed pricelists, and select the pricelist

Bug:

A traceback was raised.

opw:762663
2017-08-09 09:13:50 +02:00
Nicolas Martinelli 483a4fd8d7 [FIX] hr_expense: do not format total_amount
A `currency_id` field on a `hr.expense.sheet` only makes sense if all
expense lines are in the same currency. It is very likely to not be the
case, so don't format the total amount.

In master, the fild should simply be completely removed.

opw-761098
2017-08-08 18:14:46 +02:00
Goffin Simon a31820d0cb [FIX] account: Only 64 characters for the name of an entry
When creating a customer invoice with description/reference with more than
64 characters, the description was cut to generate the name of the account move
lines. But it's possible to create an entry with more than 64 characters as name
by the interface. The limitation is deprecated.

opw:760316
2017-08-08 15:54:41 +02:00
Lucas Perais (lpe) ea2568b19c [FIX] website_portal_sale: image on a portal SO should always be displayed
before this commit, when a portal SO was done with a product that hasn't been "website_published", a placeholder was displayed instead of the image
After this commit, the correct product image is displayed in base64 (always image_small though)

OPW 760880

Closes #18709
2017-08-08 10:35:08 +02:00
qdp-odoo 792a402126 [FIX] account: fix tax_ids computation on aml creation from invoice.
In case of a tax affecting subsequent taxes, the tax_ids field was wrongly set which led to errors in VAT reports. OPW 757072.
2017-08-08 10:29:57 +02:00
Christophe Simonis a6917c22b3 [MERGE] forward port branch 9.0 up to af7eb04fc7 2017-08-07 17:56:45 +02:00