Commit Graph
110261 Commits
Author SHA1 Message Date
Nicolas Martinelli f96bbfd956 [IMP] payment: token order
Sort the payment tokens by descending id, so that the default token
selected for a partner is the last one.

opw-705441
2017-01-23 13:12:40 +01:00
Wolfgang Taferner 896f5c0886 [FIX] Invoiced orders should never create a duplicated account move 2017-01-23 12:39:45 +01:00
George Daramouskas 5a992857b8 [FIX] payment: do not rely on English as default language
If the database is create in monolangue and `en_US` is not present, the default
value computation crashes as tries to assign a value not present in the
selection (all installed languages).

Use the environment language as default (same as the default of res.partner).
It may be empty but not a value not existant in the database.

Fixes #15165 
Closes #15176
2017-01-23 12:07:14 +01:00
Denis Vermylen bcc517b6eb [FIX] point_of_sale: do not set 'invoiced' orders to done
This commit fixes github issue: https://github.com/odoo/odoo/issues/15170
2017-01-23 11:37:12 +01:00
Christophe Simonis 5065f4b3e8 [MERGE] forward port branch 8.0 up to 91f11f8bd6 2017-01-23 10:46:39 +01:00
Jeremy Kersten a307ab8076 [FIX] website_sale: partial revert of 6b87284f
This commit has been forward-ported by error in 9 and +.
Update website_sale.js to fix impacted databases.

Decimal precision in v8 = 0.01, and v9+ = 2

With fwd port, int(0.01) instead of int(2) because data-precision
appears 2x, first with 0.01 (v8), secondly with 2 (v9+).

Js fix uses the last decimal-precision (v9) instead of the first (v8)
2017-01-23 09:52:47 +01:00
Nicolas Martinelli 49f5aef548 [FIX] stock_account: inventory at date
The "Inventory at Date" has several issues:
- graph and pivot views are not available despite their existence
- the views are not linked to an action, thus it is impossible to save
  it on the dashboard.

opw-703649
2017-01-23 09:19:49 +01:00
Nicolas Martinelli 68dd9bdb0a [FIX] board: prevent crash if no action
If the user tries to save on the dashboard a view which was not open
through an existing action, the call to method `add_to_dashboard`
crashes because of incorrect arguments (`action_id` is undefined in JS).

This is for example the case when trying to save an "Inventory at Date"
in the dashboard (will be fixed in a subsequent commit).

opw-703649
2017-01-23 09:19:49 +01:00
Nicolas Martinelli 79bd2f3062 [FIX] stock_account: inventory at date
The "Inventory at Date" has several issues:
- graph and pivot views are not available despite their existence
- the views are not linked to an action, thus it is impossible to save
  it on the dashboard.

opw-703649
2017-01-23 09:19:23 +01:00
Nicolas Martinelli 7180d948f0 [FIX] board: prevent crash if no action
If the user tries to save on the dashboard a view which was not open
through an existing action, the call to method `add_to_dashboard`
crashes because of incorrect arguments (`action_id` is undefined in JS).

This is for example the case when trying to save an "Inventory at Date"
in the dashboard (will be fixed in a subsequent commit).

opw-703649
2017-01-23 09:19:23 +01:00
Odoo Translation Bot c7679dde25 [I18N] Update translation terms from Transifex 2017-01-22 04:30:26 +01:00
Odoo Translation Bot 91f11f8bd6 [I18N] Update translation terms from Transifex 2017-01-22 03:25:31 +01:00
Odoo Translation Bot 4169049263 [I18N] Update translation terms from Transifex 2017-01-22 00:39:31 +01:00
Martin Trigaux 4977bceda9 [MERGE] correct groups reference in views
Fix several references to `groups=` in views that were incorrect or declared in
a way that the view or code was evaluated before the group creation (order of
creation) or errors in group name.

Closes #15098
Fixes #15094
2017-01-20 15:49:41 +01:00
Martin Trigaux b437afd029 [FIX] base: avoid reference to group_user before creation
The group base.group_user is used in the computation of the share column which
is executed at column creation, before the group is imported.

