Commit Graph
102777 Commits
Author SHA1 Message Date
César Castillo 4e8a88a3bd [CLA] signature for ceaucari
Closes #11503
2016-12-19 18:15:21 +01:00
Denis Ledoux a4836a81b2 [FIX] hr_payroll: wrong context in revision cfb850cd77 2016-12-19 16:38:09 +01:00
Denis Ledoux cfb850cd77 [FIX] hr_payroll: month name in the user language
In the payslip name, the month name was set
within the server locale, rather than the
user language.

Therefore, if you had your server default locale
in English but your user in French, the
month name was displayed in English anyway.

opw-692590
2016-12-19 15:54:12 +01:00
Denis Ledoux f616b2d20d [FIX] web_editor: do not focus or set an empty image
When editing the website, adding a gallery, choosing the grid mode
and then adding images, an extra, empty, image was
added to the grid, in the first position, making it looking weird
or at least not aligned.

This was due to the `start` method of the widget, which
is trying to focus the image in the images browser when
you double click on an image (in the big image building block
for instance) and set an image without url in the case
where `o.url` was undefined, and the url of one of the records
was also undefined.

opw-692205
2016-12-19 13:56:38 +01:00
Goffin Simon 4e60d28d00 [FIX]project_timesheet, sale: SO line not updated after timesheet is deleted
-Deleting some timesheets linked to a task created on a SO didn't update the delivred
quantity.

opw:697317
2016-12-19 11:46:23 +01:00
Nicolas Lempereur 13063dd177 [IMP] purchase: some l10n taxes could break test
For example l10n_ch has default included purchase tax on products. This
would impact the valuation of the product and fail the tests.

