Commit Graph
117975 Commits
Author SHA1 Message Date
Denis Ledoux 9fd715e1f5 [FIX] account_analytic_default: invoice, avoid account overwrite
Due to the following revision:
bdf630f9b8

When creating an invoice from a purchase order with an
analytic account set, the analytic account was no longer
copied on the invoice, as the analytic account that was added
thanks to
https://github.com/odoo/odoo/blob/9.0/addons/purchase/invoice.py#L53
was overwritten with `False` as `rec` was False
or if `rec` was True, it was overwritten with the analytic account
of `rec`.

opw-697702
2016-12-16 11:23:18 +01:00
Goffin Simon 3c710ef31f [FIX] account: refunding an invoice with two payment terms
Step to reproduce the bug:

Create a payment term with two separated due type:
-Due type 1: percent , value 30, numbers of days: 0 days after the invoice date
-Due type 2: Balance; value 0, Number of days 0: Last day of following month
Create an invoice with the payment term
Refund the invoice with the option "cancel: create refund and reconcile"
or "Modify: create refund, reconcile and create a new draft invoice".
Error message: "You are trying to reconcile some entries that are already reconciled!"
But no payment had been received and the receivable accounts were still open.

opw:694386
2016-12-16 09:12:59 +01:00
Dhawal Limbuwala c52350cf21 [REF] hr: typo
"HR" is consistently used in Odoo, instead of "Hr".
2016-12-15 17:05:39 +01:00
Goffin Simon 35e66ec478 [FIX] account: refunding an invoice with two payment terms
Step to reproduce the bug:

1) Create a payment term with two separated due type:
-Due type 1: percent , value 30, numbers of days: 0 days after the invoice date
-Due type 2: Balance; value 0, Number of days 0: Last day of following month
2) Create an invoice with the payment term
3) Refund the invoice with the option "cancel: create refund and reconcile"
or "Modify: create refund, reconcile and create a new draft invoice".
4) Error message: "You are trying to reconcile some entries that are already reconciled!"

But no payment had been received and the receivable accounts were still open.

opw:694386
2016-12-15 16:00:35 +01:00
Josse Colpaert 3f375c9bbe [FIX] stock: destination location on delivery order without partner
If you create a delivery order without partner, its destination location
zone will be set to "Partner Locations / Vendors", which is not correct.
This is due to an error in the onchange_picking_type.

This commit fixes the issue by setting the destination location to
"Partner Locations / Customers". This change has not other implications
more than being consistent.
2016-12-15 15:03:46 +01:00
Martin Trigaux e0c9b9c2cd [IMP] point_of_sale: more informative error
The pos loading crashes in the following scenario.
1. start selling a product (order line the localstorage)
2. archive or delete the product in backend
3. reload the pos session

The POS is interrupted with not much information.
Give an error a bit more meaningful.
2016-12-15 14:41:37 +01:00
Simon Lejeune 8fe8ca9948 [FIX] stock: picking assign for stock moves if batched in a one2many
Let’s say you have 10 units of products item1 and item2 in your stock.
If you create a sale order with two order lines: 1 item1 and 1 item2,
it’ll create one picking with two pack operations: 1 item1 and 1 item2.
Validate the picking, everything goes fine.

Now if you go back to the sale order and increase the quantity of the
two order lines, let’s say you sold now 2 item1 and 2 item2, it’ll
create two picking having each one a single pack operation: the first
with a pack operation for 1 unit of item1, the second one with a pack
operation of 1unit for item2.

The expected result would be that a single new picking with the two pack
operations is created.

This bug is due to the fact that there’s a check on sale order line
write that’ll call _action_procurement_create if you indeed increased
the quantity of any line. This method will at some point call
assign_picking on the model stock move. This method will try to find a
non-done picking with the same procurement group as the one we’re
working (the procurement group for our sale order). For the first write
on sale.order.line, it won’t find one because there aren’t, so it’ll
create one. For the second write on sale.order.line (so, for the second
line) it should find the picking created by the first write, but it
won’t and so it’ll create a second picking.

The fact that it didn't find the picking create by the previous line
is due to the fact that we do not update the computed fields
between write on a one2many field since rev 7b8afc2 and that “group_id”
on the model stock.picking is a computed field (a related).

