Commit Graph
107215 Commits
Author SHA1 Message Date
Nicolas Martinelli bc2f8f9a40 [FIX] stock_account: missing forward-port
Missing forward-port of commit 5e466d3507

opw-707168
2017-02-07 17:29:44 +01:00
Nicolas Martinelli 88af7c9392 [FIX] mrp: expected date
When a MO is created with a deadline start date in the future, the
scheduled date of the stock move is still the creation date.

opw-707396
2017-02-07 17:18:28 +01:00
Odoo Translation Bot 17f3185994 [I18N] Update translation terms from Transifex
after API rate limit reached
2017-02-07 17:01:49 +01:00
Martin Trigaux c2c91a1fdf [FIX] stock: remove duplicated field in view 2017-02-07 16:48:57 +01:00
Nicolas Martinelli c1047e9adf [FIX] mrp: quantity_available depends 2017-02-07 16:33:46 +01:00
Nicolas Martinelli 364036017b [FIX] mrp: UoM of quantity available
The field `quantity_available` can be computed in two different ways:
- equal to `product_uom_qty`
- equal to `reserved_availability`

However, `product_uom_qty` is in the UoM of the move, while
`reserved_availability` is in the UoM of the product.

We convert into the UoM of the move, because `quantity_available` is
supposed to be in the same UoM than `product_uom_qty` ("To Consume").

opw-704775
2017-02-07 16:33:46 +01:00
Goffin Simon b2cf9559d6 [FIX] mrp: The field "lot_id" is required in MRP Product Produce
When producing in the view "MRP Product Produce", if the field "lot_id"
is empty, it raised a UserError. So the field is required.

opw:705143
2017-02-07 16:19:10 +01:00
Nicolas Lempereur 7c8a98e53a [FIX] im_livechat: livechat button over ecommerce
Some things in the ecommerce have z-index 1, 4 (product images) or 5. So
this went over the live chat button "Have a question? Chat with us."

opw-707086
2017-02-07 15:29:53 +01:00
Goffin Simon 8e5684250b [FIX] product, report_intrastat, stock: visibility of categ_id on product.template
When the "Inventory" module was not installed, it was not possible to set
the field "categ_id" on "product.template".

opw:707285
2017-02-07 14:52:52 +01:00
yueqin 6076900b3e [CLA] signature for yueqin
Done at #15359
2017-02-07 11:00:19 +01:00
Goffin Simon 09237efa33 [FIX] survey: validate_multiple_choice with comments allowed
When validating a multiple choice with comments allowed,
the comment was popped from answer_candidates and then
the condition to prevent answers with blank value always
triggered an error.

opw:707072
2017-02-07 09:42:00 +01:00
Christophe Simonis 9ec95b2a68 [MERGE] forward port branch saas-11 up to 51b79a7ee1 2017-02-06 17:18:24 +01:00
Christophe Simonis 51b79a7ee1 [MERGE] forward port branch 9.0 up to 0a4db3c0d7 2017-02-06 17:15:50 +01:00
Goffin Simon 93448bb2b8 [FIX] web: Dashboards error
Steps to reproduce:
Go to any pivot view (for example Sales > Report > Sales) and add
the current view to your personnal dashboard (in the search view: Favourites > Add to my Dashboard)
Go to the dashboard, traceback because $buttons was not defined.

opw:707296
2017-02-06 16:39:59 +01:00
Nicolas Lempereur 0e15f5ddd0 [FIX] web: typo space missing in 2d753ab5 2017-02-06 16:21:46 +01:00
Lucas Perais (lpe) 85f067753a [FIX] account: added a %s when calculating invoice hash
This commit corrects the forward port https://github.com/odoo/odoo/commit/ba8a1c7ec24cba065934e8eb58f97d15bb60b55f
It corrects the OPW 707315
2017-02-06 16:04:34 +01:00
Denis Ledoux 0a4db3c0d7 [FIX] purchase: refresh on shipments action button
When opening a purchase order shipments using
the given smart button, and attempting a refresh,
it leaded to a "record has been deleted" error,
because the current `active_id` is a purchase.order
id, while the `active_id` in the window action
`action_picking_tree` context expects a picking type
id.

The purpose of using `action_picking_tree` was to use
it as a template instead of having to create a full action
dict, not to actually use it.

By removing the id from the action dict, we prevent
to re-use the action window `action_picking_tree`
on refresh.