This commit removes these taxes in the purchase test (they are tested
elsewhere anyway) and also use python to change the company currency
(since the current way didn't seem to work).

opw-691996
2016-12-19 08:31:12 +01:00
Christophe Simonis 1246a470df [FIX] mail: correct MailComposer wizard
Oversight of previous forward-port.
2016-12-16 15:16:56 +01:00
Denis Ledoux cee2e62b6f [FIX] account: add comment for the previous revision
It has been done outside of the previous commit
to give the possibility to point the comment
to the according revision, as this is a really tricky
case.

opw-687201
2016-12-16 14:59:02 +01:00
Denis Ledoux 20935462a0 [FIX] account: register payment with change gain with currency rate > 100
On an invoice, when registering a payment in a foreign currency
for which the payment pays entirely the invoice,
and even more thanks to the change gain(write off),
but for which the foreign currency rate to the company currency is higher than 100,
(higher than the currency decimal precision of 2 digts),
e.g. Invoice in CDF, Payment in USD (1 USD = 948 CDF),
and choosing the option "Mark invoice as fully paid" for the difference handling,

the invoice could not be marked as paid, according to the result
of the currency rate rounding.

This is because the debit or credit of the writeoff was computed
from the payment difference, in the foreign currency,
to the company currency, which lead to two currency rate computation,
one in each way,
company currency to foreign currency,
then foreign currency to company currency,
and some precision was lost in the process.

Instead of computing the debit or credit of the writeoff from
the payment difference, we now compute it from the
payment amount in the company currency minus the
invoice residual amount in the company currency,
to avoid the double currency computation rate,
so the precision is not lost in the process,
and the invoice move is finally fully reconciled

e.g.:
Invoice of 247590.40 FC
Payment of 267 USD (1 USD = 948 FC)
Payment difference: (247590,40 / 948) - 267 = -5.83 (Gain of 5.83 USD)

Before the revision, the credit of the writeoff was computed as:
`((247590,40 FC / 948) - 267 USD) * 948 = 5526,84`
After the revision, the credit of the writeoff is computed:
`247590.40 - (267 * 948) = 5525.6`

Notice in the first formula that the rate computation is performed two
times, once in each way (`/948` then `*948`), while only once
in the second, and this avoid the loss of 1.24 FC in the process.

Without this precise debit/credit of the writeoff, the invoice
could not be marked as fully paid, as the move was not fully
reconciled.

opw-687201
2016-12-16 14:55:51 +01:00
Christophe Simonis 5f63878ff6 [MERGE] forward port branch saas-6 up to 2317801ddb 2016-12-16 14:44:42 +01:00
Christophe Simonis 2317801ddb [MERGE] forward port branch 8.0 up to 638989b84e 2016-12-16 12:45:13 +01:00
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
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
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
Raphael Collet 64249936e8 [FIX] models: allow constraint methods triggered by function fields 2016-12-15 11:08:13 +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
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
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
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 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
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
Moises Lopez - https://www.vauxoo.com/ c349e9a8f8 [FIX] stock: Add missing context to search
Closes #13636
2016-12-13 11:46:47 +01:00
Nils Hamerlinck d1eca511a8 [FIX] stock: keep prefixes of consistency
When renaming a warehouse, the sequence are renamed.
Previous sequences uses slashes while the new one backslashes.
Keep consistency between sequence from origin and new one.

Closes #13774
2016-12-13 11:39:56 +01:00
Juan Carlos del Valle 3ea8958014 [FIX] hr_expenses: add missing tax_ids
* ccd6fc6 already fixed the bug of the account move for expenses with more than 1 taxes but the taxes were not used.
Adding in `_prepare_move_line` to be included in the created move line.

* added Contributor License Agreement

Closes #12849
2016-12-13 11:21:43 +01:00
Goffin Simon ea021ff17a [FIX] account: taxes with analytic account
The account move line created for a tax must have the right account_analytic_id
according CONDITION.

CONDITION(inspired from function compute defined on model "account.invoice.tax")

if the tax is for an "in_invoice" or an "out_invoice" => tax_code = 'tax_code_id'
=> the account_analytic_id of the tax must be set to 'account_analytic_collected_id'

if the tax is for an "out_refund" or an "in_refund" => tax_code = 'ref_tax_code_id'
=> the account_analytic_id of the tax must be set to 'account_analytic_paid_id'

note:forward-port upto saas-6

opw:694821
2016-12-13 10:10:35 +01:00
Goffin Simon 731cf476b2 [FIX] account: taxes with analytic account
The account move line created for a tax(with analytic = True) must have
the same account_analytic_id than the account move line created for the
taxed amount.

opw:694821
2016-12-12 15:02:56 +01:00
Odoo Translation Bot 72a4229130 [I18N] Update translation terms from Transifex 2016-12-11 02:58:13 +01:00
Odoo Translation Bot 5b39b8b1db [I18N] Update translation terms from Transifex 2016-12-11 00:33:19 +01:00
Denis Ledoux 97e5da5e2a [FIX] website_links: adapt countries pie chart height
With a high number of countries,
the pie chart was partially hidden.

We adapt the svh height according to the number
of country to display.

opw-691941
2016-12-09 17:42:25 +01:00
Christophe Simonis 9c8422a405 [MERGE] forward port branch saas-6 up to 75e7f0d 2016-12-09 15:07:00 +01:00
Christophe Simonis 75e7f0da10 [MERGE] forward port branch 8.0 up to 5ece76b 2016-12-09 15:04:42 +01:00
Martin Trigaux cb7517f7e5 [CLA] merge duplicated signature file
Case mismatch
2016-12-09 14:43:06 +01:00
Cristian Moncho 5ece76b717 [FIX] project: remove redundant context declaration
Declaring the keyword argument `context` in an API v7 `orm.browse_record` can
lead to mixed API v7/v8 inheritance bugs (`context` will be treated as a
function parameter instead of being injected in `self.env.context`). As the
context is already propagated in line 953, we can safely remove it from line
971.

Closes #13115
2016-12-09 14:37:21 +01:00
sergiov 4792a669d3 [FIX] auth_signup: display full error message
When the user name entered hasn't an email specified the error message wasn't
displayed in the reset view.
The error message was in e.name, not e.message
2016-12-09 14:32:16 +01:00
sergiov 85dc060a06 [CLA] signature for Sergio2409
cf #13960
2016-12-09 14:28:15 +01:00