Set it in base.sql to already have an xmlid to resolve.
2017-01-20 13:54:16 +01:00
Martin Trigaux c278ebf2fe [FIX] sale,account: do not reference to not declared yet group
The group sale.group_discount_per_so_line is used in account but declared in
sale. As the has_group method ignores unexistant fields, this field was never
displayed until somebody install sale.

In account, replace the discount group with debug mode.
Remove it from the report as it was only displayed when at least one discount
was set (not possible if the discount field is not displayed).

In sale, makes xpath to use the correct group.

Fixes 15094
2017-01-20 13:54:16 +01:00
Martin Trigaux a04df7d1fa [FIX] procurement: do not make reference to stock group
Not created yet if stock is not installed.
Can show the procurement buttons without the push/pull rules.
2017-01-20 13:54:04 +01:00
Martin Trigaux c319210b0a [FIX] stock: reference to correct uom group
stock.product_group_uom does not exists
product.group_uom does
2017-01-20 12:56:52 +01:00
Martin Trigaux 5fd14bce32 [FIX] crm: import security first
To be able to make references to the created groups
2017-01-20 12:56:52 +01:00
Martin Trigaux 7601894adc [FIX] hr: group_multi_departments does not exists 2017-01-20 12:56:52 +01:00
Martin Trigaux c920444e56 [FIX] account: avoid error group billing not found
Set the use in 2 steps to avoid chicken & egg problem where the user uses
reference to a group not defined yet.
2017-01-20 12:56:51 +01:00
Martin Trigaux 2f1d3ad712 [FIX] website_hr: use correct group
Group present in hr and taggued accordingly since v10, not base
Introduced in forward port
2017-01-20 12:56:51 +01:00
Martin Trigaux bb41d6b9d6 [FIX] stock: use correct group
stock.group_locations does not exists but stock.group_stock_multi_locations does
2017-01-20 12:56:51 +01:00
Martin Trigaux b91461f9c0 [FIX] stock: reference to correct group
stock.group_stock_production_lot does not exists but stock.group_production_lot
does
2017-01-20 12:56:50 +01:00
Martin Trigaux 33b1b52528 [FIX] website_sale: security as first import
To avoid references to group non-existants
2017-01-20 12:56:50 +01:00
Odoo Translation Bot c150838bb5 [I18N] Update translation terms from Transifex 2017-01-19 17:28:33 +01:00
Martin Trigaux 3c9937388d [FIX] website_customer: filter on correct field
The field tag_ids has been removed at df2bed3c but not changed in the controller
2017-01-19 17:17:42 +01:00
Nicolas Lempereur b9db65aa73 [FIX] web: display warning message for o2m modal
Be a little less strict when not showing o2m list view warning so if the
o2m is not editable (a modal is open instead of editing inline) we still
show warnings.

Also have warnings over modal overlays so they can be used for modals.

opw-702333
2017-01-19 16:46:33 +01:00
Goffin Simon 6834c4d46e [FIX] purchase: _get_purchase_order_date and product_qty
When seller_ids are set on a product with a Minimal Order Quantity(MOQ),
the function _select_seller didn't get the ordered quantity so the
sellers with an MOQ were never selected.

opw:704856
2017-01-19 16:43:22 +01:00
Nicolas Lempereur 734d9b56da [FIX] web: conserve /id for saved export list
With 003d85b instead of getting the name of the relation
field_relation we get field_relation/id.

But the data about the related fields are not gotten all at once when
opening the export modal. They are gotten by clicking on the arrow of
the related record.

So we need to have these /id information saved in the export list,
otherwise for example the related records can be missing when exporting
from an export list, whilst everything was OK without using the saved
export list.

With the previous change, an export list could contain an id and .id
fields for the same relational field, so a change must also be done in
fields_info method used when getting a saved list.

opw-665994
opw-693535

