Commit Graph
108365 Commits
Author SHA1 Message Date
Nicolas Martinelli 69fa111e95 [FIX] stock_account: negative quant cost
- Set up a product with 'Real Price' costing method, in real time
  valuation
- Receive 1000 units at $0.10 each
- Create a landed cost of $456.70, validate => it creates a quants of
  999 units at cost $0.56 and 1 unit at cost $-2.74.
- Perform an inventory adjustment, and set the quantity to 0 instead of
  1000, post inventory.

An error arises due to the constrain debit + credit >= 0.

This is caused by the method `_prepare_account_move_line` from
`stock.move`, which cannot handle negative cost for quants.

opw-752063
Fixes #17707
2017-07-13 13:20:24 +02:00
Goffin Simon 37ff69d45e [FIX] mrp: Post inventory button without finished product"
This fix 2332df6bc7  has been done in stable and some customers
wants to keep the button "Post Inventory" available all the time.
Now the button is just visible in developper mode.

opw:748347
2017-07-13 11:23:42 +02:00
Nicolas Martinelli 68934c6b87 [FIX] mass_mailing: access error when 'Retry'
A user without 'Administration/Settings' access rights cannot use the
'Retry' button on a mass-mailing.

This is because only this level of power is allowed to unlink
`mail.mail` records. However, this button is supposed to be used by
regular mass mailing users.

opw-744616
2017-07-12 15:33:38 +02:00
Cedric Snauwaert 999dc80e7c [FIX] base_import: when parsing date field, strip extra spaces 2017-07-12 13:48:22 +02:00
Christophe Matthieu e6e17cc5d6 [FIX] product: Error message when adding an item to a quote
When a user tries to add a product on an opportunity, the date_order of the
order is added into the context. This value can be False.

When "_compute_price_rule" is called without "date" arguments
(some onchange, compute...) the method method use the context date (in this
case the value is False) or the today date.
The date value is used in an sql request and raise a value exception.

opw-751700
2017-07-12 13:39:29 +02:00
Moisés López 566968bf99 [FIX] doc: use new URI wkhtmltopdf releases
The old release of wkhtmltopdf are no longer published on the download page.
The developer explicitely asks to use the github link

cf: wkhtmltopdf/wkhtmltopdf#3524
    wkhtmltopdf/wkhtmltopdf#3521
    wkhtmltopdf/wkhtmltopdf#3518
    wkhtmltopdf/wkhtmltopdf#3508

Closes #18146
2017-07-12 10:13:32 +02:00
Christophe Matthieu a6f2dc07e5 [FIX] sale: traceback when choosing a product with warning as order.line
If a user chooses a product that has a blocking error message, the product
is set to False. This is good, but we do not want the following to happen:

The other onchange triggers are called and "product_uom_change"
generates an error because there is no product. (In fact it is
"_compute_price_rule" on "product.pricelist" who raise)
The onchange update the values of the other fields related to the
product (eg for the "name" field where the name of the product that
is canceled by the warning is assigned).
2017-07-12 09:50:45 +02:00
Martin Trigaux ce11312dba [FIX] doc: remove nonexistant reference
business removed at 411f8208
2017-07-12 09:37:49 +02:00
Christophe Simonis 0ac49ee1e4 [MERGE] forward port branch saas-11 up to d52f0a29b4 2017-07-11 10:45:36 +02:00
Christophe Simonis d52f0a29b4 [MERGE] forward port branch 9.0 up to 479facb783 2017-07-11 10:34:07 +02:00
Goffin Simon e43b54cf3c [FIX] sale: Wrong taxes amount printed in SO
Steps to reproduce the bug:

-Create a tax group TX with two taxes: 15% and 5%
-Create a SO with one line and set TX on it
-Print the SO

Bug:

Only the first tax of TX was taking into account

opw:748923
2017-07-10 15:14:35 +02:00
Christophe Simonis 479facb783 [MERGE] forward port branch saas-6 up to e26d85e836 2017-07-10 15:07:43 +02:00
Christophe Simonis e26d85e836 [MERGE] forward port branch 8.0 up to 49407e46cb 2017-07-10 14:58:37 +02:00
Lucas Perais (lpe) 8bd56bb466 [FIX] website_sale, website_sale_options: fixing prices of product vs options in the modal
Before this commit, having an option on a product, the modal had every prices set to the one of the option
This was brought about by commit c8a434306f which was designed for the pricelists and striked prices

After this commit, we keep the intended behavior for pricelists while controlling that options would not mess up the modal
The prices that are displayed are the right ones.

OPW 744943
GH-17342

[FIX] website_sale, website_sale_options:fix the modal of options

Before this commit, the add quantity button were not working at all

This commit corrects the behavior by browsing the dom for anything that looks like a product section

