Commit Graph
117156 Commits
Author SHA1 Message Date
Nicolas Martinelli 4f921d668a [FIX] account_asset: asset on refund
- Create a vendor bill with a line linked to an asset category
- Validate the bill => an asset is created
- Refund the bill

The refund is also linked to an asset category. Therefore, upon
validation, a negative asset will be created.

The refund should not be linked to the asset category in a first place.
The user should cancel/modify the asset manually.

opw-775933
2017-10-19 09:26:44 +02:00
Joao Alfredo Gama Batista 3f3e41e9f5 [CLA] Update Savoir-faire Linux CLA
Add new collaborators, remove old ones

Closes #20258
2017-10-19 09:24:53 +02:00
François Honoré (Acsone) 2295cffb70 [CLA] Add acsonefho into Acsone CCLA
Closes #20291
2017-10-19 09:12:30 +02:00
Christophe Monniez d38d62f5db [FIX] packages: install vc_redist files properly
Nsis installer was installing the wrong MS Visual C++ redistributable
file. Python 3.6 needs MS Visual C++ 2015 redistruibutable files.

Also, Nsis now differentiate Windows architecture for the nssm service
and the MS C++ redist.
2017-10-18 18:44:19 +02:00
qsm-odoo 841f41f95b [FIX] web: domain field should never be considered unset
Indeed, false was already considered as "[]" in edit mode.
2017-10-18 18:14:33 +02:00
Simon Lejeune f1d485db08 [FIX] sale_stock: invoice policy on delivered quantities
The created accounting entries have their debit/credit columns switched
because
  - they use the sign of the value to post to decide if it should be
    credit or debit
  - an out move always have a negative sign

As this code is always called on out moves, we can safely reverse the
sign when getting the price_unit of the move.

Fixes #20080
2017-10-18 18:05:26 +02:00
Wolfgang Taferner faff276e92 [FIX] sale, purchase: do not merge sale order and purchase order lines 2017-10-18 17:52:25 +02:00
Wolfgang Taferner ef592ffa3d [FIX] stock: make it possible to inherit easier in _merge_moves 2017-10-18 17:52:19 +02:00
Rémi Rahir 47b8887ff5 [FIX] iap_odoo: fix error general error raise
Errors that are not whitelisted are not managed correctly due to the jsonrpc behaviour in Odoo.

When we make a post in json using iap.jsonrpc function, it contacts iap.odoo.com.
However, if this url does not respond, it falls back to the 'typo' page and the answer to the call
has a '200' status code but with an 'error' key in its response.