As we prefer to keep the behavior of not recomputing the computed fields
between writes on a one2many (it’s a trade-off for performance reason,
except in edge cases the recomputation is useless), we explicitly
trigger the recomputation before looking for a candidate picking in the
stock.move action_assign, so that the next searchs on picking.group_id
will be succesful.

This commit also introduces a test for this case.

Closes #14718
2016-12-15 13:36:50 +01:00
Christophe Simonis 10778d4521 [FIX] hr: do not notify user when assigned to employee 2016-12-15 13:23:36 +01:00
Hans Henrik Gabelgaard 638989b84e [FIX] mail: keep recipients after saving a template
When sending an email via the mail.compose wizard, the selected partners are
stored in the context (`active_ids`).
If the composed message is saved (button "save template"), the context is lost
in the _reopen action.
The active_ids content of the new context is the id of the newly created mail
template and is used as the id of a res.partner (sending the email to a
different contact).

Keep the context during the reopen to avoid losing active_ids.

Closes #11947
2016-12-15 13:08:43 +01:00
Hans Henrik Gabelgaard c7fc8e1722 [CLA] signature for hhgabelgaard
cf #11947
2016-12-15 13:08:42 +01:00
Martin Trigaux 4005ceffa7 [FIX] account: bad label
Frenchiglisation of labels
2016-12-15 11:56:44 +01:00
Martin Trigaux b792c05cb5 [I18N] refund in fr and fr_BE
Avoir in France
Note de crédit in Belgium
2016-12-15 11:52:46 +01:00
fwi-odoo 7cb865fab8 [IMP] web_editor: avoid loading translation in the backend twice 2016-12-15 11:23:46 +01:00
fwi-odoo 34b7fd833c [IMP] web: allow mentioning people right after inviting them
Before this commit, the list of channel members is fetched once, and never reloaded.
So, when a new member is invited, he cannot be mentionned by the autocompletion.
With this commit, we remove the 'members_deferred' from the channel,
which will cause the member list to be refetched next time it is needed.
2016-12-15 11:15:04 +01:00
Raphael Collet 64249936e8 [FIX] models: allow constraint methods triggered by function fields 2016-12-15 11:08:13 +01:00
Goffin Simon 49eb6176c2 [FIX] mrp: manufacturing manager can unbuild an order
A manufacturing manager can unbuild an order without being an inventory manager.

The action unbuild only appears when the user is manufacturing manager.

opw:695734
2016-12-15 09:59:31 +01:00
Raphael Collet 7d19661fb6 [FIX] models: allow @constrains on fields with inverse method 2016-12-15 09:53:58 +01:00
Raphael Collet 8e3e7874ad [FIX] models: allow constraint methods triggered by function fields 2016-12-15 09:52:21 +01:00
Jordan Vrtanoski 450f7df00d [FIX] web: transfer context to underlying many2one in reference field
Fixes #11955 (loss of context in many2one subwidget)
Closes #11957
2016-12-15 09:34:32 +01:00
Nicolas Lempereur c9cd40d0f4 [FIX] web: possible traceback when removing list row
Fix and issue is similar to odoo/odoo@1f06cc416

When clicking on delete icon before saving current list row edition (by
clicking outside the editable field), it could lead to traceback in some instances
because the deletion and saving are done concurrently.

closes #627
opw-695743
2016-12-14 19:14:50 +01:00
Laurent Mignon (ACSONE) 8d43fc46f2 [FIX] report: add missing context
This PR allow to use the context to specify contextual informations used in the
create method of ir.attachement.

Closes #13790
2016-12-14 16:43:25 +01:00
Yannick Tivisse 168908656d [MOV] report: move paperformat from account_batch_deposit
It is used in mrp_account, but the module doesn't depend on account_batch_deposit
2016-12-14 16:03:28 +01:00
Martin Trigaux 13ed92c6d8 [FIX] payment_transfer: untranslated string
Replaces and closes #12787
2016-12-14 15:53:03 +01:00
Jairo Llopis f6692139da [FIX] event: add missing name attribute
This breaks nothing, but allows to enable this filter by default.

Closes #12997
2016-12-14 15:50:32 +01:00
Cyril Gaudin 3ac2904b46 [FIX] report: missing context v7 signature
The v8 call uses `context=self._context`
Private method so should be ok to modify the signature.