Closes #17353
2017-07-10 10:44:43 +02:00
Richard Mathot 7522e29927 [FIX] event: a user may not have set its timezone 2017-07-10 08:21:16 +02:00
Joren Van Onder 2c605ab08f [FIX] point_of_sale: allow easier template extension of PosTicket
Fixes #17704
2017-07-07 17:57:28 -07:00
Joren Van Onder 49407e46cb [FIX] sale_margin: convert standard_price to SO currency before using 2017-07-07 16:01:36 -07:00
Invitu 7102fcfc4f [FIX] point_of_sale: also clone orderline price
Otherwise during e.g. bill splitting of an orderline which had it's
price overridden you end up with the original price again.

Fixes #17810
Closes #17811
2017-07-07 16:00:38 -07:00
Olivier Dony e8271ffcc7 [FIX] mail: avoid attaching auto-notifications to foreign parents
`parent_id` fields are common in many models, and thus default values
for those fields are sometimes passed in the context.

Because mail.message also has `parent_id` field, it would automatically
use the default when an automatic message was being posted. While of
course, the parent_id value comes from a different model.
This "adoption" by a random "parent message" is unexpected,
not desired, and it can even cause a very surprising AccessError if the
parent message is not readable by the user.

Forcing the `parent_id` value during the creation of an automatic message
avoids this confusion.

One way to trigger the bug was to use the "subtask" stat button to create a
child subtask for a project task (it relies on the parent task ID
passed in the context)
2017-07-07 18:34:54 +02:00
Martin Trigaux 326ff3699a [FIX] point_of_sale: use local variable in labmda
NameError: free variable 'order' referenced before assignment in enclosing scope