opw-706933
2017-02-06 13:08:45 +01:00
Simon Lejeune 7d2cccfc12 [FIX] stock: manually process a pack
Before this patch, it was not possible to manually process a pack (i.e.
checking the "is_done" box), because the field was always reset
*before* saving. It was still possible to process it by hitting
"validate", but it was not possible to put a pack in a pack.

Manually process a pack means hitting the checkbox "is_done" on the pack
operation. This "is_done" field is a boolean computed field with a reverse
function, and this reverse function set the "qty_done" on the pack
operation to 1.0.

The compute field doesn't have any depends declared, so the value was
invalidated after any changes in the form view. The computed method was
used to check the checkbox is the "qty_done" is set to 1.0. It was
probably used to check the checkbox when opening later a picking for
which the pack was already processed.

The issue is that the "qty_done" was never updated, because the inverse
method is only called when saving, and the compute method already reset
the "is_done" field to False, as the "qty_done" was not updated.

To fix this issue, we do not use an inverse method but an onchange.
Indeed, this was the expected behavior: hitting the checkbox should
change the "qty_done".

We already have a test covering this use case, committed in v9 [1]. It
didn't discovered this regression because the test was using directly
the "qty_done" field on the pack operation, not the "is_done" field used
in the view. We change the test to use the "is_done" field and manually
trigger the onchanges.

This is due to a bad new API migration [2].

[1] rev e248420348
[2] rev d8548e0771
2017-02-06 12:00:36 +01:00
Nicolas Martinelli 483324393e [FIX] website_sale_digital: free product
- Buy only a free product with digital download content
- It is not possible to access the download link

Since the product is free, there is no invoice created. Therefore, the
product is never considered as paid.

opw-705258
2017-02-06 11:01:16 +01:00
Nicolas Martinelli 1e67069f60 [FIX] account: unreconciled filter
The account move line filter 'Unreconciled' only takes into account the
matching number. We should also make sure the 'reconciled' boolean is
false, since a line with a zero amount (e.g. invoice with only a free
item) is considered as reconciled and should not appear in the list.

opw-705982
2017-02-06 10:51:52 +01:00
Aaron Bohy 434199a407 [FIX] web: undefined variable e 2017-02-06 09:21:26 +01:00
Aaron Bohy dd657c42f7 [FIX] web: FieldMany2Many List: allow to add items if create="0"
One can add an item in a Many2Many without creating it, so the action
should be available. However, if the create action is not allowed, there
is no 'Create' button in the SelectCreateDialog.
2017-02-06 09:21:26 +01:00
Odoo Translation Bot 9dc96091f3 [I18N] Update translation terms from Transifex 2017-02-05 00:31:18 +01:00
Christophe Simonis d83d0999e0 [FIX] base: ondelete cascade on transien 2017-02-03 19:01:19 +01:00
Josse Colpaert 8810a34864 [FIX] equipment: activate cron for preventive requests
The xml file with the cron that creates the recurrent
preventive requests was not loaded in the system, so we needed to add
it.

Before, the cron was foreseen to only create the maintenance request on
the day that the request was foreseen (in the morning).  Now, it will
create a request if none exists on the next_action_date. That way the
requests can be planned for.

The other problem is that the '_compute_next_maintenance' method
for calculating the next_action_date does not take into account
the possibly manually already created requests.  So, now, the next
maintenance is calculated with the closed requests and the open ones.

If the first new one is in the past, it takes that date in the past. If it is in
the future, it will see if the gap is big enough to put a maintenance
in between the last done maintenance (or now) and the first new one.
If none exists, it is today + period.

That's why we have to add the 'request_date' in the depends. And take
into account the preventive requests existing on an equipment.
2017-02-03 18:56:10 +01:00
thomassomko 2abac5c89c [FIX] sale: add product and partner to tax computation
Useful for some tax configuration (e.g. account_tax_python)

Closes #15269
2017-02-03 15:59:44 +01:00
qsm-odoo a4dc9a8032 [FIX] web: do not call session load_qweb on frontend
Since commits 2a8a17024d and 9c68bc7482,
the session is not started by the webclient anymore but directly by the
session service instead, and the session info is found in the DOM
instead of by RPC.

