Commit Graph
107026 Commits
Author SHA1 Message Date
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
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
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
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 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
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
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
Nicolas Lempereur 2d753ab5ec [FIX] web: handle widget order and custom sequence
An editable list can be drag-and-drop sorted by:

- displaying a sequence field,
- displaying a field with the `handle` widget

At first it was only working if the list was not specifically ordered,
but with 26bf35260 it also worked if the list was ordered on `sequence`
or `sequence ASC`.

This commit changes this so it works:

- if the list is not ordered (same as the original intention),
- if the list is ordered by the sequence field (widget `handle` or sequence)

This allows to have a custom model (on which we can't define _order) to be
ordered on a custom field.

This also remove a far-fetched oddity such as having the view ordered by
sequence but having a custom sequence field before `sequence`.

opw-704612
2017-01-18 14:30:57 +01:00
Christophe Simonis 6825ddf9ad [MERGE] forward port branch 9.0 up to 2e5b58a3da 2017-01-18 14:30:42 +01:00
Christophe Simonis 76cb4ffc3c [FIX] hr_timesheet_sheet: correct default fallback value for timesheet date from/to
Oversight new-api convertion.
2017-01-18 13:51:04 +01:00
Raphael Collet 7c5291ff5c [FIX] models: avoid creating XML ids for models that have not been extended
Assume module M extends model `base`.  Upon installing M, all models in the
registry are impacted by the extension, so their `_auto_init` method is
invoked.  This currently creates an XML id `M.model_X` for every model X,
including the custom models created before installing M.  Now, if we deinstall
module M, all those custom models will be removed, as they have only one XML
id, namely the one introduced by M.

Prevent the creation of XML ids for the children of an extended model to avoid
this bug.  Note that if the model extension adds a field, every instance of
that field in children models will have an XML id associated to module M.
2017-01-18 13:32:56 +01:00
Pierre Masereel 1f6ec2b8d6 [FIX] purchase: null stock_moves creation
When the quantity of a purchase order line is manually decreased and if
the purchase order line as been generated by more than one procurement.
If the new quantity is lower than the quantity of the smallest
procurement, it is impossible to validate the picking containg the
stock_moves created by the purchase order validation.

It is impossible to validate the picking, because it contains
stock_moves with 'product_qty' set to 0. Those stock_moves are generated
during the validation of a purchase order.

To fix this issue, we avoid the creation of stock moves with a
'product_qty' set to 0 which has no sense.
2017-01-18 11:45:26 +01:00
Yannick Tivisse e4f6bde414 [FIX] stock: correct typo strinsg -> string 2017-01-18 11:45:25 +01:00
Thibault Delavallée 3efc16e9a0 [FIX] mail: fix typo introduced at last forward port
Format all the dae
2017-01-18 11:36:27 +01:00
Nicolas Martinelli 2e5b58a3da [FIX] project_issue: traceback when group by 'Date of Closing'
Oversight of commit f57787e

Fixes #15110
2017-01-18 10:33:29 +01:00
Nicolas Martinelli 41740aad0d [FIX] event_sale, website_event_sale: price tax included
Commit 5f5f8d8efe introduces the possibility to display prices for B2B
or B2C channels, i.e. prices with taxes excluded or taxes included.

However, the module `event_sale` was not included in this improvement.
This is an issue since it is not possible to display the event ticket
prices with taxes included.

opw-702209
2017-01-18 10:01:54 +01:00
Jérome Maes 8e94783778 [FIX] google_calendar: correct previous fix, and set correct context
The first fix (de21eda9f4) was not enough ...
2017-01-18 09:56:14 +01:00
Christophe Simonis 44276dfdc3 [MERGE] forward port branch saas-11 up to a0aca47fef 2017-01-17 19:12:20 +01:00
Christophe Simonis a0aca47fef [FIX] website_sale_stock: search warehouse as sudo
Oversight of new-api convertion done in previous forward-port.
2017-01-17 18:45:24 +01:00
Christophe Simonis 70f86ce4e8 [MERGE] forward port branch 9.0 up to 16fa61b34f 2017-01-17 18:04:57 +01:00
Christophe Simonis 16fa61b34f [MERGE] forward port branch saas-6 up to 7cb977fc3c 2017-01-17 16:11:05 +01:00
Christophe Simonis 7cb977fc3c [FIX] calendar: also reset res_id when sending mail to attendees 2017-01-17 14:44:50 +01:00
Josse Colpaert ffe13756f5 [FIX] mrp: manufacturing vignette in inventory dashboard
When clicking on the "manufacturing" vignette in the inventory
dashboard, the records were not filtered correctly (example: add a new
warehouse, a new "manufacturing" vignette appears for this warehouse in
the inventory dashboard, clicking on it would display the MO of all the
warehouses).

With this fix, as with the pickings, it will only show the count of MO
filtered to that specific picking type in the vignette, and clicking on
it will displayed the filtered ones.

We implementent the method of the compute field the same way the similar
method for the picking is implemented.

fixes #15008
2017-01-17 14:43:06 +01:00
Christophe Simonis ecd03bec8a [MERGE] forward port branch 8.0 up to 8f1c2bfc91 2017-01-17 14:17:56 +01:00
Christophe Simonis 8f1c2bfc91 [FIX] mail: force mail.message linked record invalidation 2017-01-17 14:14:16 +01:00
Thibault Francois d588efba6c [FIX] project: remove unused field
Remove unused fields (including inherited view) in kanban project view,
For example, `user_id` triggers a read for each project on res partner,
40 projects display = 40 read on `res.partner`.

Closes #15096
Related to opw-696979
2017-01-17 13:22:24 +01:00
Nicolas Martinelli bbbf317fd3 [FIX] l10n_be: VAT Declaration
The VAT declaration produces an error when uploaded to the official
website. Although the structure is correct, the "Representative" and the
"Declarant" contain the same information, which is not consistent.

opw-702066
2017-01-17 11:51:02 +01:00
qdp-odoo 1e8d9e1c64 [REV] account: revert fix made on ea1eca2.
When an account.move.reconcile was unlinked, the reconcile_ref on the related move lines was no longer cleared.
2017-01-17 11:21:17 +01:00
Pedro M. Baeza ea1eca22d3 [FIX] account: Don't trigger twice the reconcile_ref compute method. Was PR #14892
Both store triggers on reconcile_ref are triggered by the same condition,
but seen on 2 tables different, but they always happen together, so no
need for both.

On regular Odoo, the only problem is the performance: the write operation
is performed twice, but on a system with connector or other parallelization
technology, this provokes lot of concurrency problems.
2017-01-17 10:48:56 +01:00
Goffin Simon 342dad44cd [FIX] account_asset: To ensure the migration compatibility with 9.0
This fix allow to keep the same behavior of 8.0 and 10.0 to manage the assets.

In 9.0, the field account_income_recognition_id(oldname='account_expense_depreciation_id') has been
deleted from the account.asset.category.form view with 6120babb45 and
then it was not possible to manage the assets like in 8.0 and 10.0

But as this fix is in a stable version, it must be compatible with instances without any upgrade
of the view account.asset.category.form.

This issue has been solved in saas-11 with this commit: eb8d4aaa59

opw:703860,702265
2017-01-17 09:53:58 +01:00
Pierre Masereel 77767801c6 [FIX] bus: do not suggest company users to portal users
When you are connected as a portal user, you can access to the list of
company users when you try to create a channel of type "Direct Message".

This is caused by a SQL request that doesn't check the access rights of
the user before returning the list of users.

To fix this, we check that the user can create a mail channel, before
returning partners information.

opw-704127
2017-01-16 17:54:12 +01:00
Pierre Masereel 36f6f2647d [FIX] hr: do not show employee users to portal users
When you are connected as a portal user, you can connect to the
backend of Odoo and if you go to your discuss app through the '@' icon,
you can list the employees of the company by mention a employee

This is caused by a SQL request that store in cache the employee
list to minimize requests when mention. The problem
is that those requests don't take into account the rights of a user
to read employees information.

To fix this, we are taking the group 'base.group_user' and read the
information of its users, the 'read' is respecting, the access rights of
the users, and so the employees names, are ont shown anymore to portal
users.

opw-704127
2017-01-16 16:42:18 +01:00
Nicolas Martinelli 805f7ed8e7 [FIX] event_sale: traceback
- Go in Events > Events
- Create or modify an event
- Add a ticket to your event, and try to change the product -> traceback

The field `event_type_id` does not exist on model `product.product`. It
has been removed in commit 7f97a64091.

opw-704838
2017-01-16 15:54:00 +01:00
Nicolas Martinelli aa6c0ef907 [FIX] mail: missing translation 2017-01-16 15:49:05 +01:00