Commit Graph
107246 Commits
Author SHA1 Message Date
Odoo Translation Bot 4669c103cc [I18N] Update translation terms from Transifex 2017-02-12 04:30:17 +01:00
Christophe Simonis 9beca598d4 [MERGE] forward port branch saas-11 up to b5971e417f 2017-02-10 17:32:36 +01:00
qdp-odoo 765dd38ec1 [FIX] account: manual reconciliation wizard in batch.
Several fixes are addressed in this commit:
- displayed value of writeoff amount now give proper result accordingly to the selection (but that selection may still be wrong!). This is still not ideal but at least it reflects what users can see in the list selection.
- exclude from the reconciliation, entries that have already the boolean 'reconciled' set to True. They shouldn't be passed to reconcile() but are still needed to balance totally the reconciliation so users have to select them.
- avoid crash if no writeoff needed on batch reconcile: Even though the wizard might declare that a writeoff is needed, in batch mode it might not be the case since the reconciliation is done in multiple passes for each currency. If no write-off is needed, no write-off move is created and the code tried to add a boolean variable to a recordset and raised a fruit-salad error (mixing apples-oranges).
2017-02-10 15:03:28 +01:00
qdp-odoo 4bdf91a02d [FIX] account: fix 'Unreconciled' filter on account.move.line search view.
This revert commit 1e67069f60 and correctly fix the use case it was addressing (exclude lines with debit=credit=0 in the filter).
2017-02-10 15:03:28 +01:00
Christophe Simonis ffd4442b06 [MERGE] forward port branch saas-11 up to 06e9e45d03 2017-02-10 11:49:35 +01:00
qsm-odoo b5971e417f [FIX] web: hide list readonly checkbox when entering edition
Forward-port of https://github.com/odoo/enterprise/commit/8a55b3f9f7a7524583effb8198c03ebf695131bd

There are multiple problems with the editable view list. It should be
solved once and for all in the work-in-progress master.

This commit fixes a bug with readonly checkboxes. When a field is
readonly, the table cell gets the "o_readonly" class which changes
its style and behavior. When entering edition, the cells are hidden
except the ones with this "o_readonly" class so that their style are
not affected. The "o_readonly" cell content however was hidden thanks
to a "color: transparent;" rule to let the form readonly field show
the value. The problem is that checkboxes... are not hidden with this
"color: transparent;" rule. Also, the "o_readonly" class is not toggled
during edition while the readonly status could be... so the right fix
would be to get rid of this "o_readonly" class and let the inline form
handle the behavior, but this would affect style and possibly break
unknown behavior.