Closes #13263
2016-12-14 15:21:35 +01:00
Stefan Rijnhart 4f6e4bb28e [FIX] account: use code from defaults dict if present
Do not force a ugly '... (copy)' code if provides one.
Closes #11260
2016-12-14 15:08:13 +01:00
Stefan Rijnhart 57788ddb67 [FIX] stock: add missing context
when creating procurement order

Closes #12858
2016-12-14 15:02:12 +01:00
David Tran f4cd8af0c8 [FIX] crm: multilingual support for crm planner stages
translation method _t() added into web_planner_crm.js

Closes #12809
2016-12-14 14:47:13 +01:00
Olivier Dony 1101409937 [FIX] point_of_sale: reuse cashbox instead of always creating one
Version 9.0 comes with a revamped accounting system, and the
cashbox system for cash control on bank statements was changed in the
process.

The POS App was updated to use the new system, but failed to
reuse the existing cashbox control if one already existed.
This worked as expected on bank statements directly, but not
on POS sessions where a new cash control had to be input every time.

This fix requires an update of the views, but works in a
backwards compatible manner. Users who do not sync their view
definitions will still be able to work (but will still experience
the bug).
2016-12-14 14:35:38 +01:00
Olivier Dony e892c57482 [FIX] point_of_sale: repair rescue session system
Rev 87a3fe92de revamped the
rescue session system in an attempt to simplify it, but
created new problems.

The rescue system is designed for accepting POS orders
that belong to a POS session that is already closed.

After 87a3fe92de:

- The system tried to automatically reuse an existing session
that matches the properties of the closed one. This will often
come as a surprise to the POS users, with orders appearing
from nowhere in a live session, possibly invalidating the cash
control steps, etc. Using a separate new session with an obvious
"RESCUE" name is much better for users. They will be able to
review the rescued order separately as well.

- When no open session was available, the system tried to create
a new one (without the rescue flag). This could often fail
because existing sessions could conflict with the new one, completely
breaking the recovery. (E.g. a session from the same POS but
with a different user) The rescue flag was designed to avoid this
pitfall, allowing multiple extra rescue sessions to coexist with
live ones.

This patch restores the use of the RESCUE flag for recovery
sessions, and forces the creation of a new session for every
recovered session. Recovery sessions will also be labelled as
"RESCUE" now, making it things more obvious for end users.
2016-12-14 14:12:25 +01:00
Olivier Dony 43a0decb3a [FIX] point_of_sale: correct typo in order pricelist selection
Typo introduced in 44f9e923c2
prevented the selection of the correct non-default pricelist.
2016-12-14 14:12:24 +01:00
Olivier Dony 9f5839c35a [FIX] point_of_sale: do not reset selected category every time
There seems to be no need to reset to the root category
on the product list every time we switch back to
the list from another screen. Unless a full refresh
was requested (e.g after closing an order).

This avoids losing the currently selected category
after each screen switch. It can be quite convenient
to stay in the same category while the cashier is
processing items that need to be weighed, for example.

This commit allows POS screen widgets to distinguish
when the user is expecting a full reset of the
target screen, vs. simply re-displaying it.
2016-12-14 14:11:10 +01:00
Olivier Dony c077cd7448 [FIX] point_of_sale: scroll to bottom after weighing product
When switching back from the scale screen to the
product screen, the order summary was re-drawn
and always scrolled at the top.

This happens because the redraw takes place in the
background while the scale screen is still displayed,
so the new area does not know its size yet and
cannot be scrolled properly.

Swapping these operations around fixes the issue
and it happens fast enough to be invisible to the
user.
2016-12-14 14:10:56 +01:00
Christophe Simonis 1a46fd4968 [MERGE] forward port branch saas-11 up to 995a58cc4b 2016-12-14 14:10:48 +01:00
Christophe Simonis 995a58cc4b [MERGE] forward port branch 9.0 up to a9a7fe15b3 2016-12-14 13:46:11 +01:00
Christophe Simonis a9a7fe15b3 [MERGE] forward port branch saas-6 up to e25629510c 2016-12-14 13:33:32 +01:00
Christophe Simonis e25629510c [MERGE] forward port branch 8.0 up to 73e5c82037 2016-12-14 13:07:24 +01:00
Richard Mathot aaf2e96b0a [FIX] membership: bad forward port of aac0faafb8 in 9.0 2016-12-14 12:23:07 +01:00
Goffin Simon 169b396c3f [FIX] product: Persistant order on product variant
The order of variants(product.product) is (re)defined each time  the attributes
of a product.template are modified. The order of these variants is computed according
to the order defined on "product.product" which is ordered by 'default_code,name_template'
and also the sequence of the product.attribute.value.
But when a new product.attribute is created, the default sequence is the order of creation of your new values.
So if the sequence of the attributes is changed after modifying the product.template, the new sequence will not
have any impact on the order of the variants. The sequence of the attributes must be defined first
before modifying the attributes on a product.template to have an impact on it.