Because of that, the session is started in the frontend and other
non-backend environments which caused a JS error while trying to
load qweb (as no qweb has to be loaded). This commit makes the
session start check if it is a non-backend environment and only
initialize session info (from DOM) in that case.
2017-02-03 15:49:23 +01:00
Martin Trigaux fe32048825 [FIX] account: make account payment method translatable
opw-707022
2017-02-03 15:35:29 +01:00
Fekete Mihai 31034de863 [IMP] l10n_ro: Update Romanian Chart of Accounts
with new default taxes, mapping of fiscal positions

Closes #15326
2017-02-03 11:58:34 +01:00
Alexis de Lattre 2b0bb5406e [FIX] product: display pricelist name on product
The product.template displays the list of pricelist items with the name of the pricelist
The product.product displays the same information except the pricelist name.
This commit harmonize both views to display the same information.

Fixes #15009 
Closes #15010
2017-02-03 11:55:44 +01:00
Martin Trigaux 31e7fcb02e [I18N] point_of_sale: export source terms 2017-02-03 11:38:30 +01:00
Lucas Perais (lpe) 19a11a12f4 [FIX] point_of_sale: export orders and traceback now work for debugging.
In debug mode the buttons "export unpaid orders" and "export paid orders" now
work. On first click, they prepare the file and display the download link. On
second click, the file is downloaded.

The error popup uses the same method to download the traceback.
Use a different icon to have a visual feedback why that 2 clicks are needed.

This 2 steps is required as it is not possible in most browsers to simulate a
click event on a link.

The download method is kept for backward compatibility but will be droped in
master.

