Commit Graph
107131 Commits
Author SHA1 Message Date
Josse Colpaert 347f140fe6 [FIX] mrp: rounding issues and efficiency replacement
Before, when you would put a quantity in a BoM line that was not rounded
to its UoM (e.g. use 0.3 piece with rounding 1.0) it would not round this
quantity in the MO also (when exploding the BoM), and the user could also
enter a not rounded quantity himself for the quantity produced or
consumed.

The moves were split with the exact quantities, but the moves were validated
taking into account rounded quantities. This resulted in either moving 2
pieces instead of 1 (entering 0.7 or 1 piece) or raising an error telling
you can not process moves with 0 quantity (0.3 piece).

As product_efficiency and product_rounding was removed from the BoM/BoM
line in v10, if the rounding is correctly handled, the feature could work
like in v9, by e.g. putting 1.03 in the bom line (97% efficiency) and
rounding up when exploding the BoM (e.g. producing 10 pieces would put
it to 11).

When "producing", we round the produced qty to the product uom (it does
not make sense to produce 1.32 if your uom rounding is 1.0). The user
might now change the produced quantity, that's why we round-up when
validating the move: indeed, if the user slightly increase the produced
value (below the uom unit), it actually means he produced more.

This way, instead of not rounding anything and doing rounding behind the
scenes, leading to errors, we round everything and the user sees the
result directly.
2017-01-27 19:22:02 +01:00
Naglis Jonaitis 3f232a6022 [FIX] base_vat: check 1 char VAT code
If a VAT with only 1 character is set, it will crash with an IndexError

Closes #14995
2017-01-27 18:25:21 +01:00
Christophe Simonis ba8a1c7ec2 [MERGE] forward port branch saas-11 up to e86983112e 2017-01-27 18:20:28 +01:00
Christophe Simonis e86983112e [MERGE] forward port branch 9.0 up to e366ee3542 2017-01-27 18:15:30 +01:00
David Halgand e366ee3542 [CLA] corporate and individual signature for halgandd
Done at #14155
2017-01-27 17:17:12 +01:00
Simone Orsi 81dab1e6dd [CLA] add simahawk to C2C CLA
Done at #15250
2017-01-27 16:28:48 +01:00
Christophe Simonis 047efcbd58 [MERGE] forward port branch 9.0 up to 838beb12de 2017-01-27 16:21:51 +01:00
qdp-odoo 838beb12de [FIX] account: full reconcile sequence has to be shared among companies.
Otherwise, only the main company can make a full reconciliation
2017-01-27 16:05:00 +01:00
qdp-odoo c528f7aff6 [FIX] account: grouping by line should take into consideration the applied taxes 2017-01-27 16:05:00 +01:00
Christophe Simonis 7c9ad40e0a [MERGE] forward port branch saas-6 up to f8b82bdd63 2017-01-27 15:15:46 +01:00
Christophe Simonis f8b82bdd63 [MERGE] forward port branch 8.0 up to f431cee99a 2017-01-27 15:11:53 +01:00
Nicolas Martinelli cd605442ae [FIX] payment_authorize: reference length
The `reference` field is used as `invoiceNumber` in the Authorize.net
API. However, this field is limited to 20 characters. Larger references
will produce an error when the API is called.

Source: https://api.authorize.net/xml/v1/schema/AnetApiSchema.xsd

opw-704615
2017-01-27 14:48:36 +01:00
Olivier Dony 6edb749534 [FIX] web: provide correct autofill browser hints
Modern browser implement the autofill specs as described at
 https://html.spec.whatwg.org/multipage/forms.html#autofill