This fix adds rules to handle the checkbox case correctly.
2017-02-10 11:49:05 +01:00
Christophe Simonis 06e9e45d03 [MERGE] forward port branch 9.0 up to 6f29e7307e 2017-02-10 11:21:14 +01:00
Christophe Simonis 6f29e7307e [MERGE] forward port branch saas-6 up to e60ba73e52 2017-02-10 11:12:03 +01:00
Christophe Simonis e60ba73e52 [MERGE] forward port branch 8.0 up to 8cb13c4e4c 2017-02-10 11:09:14 +01:00
Goffin Simon 2f328d3447 [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-10 11:01:03 +01:00
Nicolas Martinelli 3f16ed9ef7 [FIX] mrp: crash onchange
In a MO, change a product in "Consumed Materials" by clicking on "Search
more...". It crashes.

Clicking on "Search more..." triggers the onchange since it empties the
line. Since there is no product on the line anymore, it crashes.

opw-705644
2017-02-09 15:51:08 +01:00
Freeman Helmuth 800a4b6728 [FIX] doc: CentOS spelling
Closes #15408
2017-02-09 15:07:47 +01:00
Joren Van Onder 0556bc6d9e [FIX] point_of_sale: properly round taxes with round_globally
When tax_calculation_rounding_method is configured to round_globally the
compute_all method of account.tax will not round the taxes based on the
currency. The result of the compute_all function is used when creating
the tax parts of a pos.order account.move.

Taxes are aggregated per session, so 2 orders with orderlines in them
with the same tax will turn into 1 single tax account.move.line. To
correctly handle round_globally, we round all tax values we have after
processing each order.

Fixes #14672
Fixes #14673
2017-02-08 10:28:33 -08:00
Denis Ledoux 00cf180862 [FIX] account: register payment with payment, invoice and company having different currencies
In revision fc813847d8,
`_compute_total_invoices_amount()` was assumed to
give the invoice residual within the company currency but,
in the case the payment_currency is different than the company_currency,
it returns the amount in the payment currency.

In this case, we actually need the total invoices residual
within the company currency.
2017-02-08 18:20:10 +01:00
Denis Ledoux 85b7144193 [FIX] account: invoice/payment reconciliation with a change of rate
The amount of the invoice in the payment currency was wrongly
computed when a change of rate in the invoice currency occured between
the invoice date and the payment date,
when the invoice currency was neither the company currency
nor the payment currency.

e.g.
Company in USD. Exchange rates:

    07/02   08/02
HKD 7.0     8.0
EUR 0.90    0.94

Invoice: 100,000 HKD, date 07/02, worthing 100,000 / 7 = 14285,71 USD
Payment: 13000 EUR, date 08/02, worthing 13000 / 0,94 = 13829,79 USD

The invoice amount within the invoice currency was computed:
100,000 / 8 * 0.94 = 11750€
While the invoice, at the time of the invoice date, worth actually
14285.71 * 0.94 = 13428,57€

When the invoice, payment and companies are all different,
the invoice amount in the payment currency must not be computed from
the amount in the invoice currency computed at the invoice date
to the payment currency, since the rate of the invoice currency
changed, and the amount in the invoice currency at the time
is no longer the same today.

In simple words, `amount_currency` of the invoice
was computed using the 7.0 rate
e.g. 100,000 / 7 = 14285,71
while, when the rate changes, computing from the invoice currency to
the payment currency, which are both different than the company currency
it will first convert the amount to the company currency, using the new rate:
e.g. 100,000 / 8 = 12500€
and then convert to the payment currency:
e.g. 12500 * 0.94 = 11750€

opw-640248
2017-02-08 18:20:10 +01:00
Goffin Simon bd01714388 [FIX] stock: Inventory adjustments in multi company
When making an inventory adjustment in multi company,
the default location_id was all the time taken from
'stock.warehouse0' even if the user was not allowed to read
the warehouse. Inspired from _get_default_location in pos_config.py

Backport of 8955d15e9d

opw:706704
2017-02-08 16:49:33 +01:00
mge-odoo 8cb13c4e4c [FIX] openerp: quote read_group SQL query for case sensitive tables
In SQL, if there is no quote around the table/field, the result will
be returned as case insensitive.

This was causing a bug in the kanban view which was not displaying
the records because x_AA_count was named x_aa_count.
2017-02-08 15:55:47 +01:00
Simon Lejeune 7b2bc90d27 [FIX] stock_calendar: do not edit context in place
This method receives a new api context and thus should not change it
directly. The stock scheduler didn't run because of this.

opw 704764
2017-02-08 14:51:06 +01:00
Goffin Simon b8b1d1d0ab [FIX] crm_partner_assign: The field "Level Name" was not translatable
The field "Level Name" must be translateble.

opw:706486
2017-02-08 14:40:09 +01:00
Goffin Simon 685c874236 [FIX] point_of_sale: POS Orders Analysis not clickable
The numbers in the POS Orders Analysis must be not clickable.

opw:707304
2017-02-08 12:51:46 +01:00
Goffin Simon 4f8ae9f993 [FIX] base: Traceback when creating a submenu
When self.name is False, the following expression:
"self.parent_id._get_full_name(level - 1) + MENU_ITEM_SEPARATOR + self.name"
raised:
"TypeError: coercing to Unicode: need string or buffer, bool found"

opw:706202
2017-02-08 12:22:20 +01:00
Goffin Simon 8bed9363f0 [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-08 08:05:46 +01:00
Goffin Simon 0d68acff8e [FIX] base: _compute_commercial_partner
Before the fix:

*Scenario 1:

create company A as a res.partner

on company A, add an individual contact B

on individual B, add an individual contact C

on individual C, go in accounting tab, click on 'parent company' link, you arrive on company A

*Scenario 2:

create individual B

add a contact individual C on individual B

create company A

on individual B, select a parent company A

on individual C, go in accounting tab, click on 'parent company' link, you arrive on B

After the fix, on each scenario, you arrive on company A.

opw:706757
2017-02-07 22:53:40 +01:00
Christophe Simonis 732da30e20 [MERGE] forward port branch saas-6 up to 6aec563b98 2017-02-07 18:05:08 +01:00
Christophe Simonis 58db291ab7 [FIX] crm: update should not reset default config value 2017-02-07 18:03:46 +01:00
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
Martin Trigaux 496c77cb5a [FIX] account: remove duplicated field
Twice in the view
2017-02-07 16:41:19 +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
Christophe Simonis 6aec563b98 [MERGE] forward port branch 8.0 up to 51cf2852d8 2017-02-07 16:10:04 +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
hurrinico 51cf2852d8 [CLA] signature for hurrinico
Done at #15340
2017-02-07 13:58:21 +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