In the next version, a proper popup will be integrated (cf #14365)

Closes #15322
2017-02-03 11:38:29 +01:00
Denis Ledoux 9c96631dde [FIX] report: associated views with report name without dots
When setting a report with a `report_name` without dots,
the associated views button raised an exception.

This has been introduced during the migration to the new API
at revision 47c67b640b

Before, a try/except made sure the exception to not raise
the exception in case the report name could not be split
in two parts.

In this revision, instead of doing the try/except,
we check if the result of the split has a minimum
length of 2.

opw-706343
2017-02-03 11:19:01 +01:00
Nicolas Martinelli 01ac5949ef [FIX] website_slides: get export links
The export links also require the access token.

Complement of commit c196b55d61
opw-703750
2017-02-03 08:15:12 +01:00
Nicolas Martinelli 61784887c4 [FIX] website_slides: crash if no image
Google might return an empty 'image' value, leading to a crash when we try
to analyze it.

opw-703750
2017-02-03 08:15:12 +01:00
Nicolas Martinelli a01188e1a5 [FIX] website_sale_digital: no more 'digital' product
Following commit 1a1efe3fce, the module has some troubles to work
correctly. For example, it's impossible to get the download link in the
frontend of an attachment when the product was bought and paid.

Not really a big deal, but just in case the client wants to download
what he bought, we add back the link in the eCommerce.

A more complete fix will land later in master branch.

opw-705725
2017-02-02 14:57:39 +01:00
Nicolas Martinelli 27b6451dbe [FIX] sales_team, crm: expected closing
On the CRM dashboard, the shortcut 'exp. closing' is the same than the
'overdue' shortcut. However, the number of opportunities in these
categories is computed differently (see method
`retrieve_sales_dashboard`).

We introduce a new filter "Overdue Opportunities" which reflects this
difference.

opw-704173
2017-02-02 12:57:08 +01:00
Nicolas Martinelli 5bd895721a [IMP] base: new cr for log method
The `log` method of a server action uses the same cursor than the
transaction. Therefore, if an error is raised during the server action
execution, the log messages are lost since the transaction is rolled
back.

We introduce a new cursor in the `log` method, so the log messages are
kept even when an exception is raised.

opw-704036
2017-02-02 12:49:17 +01:00
Nicolas Lempereur 8a0151b4bc [FIX] mail: unhide relevant "Odoo Session Expired"
With how the chat manager was currently started, the "Odoo Session
Expired" could cause an arcane js error which would overshadow it.

This is caused by doing an RPC request too soon which invalidate the
session too soon which disable web client `show_application`.

With this commit, we have the error message "Odoo Session Expired"
instead of:
 "Uncaught TypeError: Cannot read property '$el' of undefined"

closes #15313
opw-706346
2017-02-02 11:23:30 +01:00
Christophe Simonis b7c7591bfb [MERGE] forward port branch saas-11 up to 71773e1f1c 2017-02-01 19:08:14 +01:00
Christophe Simonis 71773e1f1c [MERGE] forward port branch 9.0 up to a53063606a 2017-02-01 18:16:15 +01:00
Christophe Simonis a53063606a [MERGE] forward port branch saas-6 up to 63b7db377e 2017-02-01 18:06:03 +01:00
Christophe Simonis 63b7db377e [MERGE] forward port branch 8.0 up to e3232c85b9 2017-02-01 18:04:47 +01:00
Denis Ledoux f9272264c1 [FIX] account: invoice report multi-company security
This record rule added in the below revision:
1950fc4216

has been removed for an unknown reason during the account refactoring
c04065abd8

Without this rule, a user can see invoices from other companies
through the invoices analysis.

opw-705718
2017-02-01 17:32:40 +01:00
Martin Trigaux 365d6a888d [FIX] stock: correctly compute custom search method
The search on qty_available was refactored twice:
- b9853db8 to split the method
- a989680b to remove the eval operator

At b9853db8 the order of evaluation introduced a bug so that the domain
   ('qty_available', '=' 10.0)
was evaluated
   if product[qty_available] = 10.0:
which crashed (`=` instead of `==`).

Before b9853db8, this code did not crash as the operator was converted via
  if operator == '=':
    operator = '=='
which is no longer executed after the split

a989680b replaced the eval by a dictionnary that replaced the eval error by a
KeyError when searching with `=` operator.

This commit changes several things:
- replace the `operator in ('==', '>=', '<=')` as this was evaluated before the
  operator replacement code mentionned above
- remove the replacement code as no longer justified since a989680b
- replace the OPERATOR key `==` to always match given key
2017-02-01 16:09:10 +01:00
Denis Ledoux 6d1df94614 [FIX] account: payment term currency
This is related to revision
52db42d3df

The total sent to the `compute` method is always
within the invoice company currency, not
in the invoice currency.

`total` comes from the first tuple result
of the method `compute_invoice_totals`,
which is always in the invoice company currency.
if the company currency is different than
the invoice currency,
the total is the sum of the `line['price']`
converted to the company currency, as stated
by
`line['price'] = currency.compute(line['price'], company_currency)`
and
`total += line['price']`

In the above revision, the possibility to pass
its own currency in the context is added. This is in case
the payment term used comes from another company
than the one of the invoice (see the commit message of the revision).

The mistake was to use the invoice currency, while it should
use the invoice company currency, as the `total` amount is
within the invoice company currency, not the invoice currency.

opw-705604
2017-02-01 16:01:34 +01:00
Nicolas Lempereur e3232c85b9 [FIX] mrp_byproduct: remove wrong move_dest_id link
A byproduct is a produced when producing another product (the targetted
product).

A move can be linked to another move. eg: we could have a manufacturing
order of 3 units linked to a move of a delivery order of these 3 units.

If we produce 2 units, the manufacturing order is split in 2 units and
1 units, and the delivery order is split similarily because of the link

1. [T manufacturing move split] -> [T delivery move split]

(T is the targetted product, B is the byproduct)

But in 8c307d7b1 a move_dest_id of a byproduct was linked to the targetted
product delivery move, thus in some situation the move of the delivery
order of the byproduct would erroneously be split 2 times instead of one.

1. [B manufacturing move split] -> [T delivery move split]
2. [T manufacturing move split] -> [T delivery move split]

This could also be the source of other issue, and since the byproduct
and targetted product are different, the link should anyway not be done.

opw-697151

note: this change is already in 10.0 (it is inside mrp refactoring 2ddc35a53)
2017-02-01 15:33:53 +01:00
Nicolas Martinelli b34917cd6d [FIX] base: field 'Type' readonly
The field 'Type' should always be readonly since:
- it must not be changed for standard models
- its value must be 'Custom Object' for a custom model

opw-706130
2017-02-01 14:53:35 +01:00
Nicolas Martinelli 02cfb7be83 [FIX] base: field 'Type' readonly
The field 'Type' should always be readonly since:
- it must not be changed for standard models
- its value must be 'Custom Object' for a custom model

opw-706130
2017-02-01 14:44:41 +01:00
Géry Debongnie d96dc25c47 [FIX] hr_expense: unbreak kanban template 2017-02-01 14:01:58 +01:00