This means that there is now a way to tell the browser when a password
field is supposed to be filled with the user's own password (e.g. on a
login field), and when it's supposed to be used to input a new secret
value (e.g. when changing someone else's password).

This can be distinguished by setting the autocomplete attribute
to `current-password` or `new-password`.

In addition, many browsers have decided to entirely disregard the
autocomplete='off' attribute value, because it is felt that using
a secure password manager (as provided by those browsers) is a net
gain for security, allowing users to pick stron passwords.
See also https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

Based on this, the framework should generally consider that
password fields in the backend are meant to be used for *setting*
new values (autocomplete="new-password", i.e. no autocompletion!),
whereas the password field on the login page can indeed be autofilled
with the user's current password (autocomplete="current-password").

In addition to making the above changes, this patch also
lets developer specify their own `autocomplete` attribute on
text input fields.
2017-01-27 14:44:36 +01:00
Olivier Dony 484ce05aa0 [FIX] website_sale_options: reallow "quick cart add" on product grid
Rev 0ff26cf7cd disabled this option
because it was causing JS errors, which is not the case anymore.

We now get the expected result:
 - if product has no variants, open quick add modal dialog
 - if the product has variants, open the product page to let
   the user choose a variant

Also fix the bootstrap modal bug that happens when the quick add
modal is opened on a product that is not published (modal appeared
partially transparent and unusable)
2017-01-27 14:44:36 +01:00
Olivier Dony f431cee99a [FIX] hw_escpos: increase timeout for slow matrix printers
Some printers (e.g. matrix/impact printers) may have a hard time
keeping up with the text output, and may trigger timeout errors
because of this, even though they would otherwise produce a correct
result.

Increasing the default timeout to 5s (from the default 1s) should
take care of most slow printers out there.
2017-01-27 14:42:36 +01:00
Olivier Dony af381bf7ec [I18N] base: update PO template for 15583a4 2017-01-27 14:40:34 +01:00
Olivier Dony 92bdc988af [I18N] base: update PO template for 4715d18e 2017-01-27 14:29:13 +01:00
Olivier Dony 8d289c58b5 [I18N] base: update PO template for 8235f03
Courtesy of @mart-e!
2017-01-27 14:17:47 +01:00
Olivier Dony 8235f03f56 [FIX] module: allow disabling 1-click install
As discussed on issue #15225, it should be possible for system administrators
to disable the 1-click installation system.
The plan is to disable the feature by default, but make it relatively easy
to turn on when it is explicitly desired.

1. At the moment we cannot guarantee that all Apps published on the Odoo Apps
   Store are safe. And it is a security risk to let end-users deploy Python
   code on their Odoo servers without requiring any review/deployment by a
   competent system administrator.
   We will work on improving the validation process of the Store, but this
   will require time, and won't probably be a 100% safe process in any case.
2. The one-click install feature is however really useful to help
   non-technical users install Apps, as long as the feature has been
   explicitly allowed by the system administrator. This is a common feature
   in other software suites as well. So we'd like to keep it as an opt-in
   feature.
3. Administrators of multi-tenant servers, cloud hosting services, etc.
   understandably expect to be able to turn off the feature for
   security/control reasons.
4. By turning off the feature by default, but still exposing it in the UI,
   we keep it *discoverable* for users. The error message should be
   helpful to direct users to their sysadmins.
5. By using the permissions of the download folder as a flag for turning
   off the feature, we avoid introducing an extra server parameter.
   The folder is still created (read-only) by default, for the sole purpose
   of making it easier to locate.

Fixes #15225
2017-01-27 13:56:05 +01:00
Olivier Dony 15583a4813 [FIX] module: allow disabling 1-click install
As discussed on issue #15225, it should be possible for system administrators
to disable the 1-click installation system.
The plan is to disable the feature by default, but make it relatively easy
to turn on when it is explicitly desired.

1. At the moment we cannot guarantee that all Apps published on the Odoo Apps
   Store are safe. And it is a security risk to let end-users deploy Python
   code on their Odoo servers without requiring any review/deployment by a
   competent system administrator.
   We will work on improving the validation process of the Store, but this
   will require time, and won't probably be a 100% safe process in any case.
2. The one-click install feature is however really useful to help
   non-technical users install Apps, as long as the feature has been
   explicitly allowed by the system administrator. This is a common feature
   in other software suites as well. So we'd like to keep it as an opt-in
   feature.
3. Administrators of multi-tenant servers, cloud hosting services, etc.
   understandably expect to be able to turn off the feature for
   security/control reasons.
4. By turning off the feature by default, but still exposing it in the UI,
   we keep it *discoverable* for users. The error message should be
   helpful to direct users to their sysadmins.
5. By using the permissions of the download folder as a flag for turning
   off the feature, we avoid introducing an extra server parameter.
   The folder is still created (read-only) by default, for the sole purpose
   of making it easier to locate.

Fixes #15225
2017-01-27 13:00:42 +01:00
Olivier Dony 4715d18e12 [FIX] module: allow disabling 1-click install
As discussed on issue #15225, it should be possible for system administrators
to disable the 1-click installation system.
The plan is to disable the feature by default, but make it relatively easy
to turn on when it is explicitly desired.

1. At the moment we cannot guarantee that all Apps published on the Odoo Apps
   Store are safe. And it is a security risk to let end-users deploy Python
   code on their Odoo servers without requiring any review/deployment by a
   competent system administrator.
   We will work on improving the validation process of the Store, but this
   will require time, and won't probably be a 100% safe process in any case.
2. The one-click install feature is however really useful to help
   non-technical users install Apps, as long as the feature has been
   explicitly allowed by the system administrator. This is a common feature
   in other software suites as well. So we'd like to keep it as an opt-in
   feature.
3. Administrators of multi-tenant servers, cloud hosting services, etc.
   understandably expect to be able to turn off the feature for
   security/control reasons.
4. By turning off the feature by default, but still exposing it in the UI,
   we keep it *discoverable* for users. The error message should be
   helpful to direct users to their sysadmins.
5. By using the permissions of the download folder as a flag for turning
   off the feature, we avoid introducing an extra server parameter.
   The folder is still created (read-only) by default, for the sole purpose
   of making it easier to locate.

Fixes #15225
2017-01-27 12:56:14 +01:00
Jeremy Kersten 59f43a777d [FIX] website_sale: allow to edit billing address when you are a contact.
Before this commit, a user that is logged in with a partner of type contact,
was inheriting the address from the parent and didn't have the right to edit
the billing address... stopping the checkout in the middle.

With this commit, we change type of contact if needed to allow the user to
finish the checkout.

ps: Use of write instead of update to make the update in one step, else the
values updated before the field 'type' are ignored because the field is resync
from parent automatically.

This commit is related to: opw-705974 and opw-704653
2017-01-27 12:56:13 +01:00
Zakaria Makrelouf b3cd386fca [FIX] l10n_be_invoice_bba: add translated label
Closes #15245
2017-01-27 12:41:29 +01:00
Andrea Stirpe 47b2c45821 [FIX] l10n_nl: change module category
All l10n modules uses the "Localization" category.
Harmonize the use of module category.
Closes #15240
2017-01-27 11:24:20 +01:00
Nicolas Lempereur 0c76ff4846 [FIX] account: modal account.invoice.line form traceback
In some instances we could get a traceback in the form view of an
account.invoice.line object. This is because the `parent` field can be
undefined depending of the way the form view was opened.

For example there can be a account.invoice.line list in a
sale.order.line form and this lead to a product_id with a traceback
capable context.
2017-01-27 09:57:39 +01:00
Simon Lejeune c14ffc8339 [ADD][TEST] stock: picking's state according to its move lines
Tests 72 and 73 are proving the fix of rev XXX
2017-01-26 17:08:58 +01:00
Josse Colpaert 78528596ef [FIX] stock: picking's state according to its move lines
There are some problems in the way the picking compute its state
according to its move lives if the delivery strategy is partial.

When a picking was in a partially available state and then you would
force availability, the state would stay in partial availability.

Therefore, we changed the way the state is calculated more like it was done before.
This issue stems from the new API migration.
2017-01-26 17:06:47 +01:00
Goffin Simon a8b1d30fca [FIX] hr: Bank account from employee not loaded on payment on expense
The bank account didn't appear when selecting SEPA credit transfer in ACCOUNTING>PURCHASE>PAYMENTS
to refund an employee. The bank account is taken from partner set  with the field home_address_id.
So the account holder have to be set on the bank_account_id of the employee with the home_address_id.

opw:702881
2017-01-26 17:04:45 +01:00
Nicolas Lempereur cfcc37bca5 [FIX] expression: leaf in o2m with m2o inherits'd field
The reverse field of a one2many could be originating from an
inherits'd field, this was solved in some instance with f5e5bbda.

The issue could still happen in some instances when doing a comparison
of:

- the one2many field to a False value,
- the one2many with a negative operator and an empty set to negate,

With this change, the ORM is used in such a situation.

closes #15234
opw-704962
2017-01-26 16:47:52 +01:00
Andy Teijelo 390d650d60 [CLA] signature for ateijelo
Done at #15232
2017-01-26 16:21:22 +01:00
Martin Trigaux cedb87165d [IFX] hr_holidays: translate holiday label
The display label (e.g. "Legal leaves (5 remaining out of 20)") was not
translatable.
Add the 'remaining out of' as translatable.

Replaces and closes #15212
2017-01-26 15:14:42 +01:00
Nicolas Martinelli a63ea592d4 [FIX] payment: payment reference length
The payment reference of a S2S transaction has the given format:
'PAYMENT-9-170110_200204'. However, the reference is too long for some
providers such as Authorize (limited to 20 characters).

We make the reference less verbose as a first step to solve the issue.
However, case-by-case solutions will need to be found since the
reference depends on the id, which will ultimately grow.

opw-704615
2017-01-26 15:00:36 +01:00
Rajeesh K Nambiar 150bcfff82 [FIX] l10n_in_hr_payroll: correct evaluation of rule
The variable DA does not exists in evaluation context.
categories is a browseable object

Closes #15222
2017-01-26 14:30:19 +01:00
Rajeesh K Nambiar 5fd3cea3cb [FIX] l10n_in_hr_payroll: correct typo salary rules
s/Two Child/Two Children/g
2017-01-26 14:30:19 +01:00
Rajeesh K Nambiar fe868dda30 [CLA] signature for rajeeshknambiar
Done at 15222
2017-01-26 14:30:19 +01:00
Denis Ledoux 5ea8d4ea33 [FIX] base: fix local variable 'res' referenced before assignment
In the loop `for action in self`, if all iterations
passed in the first `if` block only, res
was never assigned, but returned.

This is an oversight during the conversion of the module to the new API
in revision eb04aa1e39

One could ask himself why `res = False` is before the loop
and not in this `if` block, but we believe this is
in the case multiple actions are passed to this method,
you wouldn't like the result of the first actions in the loop
to be overwritten by `False` when the condition of the last
action of the loop is not met.

For instance the first action returns as result an action but for the
second, the condition to run it is not met, in such a case
you would like what the first action returned as action.

opw-706150
2017-01-26 10:59:58 +01:00
Nicolas Martinelli 36d3f38d31 [FIX] hr_expense: journal entries
The stat button "Accounting Entries" on the "Expense Report" does not
filter the account moves related to the expense.

opw-706096
2017-01-26 10:55:08 +01:00
Adrien Peiffer (ACSONE) 4232a08164 [FIX] mass_mailing: ondelete cascade on transient
The test wizard will be dropped eventually but it is not possible to delete
the mass-mailing before the transient is cleaned too due to the required field.
To make it faster, add a ondelete cascade on the field.

Closes #15217
2017-01-26 10:29:04 +01:00
Aaron Bohy ff613d8763 [FIX] hr: correctly format mention partner suggestions
Rev. 36f6f26 changed the format of the returned list of employees.

Javascript is expecting an array containing the array of employees,
each employee being a dict with keys id, name, email. But from rev.
36f6f26, it returned an array of employees, themselves represented
by an array containing their id, name and email.

As the format changed, the Javascript mention mechanism never used
the prefetched employees, and always fallbacked on an RPC to fetch
suggestions amongs all partners.
2017-01-26 09:44:57 +01:00
Nicolas Lempereur 7427825790 [FIX] mail: don't linkify removed mention
If after inserting a mention (eg: `@Guy`) and we eg. backspace and
change it (eg: to `@GuyFawkes`) the `@Guy` mention will still be
linkified but the partner is not subscribed.

This happened because the linkifying was not requiring a space to follow
the mention, but when getting the used mentions (and commands, ...) in
the message they were required (unless the mention was exactly at the
end of the message).

With this commit, a space is always required after a mention for it to
be working.

opw-705267
2017-01-25 15:47:30 +01:00
Christophe Simonis 6a7db30508 [MERGE] forward port branch saas-11 up to f23394b83a 2017-01-25 15:01:29 +01:00
Pierre Masereel f23394b83a [FIX] stock: stock_inventory_line onchange product
If you make an inventory adjustement in mode 'select products manually'
and you add a new line with a product having a different unit of mesure
than the default one, but in the same unit of mesure category than the
default one, the unit of mesure on the line doesn't change because both
are in the same category.

This bug is caused by an 'onchange' which is triggered when the
'product_id' or 'product_uom_id' has been changed. And so we cannot
force to change the value to the product one, because we should still be
able to make an inventory in 'kg', if the unit of mesure is in 'g'.

So to fix this bug, we have set the 'onchange' only on the product_id to
set the unit of mesure set on the product when we create a new line or
change the product of a line. We removed the onchange ont the unit of
mesure, because it was only checking that the unit of mesure is in the
category of the product unit of mesure category, but it's always true
has there is a domain set on the field unit on mesure by the onchange
on product_id
2017-01-25 13:45:29 +01:00
Christophe Simonis 74c6e895f6 [MERGE] forward port branch 9.0 up to 3e31dc0ba4 2017-01-25 13:14:38 +01:00
Christophe Simonis 3e31dc0ba4 [MERGE] forward port branch saas-6 up to 09f7916f48 2017-01-25 13:04:50 +01:00
Christophe Simonis 09f7916f48 [MERGE] forward port branch 8.0 up to 9d535ee2c7 2017-01-25 12:56:42 +01:00
Josse Colpaert 1bf2173240 [IMP] mrp: ensure_one in cal_price
We want to ensure not to mix the price calculation
of multiple MOs when posting inventory.
2017-01-25 12:11:55 +01:00
Nicolas Martinelli 6cfd85bae2 [FIX] sale_timesheet: lost breadcrumb
On a SO, click on the stat button "Project". It opens the form view of
the corresponding project, but the breadcrumb is lost.

opw-705193
2017-01-25 08:28:02 +01:00
Aristides Caldeira b7294754cc [CLA] signature for aricaldeira
Done at #15210
2017-01-25 08:25:29 +01:00
Dileepa Ameresekere 296f9cbe3a [FIX] doc: correct typo fix
Closes #15037
2017-01-24 18:20:12 +01:00
Cédric Pigeon (ACSONE) b307514eca [IMP] account: allow override
Extract the move creation into a different method to allow override.
In case the date or journal needs to be modified.

Closes #15179
2017-01-24 18:15:46 +01:00