note: adapted forward-port of 8.0's 29be9ae80 which was lost when
merging web enterprise onto web community.
2017-01-19 16:24:53 +01:00
Josse Colpaert c453358c88 [FIX] mrp: intermediate post inventory during a MO
When posting inventory during a manufacturing order,
all raw material and finished product moves are used,
also those done from a previous post inventory.

This is no problem for the moving of quants because
a filtering is done in the move_validate method,
but it is a problem for the price calculation in
mrp_account and for linking the consumed/produced_quant_ids
of the quants of the raw and finished moves.

Before this fix, it would calculate already consumed materials
a second time in the price of the finished products and would
link quants produced with previously consumed quants (and vice versa)
when doing a second post inventory.

We add a test to show the issue.
2017-01-19 16:21:27 +01:00
Cédric Pigeon (ACSONE) 640de0d22e [FIX] purchase: generate invoice lines from purchase lines
The invoice lines were generated almost fully from the given purchase line.
For a few field, the information was retrieved from the purchase order selected
in the onchange.
In standard it makes no difference but the purpose of this generic method is to
rely only of the line given as parameter.

In the scenario of extensions to generate invoice lines from several purchase
orders, this method could not be used as was relying on the previously selected
purchase order.
This was done at OCA/purchase-workflow#319

This commit ensure to only rely on givem `line` to generate invoice lines.

Closes #15104
2017-01-19 15:24:10 +01:00
Martin Trigaux ebda1abec4 [IMP] stripe: add receipt_email to the order
The email of the recipient must be specified in the charge.
The checkout.js prompt creates a token with the email specified as the name but
to get an email confirmation that the charge succeeded, the receipt_email
parameter must be set.

Side note: the receipt_email is not enough to send email confirmation, it must
also be enabled on Stripe dashboard that generated the access tokens.

Reference: https://support.stripe.com/questions/email-receipts

opw-697759
2017-01-19 13:34:58 +01:00
Goffin Simon 1ce6d6b507 [FIX] account_asset: Setting accounts on an account.asset.category
For the purchase case, see explanation on this commit 301559f7d8bf8480fd39962a2104661e4fe4bf38
For the sale case,a revenue recognition,

(1)Deferred Revenue Account
(2)Recognition Income Account
(3)Recognition Account

When making a revenue recognition in 5 years for 100k

(1) is credited of 100k
(2) is credited each year of 20k
(3) is debited each year of 20k

So in this case, (3) can be equal to (1).
2017-01-19 11:09:16 +01:00
Nicolas Martinelli 586496338b [FIX] account: crash when unlink taxes
If `get_default` returns an empty value (`None`), the `set` instruction
crashes.

Backport of 26d1a3884b

Closes #15116
opw-702597
2017-01-19 10:51:05 +01:00
Zakaria Makrelouf 050c06188b [CLA] Signature for zakiuu 2017-01-19 10:49:23 +01:00
Martin Trigaux 254afc6c9d [FIX] tools: colorize image with pillow 4.0
Introduced by python-pillow/Pillow@c3fe5d43 and integrated into pillow 4.0
The size of the image is ignored and must be set using an image or a mask.

This patch is retrocompatible with the previous versions as the changed code was
in the box size computation. With this patch a 4 points box size is given so the
modified code is not executed.

Fixes #14927
2017-01-19 10:36:21 +01:00
Nicolas Martinelli 4cb94c9019 [FIX] web: date < 01-01-1900
The Python method `strftime` raises an error when the date is older than
01-01-1900 ("The datetime strftime() methods require year >= 1900"). If
the user mistyped the date (or was expecting 01-01-16 to be converted
into 01-01-2016), this can lead errors since the ORM uses this method
frequently.

opw-702313
2017-01-19 10:13:51 +01:00
Nicolas Martinelli 94f7f6aa22 [FIX] web: date < 01-01-1900
The Python method `strftime` raises an error when the date is older than
01-01-1900 ("The datetime strftime() methods require year >= 1900"). If
the user mistyped the date (or was expecting 01-01-16 to be converted
into 01-01-2016), this can lead errors since the ORM uses this method
frequently.