opw:693135
2016-12-14 11:53:34 +01:00
Pere Albujer 73e5c82037 [FIX] point_of_sale: increase total's table size
Was taking the right half of the ticket only and may be too small to display the full amounts (currency symbol cropped in some languages)

Closes #14702
2016-12-14 11:07:56 +01:00
Alexis de Lattre 0df9a6cc2a [FIX] sale,purchase: Add currency symbol in tree view
In invisible to make the 'monetary' widget work.
Makes sense as it is the same behaviour as the form view where the currency is displayed on monetary fields, even if the use has no multicurrency acces.

Closes #14714
2016-12-14 10:42:29 +01:00
Jérome Maes 951d63daf3 [FIX] website_crm_partner_assign: bad jquery binding 2016-12-14 09:12:35 +01:00
Nicolas Lempereur f1973fa0a7 Revert "[FIX] purchase: update order_lines date_planned"
This reverts commit dcf50bf242.

The commit should not have been forward-ported after 9.0 since
Model update method has been @api.multi'ed.

This also introduced an issue since changing the first line would
change the date_planned of the order (which would alter subesquent
updates).

opw-697680
2016-12-14 08:43:46 +01:00
Nicolas Lempereur 2d0ff8afa4 [FIX] purchase: set all dates and not-stored field (9.0 only)
The feature "set all date to all order line" on a purchase order allow
user to update the schedulded date of all order lines.

It was backported in 9.0 with 401a3cfa but in 9.0 date_planned was not
stored, the button would wrongly set the scheduled dates of the lines to
the minimum date.

With this commit the functionality should work as expected, unless
someone use an out-of-date template in which case the functionnality is
disabled.

opw-697680

note: PO date_planned is stored after 9.0 so this commit must not be
forward-ported.
2016-12-14 07:41:01 +01:00
Julien Laloux d543bb3106 [FIX] account_test: add missing _
The translation function `_` was missing while it was present in the content (e.g. account_test_01)

Closes #10403
2016-12-13 16:15:20 +01:00
Raphael Collet 6fa2167247 [IMP] stock: remove _parent_store=True from model stock.quant.package
The model does not actually need this feature, as the hierarchies of packages
are not expected to be deep.  Performance wise, updating columns `parent_left`
and `parent_right` may actually suffer from concurrent updates that require
retrying requests.
2016-12-13 12:59:26 +01:00
Thibault Delavallée 03ac47b9d7 [FIX] mail: customers should not follow default internal subtypes
Currently when someone is added as follow to a document default subtypes
are computed if no specific subtypes are given to the subscription. However
if internal subtypes are set as default those are added to all new
followers. It should take into account customers and shared users and avoid
adding them internal subtypes.

Customers and shared users are not notified of messages using an internal
subtype. So currently there is no information leak. However with this fix
we ensure internal subtypes are not followed by external people even if
no notification is created.
2016-12-13 12:57:58 +01:00
Pratima Gupta 8942a73fb3 [FIX]: website_quote: translating quote_description
Steps to reproduce:

-Install website_quote
-Add a language French
-Create a quotation template
-Add a line with a new prodcut
-Translate the field description

Bug: Traceback becasue the field quote_description was not translatable.

opw:697508
2016-12-13 12:32:38 +01:00
Nils Hamerlinck 73b18964ea [FIX] pos_restaurant: Allow more complex URL schemes for printers
For example: https://abc.def:8080
It is already allowed for the printer in main point_of_sale module.
Apply the same schemes in pos_restaurant.

Closes #13769
2016-12-13 12:04:27 +01:00
Moises Lopez - https://www.vauxoo.com/ c349e9a8f8 [FIX] stock: Add missing context to search
Closes #13636
2016-12-13 11:46:47 +01:00