opw-751576
2017-07-07 15:39:47 +02:00
Martin Trigaux 3418c91f13 [FIX] product: fallback in category_all does not exists
self.enf.ref returns None if the record is not found.
Introduced at af11e74c
opw-751602
2017-07-07 14:42:31 +02:00
Christophe Simonis aef7748845 [MERGE] forward port branch saas-11 up to 96fa86779b 2017-07-07 14:07:47 +02:00
Christophe Simonis 96fa86779b [MERGE] forward port branch 9.0 up to 9cc799f511 2017-07-07 14:00:39 +02:00
Christophe Simonis 9cc799f511 [MERGE] forward port branch saas-6 up to 9a79b7b818 2017-07-07 13:59:13 +02:00
Christophe Simonis 9a79b7b818 [MERGE] forward port branch 8.0 up to 63ad8b9597 2017-07-07 13:56:47 +02:00
Richard Mathot 63ad8b9597 [FIX] tools: prevent crashes with Pillow >= 4.2.0
From Pillow 4.2, it is forbidden to save RGBA images as JPEG
( https://github.com/python-pillow/Pillow/commit/e4d6223c944cf44c468cc65a560b94dfcf351a62 )

A crash was occurring when loading demo JPGs as
image_resize_and_sharpen() was silently changing image mode to RGBA.
Now we ensure that we return the original image mode.

We also avoid crashes when converting from PNG to JPG
2017-07-07 10:11:40 +02:00
Raphael Collet a1f1f85be2 [FIX] workflow: insertion of duplicates in many2many relation 2017-07-07 09:47:04 +02:00
Christophe Monniez c1e154bee1 [FIX] tools: ensure xlsx worksheet names are valid
When xlsx is used, the worksheet name may be longer than 31 chars and
raise an exception.

This fix will troncate the name up to 31 chars and will remove invalid
chars.

Similar patch was already done at 0122c05eff for xlwt

xlsxwriter 0.9.8 has added a parameter worksheet_class=None so adding **kw to be
compatible with installs with the latest version (requirements.txt asks for
version 0.9.3)

Closes #18077
opw-751157
2017-07-07 09:44:09 +02:00
qdp-odoo 1fda216887 [FIX] l10n_fr_certification: set auto_install to False
Due to recent decision by the French government this might not be mandatory for french companies
2017-07-06 17:01:33 +02:00
pashute 2454dce7c5 [CLA] signature for pashute
Done at #18082
2017-07-06 17:01:24 +02:00
Yannick Tivisse afefa1b771 [FIX] account: Display the correct records on 'Invoice' button
Currently it shows all the invoices, not the sales invoices that are paid or validated
2017-07-06 16:47:40 +02:00
Olivier Dony 464fe4a185 [FIX] doc: clarify: record[field] is valid/recommended 2017-07-06 15:58:47 +02:00
Miku Laitinen 53762814d8 [CLA] updated CCLA for avoinsystems
Done at #18068
2017-07-06 14:49:06 +02:00
Christophe Simonis 1206cc3f7d [MERGE] forward port branch saas-11 up to 5f7f3209e0 2017-07-06 12:30:51 +02:00
Christophe Simonis 5f7f3209e0 [MERGE] forward port branch 9.0 up to 2b06da6ed0 2017-07-06 12:10:12 +02:00
Christophe Simonis 2b06da6ed0 [MERGE] forward port branch saas-6 up to 63944d30ba 2017-07-06 12:09:30 +02:00
Christophe Simonis 63944d30ba [MERGE] forward port branch 8.0 up to fe73fc442c 2017-07-06 11:44:26 +02:00
Christophe Simonis fe73fc442c [FIX] google_drive: avoid AccessError when reading filters
If a config use a private filter, others users can't read it due to
record rules on filters.
2017-07-06 11:37:19 +02:00
Nicolas Lempereur 52f268d042 [FIX] website: load momentjs locale in frontend
It is for example useful in the form builder with date-kind form field,
the translation of momentjs is done in french.

opw-707986
opw-749544
closes #17103
2017-07-06 11:28:57 +02:00
Frédéric Gilson d7334930a6 [IMP] payment_authorize: change setup link as old one is deprecated. 2017-07-06 10:44:49 +02:00
Sylvain GARANCHER b587ae48e4 [FIX] mrp: set default quantity
The wizard to change the produced quantity of a manufacturing order was not
using the current produced quantity as the default value.
This was because the field mo_id was not present in the view (and not in
`fields` in default_get).

Adding the field as invisible to compute the default value for mo_id.

Correct typo in dictory lookup (using `[` instead of `(`)

Closes #17937
opw-749725
2017-07-06 10:41:26 +02:00
Manuel Vázquez Acosta d951591b62 [CLA] Merchise Autrement sign CCLA
Done at #18008
2017-07-06 08:59:29 +02:00
Goffin Simon 6d6c24cfb2 [FIX] stock: Not allowed to change product on stock.production.lot
Steps to reproduce the bug:
-Create a product tracked by LN
-Create an inventory adjustment to add 10 products with LN A
-Validate it
-Then go in inventory > inventory control > lots/serial numbers > open LN A
-Change the product

Bug:
The LN A tells you you have 10 products X
While in your inventory you see you have 10 products Y

opw:750735
2017-07-05 16:54:12 +02:00
Goffin Simon 4f88f4dd18 [FIX] website_sale: Sort by catalog price in the shop
When sorting by price (increasing or decreasing) in the shop,
the products were sorted according to the catalog price(list_price)
and not according to the price(which takes the pricelist into account).
So a better name is given in this patch.

Reason: The field "price" is a computed and not stored field.
Then it's not possible to order the products with it in the orm.

opw:750997
2017-07-05 15:53:00 +02:00
Nicolas Lempereur 4fe4c228f3 [FIX] web_editor: style if website not installed
web_editor can be installed without website, thus missing needed CSS
causing e.g the widget sidebar to overlay and hide the mass mailing
content if website is not installed.

This fix implement a simple middle ugly solutions, but doing something
more in stable would be an hassle (for example in 88c2b684 the #wrapwrap
CSS is included in report module).

opw-748975
closes #18005
2017-07-05 11:49:59 +02:00
Yannick Tivisse 317ed37aee [FIX] account: Avoid to rewrite all the account codes on res_config creation
opw-750892

Avoid to rewrite the `accounts_code_digits` on the company if the value is the same. As all the values are
passed on the res.config creation, the related fields are rewriten on each res_config creation. Rewriting
the `account_code_digits` on the company will trigger a write on all the account.account to complete the
code the missing characters to complete the desired number of digit, leading to a sql_constraint.
2017-07-05 11:37:30 +02:00
Martin Trigaux d8083b4270 [FIX] website_sale: use the same price for all routes
The route /shop and /shop/product did not used the same context.
The partner is set in the shop but not in the product page which may lead to a
different pricelist to be applied.

opw-746729
2017-07-04 14:39:25 +02:00
Jairo Llopis ecc093033d [FIX] service.server: bump up socket timeout to 2s
Rev. 8245c1d1d8 introduced a timeout to
avoid lockup situations with wkhtmltopdf's requests on servers with low
numbers of free HTTP workers.

The initial timeout of 500ms was chosen based on average network
latency, but turned out to cause spurious disconnections on congested
networks combined with slow links.

Bumping up the timeout to 2s seems to be a better sweet spot, causing
less spurious disconnections while still recovering reasonably fast from
the wkhtmltopdf lockup situation.

See also these discussions:
 - https://github.com/odoo/odoo/commit/8245c1d1d87b443701b161d8d4a42df2b4d13aec#commitcomment-22904347
 - PR #12356
 - Issue #2114

Closes #17998
2017-07-04 12:57:05 +02:00
Christophe Simonis 657e328903 [MERGE] forward port branch saas-11 up to 7b0a1e4031 2017-07-04 12:28:38 +02:00
Christophe Simonis 7b0a1e4031 [MERGE] forward port branch 9.0 up to b9131adb48 2017-07-04 11:51:23 +02:00