opw-702313
2017-01-19 09:52:44 +01:00
Cédric Pigeon 0ae1f59143 [FIX] To make function _prepare_invoice_line_from_po_line more generic
This function is only used in purchase_order_change and order_id is a required field
in a purchase.order.line. So this fix has no impact on stable version.
But now it s more generic.

opw:705105
2017-01-19 09:33:37 +01:00
Christophe Simonis 03f9514af0 [FIX] calendar: adapt new ir.rule to use renamed field 2017-01-18 16:42:36 +01:00
Christophe Simonis f0a5618e61 [MERGE] forward port branch saas-11 up to 6169018c33 2017-01-18 16:21:55 +01:00
Christophe Simonis 6169018c33 [MERGE] forward port branch 9.0 up to bbdf9605e4 2017-01-18 16:13:03 +01:00
Jiri Zatloukal da3e6e36e6 [CLA] signature for jirizatloukal
Done at #15117
2017-01-18 15:29:50 +01:00
dansanti bbdf9605e4 [FIX] openerp: Field One2many child propagation on NewId dict
If exist an one2many field as child of another field, this one2many get only
empty lines and Javascript dataset set wrong referid, causing a bad query with
False values and 'one2many_v_id'$ as inverse_id.

This PR adetect on convert_to_change if field is one2many and fnames = None,
in case True, set fnames with one2many model's fields

This commit closes #12249, closes #11236

Courtsey of @rco-odoo for review
2017-01-18 15:27:20 +01:00
Goffin Simon f932f4d4f4 [FIX] product_expiry: Setting life_date, use_date, removal_date, alert_date
When setting life_date, use_date, removal_date or alert_date, if one of these
fields are already set, it must be kept.

opw:704962
2017-01-18 15:14:25 +01:00
Jeremy Kersten 16349661e3 [CLA] signature for dansanti 2017-01-18 15:01:00 +01:00
Nicolas Martinelli 23b2bba925 [FIX] calendar: private events
By default, an event can be modified by any employee. This is also the
case for private events, displayed as "Busy" to other users. However,
since any user can modify an event, nothing prevents him to change the
privacy setting in order to be able to see the content.

This commit introduces a global record rule which only allows the
followers of an event to modify it.

opw-705079
2017-01-18 14:49:22 +01:00
Goffin Simon f98a4d45af [FIX] account_asset_invoice: setting account_id on an invoice line with an asset
Thanks to this commit: 342dad44cd

(1) Asset Account
(2) Depreciation Entries: Asset Account
(3) Depreciation Entries: Expense Account

Now it's possible in 9.0 to set the account_income_recognition_id.
So in the case of a vendor bill if the account_income_recognition_id(3) is set,
it means that the depreciation entries are debited on this account(3).
Then the asset account can be used on the invoice line.

NB: When the account_income_recognition_id(3) is not set, it means that

The Asset Account(1) is used to debit the depreciation entries so it cannot be used as an asset account.
In this case, (1) is used as (3)
And the Depreciation Entries: Asset Account(2) is used as (1) and (2) because the all assets are first debited
on this account and progressively the depreciation entries are credited on this account too.

This is why in 10.0, there is an onchange on account_asset_id on model "account.asset.category" which sets
the same value for (1) and (2).

Example with account_income_recognition_id set: Purchase of 100k with a 5 years depreciation:

on (1) debit=100k and credit=0

on (2) each year debit=0 and credit=20k

on (3) each year debit=20k and credit=0

Example without account_income_recognition_id set: Purchase of 100k with a 5 years depreciation:

on (2) debit=100k and credit=0

on (2) each year debit=0 and credit=20k

on (1) each year debit=20k and credit=0

This behavior can be analysed in function create_move on model "account.asset.depreciation.line"

opw:702265
2017-01-18 14:44:53 +01:00
Christophe Simonis 879c323578 [MERGE] forward port branch saas-11 up to 6825ddf9ad 2017-01-18 14:42:04 +01:00