Currently, we manage the errors via whitelisting, which hides this kind of errors.
We opted to raise this error (odoo server side) as a UserError and to add UserError to the whitelist.
2017-10-18 17:08:21 +02:00
Christophe Simonis 25e65d2bcb [MERGE] forward port branch saas-15 up to 8096162bee 2017-10-18 16:57:35 +02:00
Christophe Simonis 8096162bee [MERGE] forward port branch saas-14 up to 73822d4eaf 2017-10-18 16:06:07 +02:00
Christophe Simonis 73822d4eaf [MERGE] forward port branch 10.0 up to 388bf45853 2017-10-18 15:30:54 +02:00
Thibault Delavallée 388bf45853 [FIX] mail: indentation issue when forward-porting
Commit aab6bdd54a was incorrectly forward-ported to
10.0 at abb726d4df . Indeed share users could land
to a wrong backend or frontend page depending on the target app due to an
indentation issue.
2017-10-18 15:21:44 +02:00
Christophe Simonis de70646bc5 [FIX] website_sale: correct js syntax
Oversight of forward-port a01e76efa7
2017-10-18 15:17:40 +02:00
Simon Lejeune 542b8fd550 [FIX] stock_landed_costs: fix rev 2222ab47e4
To get 48 entries, you need the anglo saxon accounting enabled.
2017-10-18 15:12:21 +02:00
Christophe Simonis 00a14fd832 [MERGE] forward port branch 10.0 up to 2d46dbcbfd 2017-10-18 14:57:25 +02:00
Raphael Collet 2d46dbcbfd [FIX] ir_http: use meaningful ETag for images (#20283)
After setting the image on a product variant, the controller for `/web/image`
incorrectly returns the code 304 - Not Modified.  This bug occurs because
 1. the response ETag is a hash of the **last modified date** of the record;
 2. the record is actually **not** updated in that case, because
     - the image field is a non-stored computed field, and
     - its inverse method only modifies the variant's template.

Fix the issue by making the response ETag a hash of the **content**, which is
read by the controller anyway.

OPW 769302
2017-10-18 14:53:10 +02:00
Simon Lejeune 2222ab47e4 [FIX] stock_landed_costs: enable and adapt forgotten tests
stock_landed_costs.yml is adapted to validate the picking before
applying a landed cost on there. Applying a landed cost on a non
validated picking was never supported but the test fails due to
implementation changes in v11.

Due to this change, the last assert was wrong: indeed, applying a landed
cost on a delivered product creates 6 account move lines if anglo saxon
accounting is enabled. This case creates 4 landed costs on 2 delivered
stock moves, 4*2*6 == 48 account move lines.
2017-10-18 14:49:03 +02:00
Simon Lejeune e2db80d3b5 [FIX] stock_landed_costs: update price_unit
The value and remaining value fields were correctly adapted when a
landed cost was applied on a move, but not the unit price one. This is
problematic, as the product should indeed cost more.

To properly compute this value, we change the meaning of
`stock_landed_cost_value` which is now the total value of the landed
cost, not the prorated value of what is still in stock.

Also fix the computation of the quantity already delivered in case of
negative stock.

Fixes #19254
2017-10-18 14:49:03 +02:00
Christophe Simonis a01e76efa7 [MERGE] forward port branch 10.0 up to 2198220947 2017-10-18 14:34:32 +02:00
Lucas Perais 6c9e45576e [FIX] document: display create_date of attachment timezone aware (#20242)
Before this commit, when putting the mouse over an attachment in the attachment drop menu list, the date time displayed was UTC only.
After this commit, we convert that value to the correct timezone datetime.

OPW 776704
2017-10-18 14:25:22 +02:00
Christophe Simonis 2198220947 [MERGE] forward port branch 9.0 up to e0fbe7b5be 2017-10-18 14:05:42 +02:00
qsm-odoo c7f5ad87a4 [FIX] web_editor: odoo-made tables should not be layout: fixed 2017-10-18 13:37:33 +02:00
Goffin Simon 1108c150d9 [FIX]sale: pricelist price base
Fine tuning of c477f0764e

When setting a pricelist to show the public price discount, it ignored
the pricelist item's base field (if not 'Other Pricelist') and set it
by default on the lst_price instead.

This did not work when you based your discount on the standard_price
(= cost price) with public price discount.

Now it does.

opw:775275
2017-10-18 12:16:27 +02:00
Goffin Simon 130dc1b64f [FIX]sale: pricelist price base
Revert of c477f0764e

In some case product[pricelist_item.base] can be a product.product

opw:775275
2017-10-18 11:28:44 +02:00
Adrian Torres 333a2360d8 [FIX] website_quote: don't unlink website_description
This is a hotfix/hack for a conflict between website_quote and
website_sale, on the field website_description.
The conflict happens when both modules are installed.

Fixes #20118
2017-10-18 11:27:07 +02:00
rde 4618cbd513 [FIX] website: new class to disable button after first click
Before this commit, if you had a simple link (just a href, not handled
in JS), you couldn't simply make it clickable only once.
This could be a problem in some cases. (eg: a btn creating a record, it would
create as many record as many times you clicked on it)
The same behavior could occur for link/button redirecting to a route creating a
record. There is a window of time between the click on the btn and the moment
the page is getting redirected.
You have time to click  multiple time on it and it would call the URL multiple
time.

Now, there is a class 'js_disable_on_click' that will be handled in
website_root.js and will disabled the button after the first click.

The fix was originally aimed to fix multiple click on "Create Page" btn on 404
2017-10-18 10:58:53 +02:00
Goffin Simon 0012eb4c97 [FIX] website_sale: included taxes considered as discount in the shop
Steps to reproduce the bug:

- In Sales settings, set "Tax display" as "Show line subtotals without taxes"
- Create an article A with a customer tax set as price-inclusive.
- associate on an other article B the  pricelist P with a discount_policy
  set as "without_discount"
- Ensure that the pricelist P is used in the shop.
-Go to the shop

Bug: The article A is considered as discounted but the price is full.
The prices with included taxes were considered as discounted because
lst_price - webstie_price were always greater than 0. When the
"Show line subtotals without taxes" is checked  for Tax display,
the field website_price never includes the taxes. That's why the
included taxes are substracted from the website_price.

opw:776526
2017-10-18 10:15:03 +02:00
Goffin Simon f971ed704c [FIX]sale: pricelist price base
Fine tuning of this commit: c477f0764e

opw:775275
2017-10-18 09:49:34 +02:00
Géry Debongnie d365a289d4 [FIX] web: generate proper x2many commands in some cases
When creating a new record with a non empty default value for a one2many
field, we did send the command 0 (for each one2many line) instead of the
command 1 (update).  This was a pretty big problem, because then the
server would try to create a line with possibly incomplete data.

For example, it was not possible to create expense sheets: go to expense
menu, select one expense in the list view, click on the action menu
'submit to manager', this opens a form view with a one2many with the
selected expense, then save.  Before this commit, this would lead to a
server error.
2017-10-17 18:21:47 +02:00
rde e0fbe7b5be [FIX] website_sale: disable checkout btn if GTS unchecked at load
opw-774286

*Before this commit:
On checkout, you can enable a step to force user to have the General Terms of
Sale checked to continue the checkout. Checking/Unchecking will correctly
disabled/enabled the button.
The checkbox is already checked at page load (on the template).
BUT, if the template has been modified to set the checkbox as unchecked at load
(eg the user removed 'checked="checked"' from the template), the button will
still be enabled even if the checkbox is unchecked.

*Now:
No matter if it is checked or not on the template, the button will
correctly be enabled/disabled regarding the checkbox state at load.
2017-10-17 17:40:41 +02:00
HIRAL BHAVSAR 3285a0384c [FIX] mail: Wrong codepoint for angry emoji. 2017-10-17 17:23:30 +02:00
Nicolas Martinelli 6c8e6fb2e9 [FIX] stock: save settings
This reverts commit 0e28db88d1.
This commit should not be in saas-15.

opw-776890
2017-10-17 17:11:30 +02:00
Xavier Morel d18b160505 [FIX] website_forum: properly read the faq
On P3, "text" IO (open(f, mode='r')) will default to the encoding
provided by locale.getpreferredencoding(False) which apparently is
regularly cp1252.

Replace by misc.file_open which enforces UTF-8 decoding in text mode.
2017-10-17 17:10:31 +02:00
Martin Trigaux 727a642f5c [FIX] crm: match count with result
Followup of 4ebb5efac
2017-10-17 16:53:17 +02:00
Nicolas Martinelli a13120c039 [FIX] resource: default TZ
If TZ is not set on a user, the creation of a `hr.leave` won't populate
the `tz` field of the associated `resource.calendar.leaves` record.
However, the method `_get_leave_intervals` assumes that field field is
always filled in.

Set the TZ to UTC as a fallback.

opw-777031
2017-10-17 16:38:45 +02:00
Martin Trigaux 4ebb5efac4 [FIX] crm: match filter result with count
At 9d2f48dc and abea8d35 the `not opp.date_closed` condtion was added when
counting the number of overdue opportunites.
The result filter was still considering the closed opportunities.

opw-774421
2017-10-17 16:23:07 +02:00
Laurent Smet 6e46ba7b46 [FIX] point_of_sale: fix taxes rounding in POS
Don't round the base amount at each step during compute_all of taxes.

-opw: 776986
2017-10-17 16:22:20 +02:00
Agathe Mollé 4d56e76d52 [FIX] Fix canadian province state_ca_NL name 2017-10-17 16:18:13 +02:00
jaredkipe d7cfa8c502 [FIX]: safe_eval’ing some large scripts yield illegal opcodes
Following the 3.6 wordcode change, EXTENDED_ARGS gets used for jumps
offset by more than 256 bytes (128 opcodes), most commonly
absolute (so many script of more than 128 opcodes with conditionals
arer going to trigger the issue).

In bytecoded Python versions, EXTENDED_ARGS was only necessary above
65k opcodes: the opcode would get a separate 16-bits argument, while
wordcode opcodes get 8-bit intrinsic.
2017-10-17 16:16:42 +02:00
Wolfgang Taferner c30f8c50a3 [FIX] stock, sale_stock: blocking a process twice due to cancelled moves 2017-10-17 16:05:53 +02:00
Xavier Morel 90d9605c86 [FIX] web: encoding issue with moment locales
I don't quite get how it can trigger on user systems (as it apparently
requires resetlocale() to fail to set up an UTF-8-encoded-locale
somehow, disabling resetlocale() is how I could get the issue
triggered on my system), but anyway it's apparently possible for Odoo
to run with an ASCII system encoding, and it turns out Python 3 will
not use UTF-8 everywhere but will rather use whatever
locale.getpreferredencoding(False) yields, which in theory could be
completely bonkers.

This is an issue when using text IO with an implicit encoding, which
is what load_locale (/web/webclient/locale/<lang>) was doing.

* Fix by using binary IO
* Fix (2) by using direct-passthrough IO with specified encoding, that
  way we let the WSGI server handle the file streaming

Fixes #20075
2017-10-17 16:04:35 +02:00
fda-odoo a1e15b9fce [FIX] web: use "get_formview_id" when opening record from calendar view
Opening a record in a calendar view always showed the default form view when it is not a popup.
Example in CRM: opening an opportunity will always show a lead view.

The fix aims to use the "get_formview_id" method to find the right id of the view that must be shown instead
of using a default id.

opw-774272
2017-10-17 15:34:29 +02:00
fda-odoo a0fcd5c781 [FIX] web: use "get_formview_id" when opening record from calendar view
Opening a record in a calendar view always showed the default form view when it is not a popup.
Example in CRM: opening an opportunity will always show a lead view.

The fix aims to use the "get_formview_id" method to find the right id of the view that must be shown instead
of using a default id.

opw-774272
2017-10-17 15:25:41 +02:00
Christophe Simonis 868e718e09 [MERGE] forward port branch saas-15 up to 8d0942380b 2017-10-17 15:14:47 +02:00
alexkuhn a48b5c45aa [FIX] crm: stage auto-probability not taken into account when creating an opportunity from kanban view (#20209)
1. on CRM module -> Select Pipeline -> Create a column (e.g. 'Test')
2. Edit this Stage
3. Toggle on the field 'Change Probability Automatically'
4. Set a stage probability (e.g. 50%)
5. Create an opportunity on this stage, using the quick create widget of the kanban view
=> The probability of the newly created opportunity is not 50%, as it should be expected

It takes the default_probability, using a default_stage_id, which is the 'New' column having initially a probability of 10%. The stage_id is correctly assigned to the newly created opportunity thanks to environment variable 'default_stage_id', but not the probability.

We solved this bug by updating the probability of the opportunity, after creating the object. We cannot do it at the same time, because BaseObject.create parse the missing fields in an order where probability comes before stage_id.

This fix is limited to the quick creation of opportunity by means of its name only. In particular, it doesn't overwrite the input of the user in the form view.

opw-772310
2017-10-17 14:20:30 +02:00
Nicolas Martinelli 539a09a93c [FIX] stock: use method return
In case MRP is used with kits (phantom BOMs), the method
`action_explode` is called through the override of `action_confirm`.
However, `action_explode` modifies the recordset by deleting the move
with the original product since it is not relevant anymore.

We take this use case into account by reusing the return value of
`action_confirm`.

opw-772644
2017-10-17 13:53:00 +02:00
Raphael Collet 9ae78328ec [FIX] fields: writing on a one2many with a domain should not remove all lines
Specifically, the command `(6, 0, ids)` should only unlink/detach the lines
that satisfy to the field's domain.

Test from #18440

opw-756983
Closes #18438
Closes #18440
2017-10-17 13:50:00 +02:00
qsm-odoo 541d2d736e [FIX] website: restore "Show Sign In" option
Splitting of website into website/portal made the "Show Sign In" option
disappear.
2017-10-17 13:47:14 +02:00
Wolfgang Taferner 61b63e9f81 [FIX] stock: only if the type was changed we should trigger an error
opw-776927
Closes #19973

Due to the fact that some products might be maintained in a module and
will write on the product on upgrade we need to take care that it will
allow to write not changed product types.
2017-10-17 13:43:24 +02:00