Commit Graph
110261 Commits
Author SHA1 Message Date
Yenthe V.G 93eaa16260 [CLA] add Cyhexy to VanRoey's CLA
Done at #15286
2017-01-31 14:21:54 +01:00
Christophe Simonis 59d1f9b564 [IMP] core: only mark updated fields as modified at model reflection
`model` field of `ir.model` may be used as related stored field.
Marking it as modified force recomputation of these, even no change
occurs (by definition).
2017-01-31 13:56:28 +01:00
Nicolas Martinelli c196b55d61 [FIX] website_slides: use Drive access token
It is not possible to import Google Drive slides which are not publicly
shared.

Google Drive requires an access authorization from the user, not a
simple API key. The access token is generated in module `google_drive`,
but the latter is not in the dependencies of `website_slides`.

opw-703750
2017-01-31 12:00:54 +01:00
Aaron Bohy f4bb9bc976 [FIX] im_livechat,web: partial revert of 7f8fe10766
Proxy.load is required by the livechat when it is embedded in an
external page, so that it is able to get the static xml files
(with the correct base_url).

opw-706497
2017-01-31 10:52:08 +01:00
Aaron Bohy adb0312faf [FIX] im_livechat: prefix avatar's src with server url
This is required if the livechat is embedded in an external page,
so that it can correctly retrieve the images.
2017-01-31 10:15:32 +01:00
Nicolas Martinelli 3c1f9ff156 [FIX] stock: reserve consumables
The original issue is the following:
- Configure the warehouse in Pick + Ship
- Activate the packs
- Create a SO with a product which is a consumable
- In the picking from stock to out, add the product in a package, and
  validate.
- In the picking from out to customer, the previously created package is
  not accessible/propagated as it would be with a stockable product.

The core of the issue is that there are no quants reserved for a move
linked to a consumable product. Since the package information is stored
on the quant, the package cannot be propagated correctly.

The fix is therefore to add the quants reservation feature on consumable
products, but only if the move is propagated from another one (i.e. the
move has ancestors).

That solved our issue, but also makes the workflow more logical. Without
the fix, all pickings are "Available" when created, even though one is
linked to another.

opw-702632
2017-01-30 18:19:56 +01:00
Miku Laitinen 321cc715d8 [FIX] product: correct name_create method
name_create returns a tuple (id, name), not a recordset

Closes #15276
2017-01-30 16:56:17 +01:00
Nicolas Martinelli 3f7c25da24 [FIX] sale_mrp: find BOM
1. Activate the variant option on sale settings
2. Create a product and set invoicing on delivered qty and make it a
   stockable product
3. Create 2 attributes, like color red and color blue
4. Odoo creates 2 variants
5. Make a BoM on the product with color red (So on Bom select the
   product template and the product variant)
6. Set the Bom as "Ship this product as a set of components (kit)"
7. Now create a sale order with sale order line for the product variant
   BLUE
8. Delivery order is created, deliver the whole delivery order
9. Go back to sale order and see that delivered qty is not updated and
   thus we can not invoice the lines

opw-706423
2017-01-30 16:51:29 +01:00
Martin Trigaux 59a700c8e6 [FIX] project: do not recreate discovery data
The 'Start here to discover Odoo' is a data to help users to use Odoo.
Once they have understood, user often delete it but it comes back after an
update. The only way was to archive a record.

Using forcecreate is another way to avoid recreating it after an update.

Fixes #15262
2017-01-30 16:27:07 +01:00
Denis Ledoux 911208ad66 [FIX] l10n_gt: correct code digits
The code prefixes being
1.0.01.0
1.0.02.0

The code digits of the accounts codes
of the Guatemala localisation must be set to at least 9

opw-705457
2017-01-30 15:27:15 +01:00
Esteban Echeverry b14ef6346d [FIX] openerp models.py: Add recompute conditional in unlink
Description of the issue/feature this PR addresses:

This commit adds the recompute conditional clause in the ORM unlink method.
This behaviour is already present in branch 10.0 as it can be seen in line 3431.
With this, the possibility of disabling the automatic recalculation of computed fields is given back to the developer of custom modules in performance critical scenarios. By using the Environment class "norecompute" context manager, the developer can now unlink records in a very fast manner and afterwards, execute the computed fields manually if needed (via an explicit method call or a direct sql update).

Current behavior before PR:

Having this option in the ORM will allow to speed up the system if needed when massive collateral changes must be made. One of this scenarios has to do with the modification of one2many fields and the write_uid and write_date computed fields. In the account module for example, when unreconciling account move lines,  the deletion of the partial reconcile records involved in the reconciliation triggers a one by one update of the related account move lines and account moves. If the involved documents are big, such an account move (Journal Entry) with thousands of lines, if one of its lines is reconciled and afterwards unreconciled, the process can take several minutes due to expensive one by one recomputations such as the ones involved in the modification of the write_uid and the write_date in the models.py recompute() method. This modifications can however be enforced later with a couple of SQL update statements, instead of thousands of them executed by a for loop.

Desired behavior after PR is merged:

Developers of custom modules will now have the possibility of disabling the automatic calculation of computed fields, as it can be done in the create method (models.py "_create()" line 4370). This is vital for performance reasons, specially when handling big documents such as thousands of lines account moves or sales orders.

This is basically a backport of revision f259e74f8a
2017-01-30 13:51:32 +01:00
Esteban Echeverry 9c9003d257 [CLA] signature for nubark 2017-01-30 13:51:32 +01:00
qdp-odoo 602d04117a [FIX] hr_expense: don't try to create twice the taxes journal item from hr.expense when one is given. Fixes #15181 Also fix the domain on applicable taxes to filter the purchase taxes only 2017-01-30 12:08:19 +01:00
Hpar c5bda97494 [FIX] website_sale: fix promise website.ready
This closes #15266 and closes #15267
2017-01-30 11:50:07 +01:00
Martin Trigaux 73b320a3f7 [FIX] purchase: reflect changes of source terms
Introduced at 13010ed9
2017-01-30 11:28:54 +01:00
hendrikw25 c8bf71cf9e [CLA] signature for hendrikw25
Done at #15261
2017-01-30 08:58:13 +01:00
Odoo Translation Bot 6a7c05112b [I18N] Update translation terms from Transifex 2017-01-29 04:30:19 +01:00
Odoo Translation Bot 66e2ddd670 [I18N] Update translation terms from Transifex 2017-01-29 02:55:31 +01:00
Odoo Translation Bot 1eb9dc79f5 [I18N] Update translation terms from Transifex 2017-01-29 00:30:57 +01:00
Olivier Dony b0c2adbccb [FIX] config: correctly bootstrap data_dir
Complements the patch in 4715d18e12
in order to properly bootstrap a writeable data_dir when it is
(partially) nonexistant.
Depending on the startup parameters the data_dir might otherwise
have ended up read-only, preventing the creation of its necessary
components (session store, file store). Only the `addons` directory
of the data_dir needs to be read-only by default.
2017-01-28 01:53:54 +01:00
Diep Huu Hoang dff352acdb [FIX] point_of_sale: prevent losing orders when validating during sync
When validating a new order in between the create_from_ui RPC call and
the corresponding callback this new order was lost. There were two
reasons for this.

First of all, the Mutex supposed to prevent multiple create_from_ui RPC
calls from happening at the same time did not return a Deferred. This is
problematic because this function gets passed to jQuery.when() which
will consider functions that do not return a Deferred to be resolved
upon return.

Secondly, the resolved callback of the create_from_ui RPC call naively
deleted all paid orders, assuming they were all successfully sent to the
backend. This is not the case when an order is added to the orders array
in between the RPC call and the callback.

Closes #15190
2017-01-27 16:12:36 -08:00
Olivier Dony 3ace806d39 [FIX] config: correctly bootstrap data_dir
Complements the patch in 8235f03f56
in order to properly bootstrap a writeable data_dir when it is
(partially) nonexistant.
Depending on the startup parameters the data_dir might otherwise
have ended up read-only, preventing the creation of its necessary
components (session store, file store). Only the `addons` directory
of the data_dir needs to be read-only by default.
2017-01-28 00:57:40 +01:00
Olivier Dony 492d8ce4d0 [FIX] config: correctly bootstrap data_dir
Complements the patch in 15583a4813
in order to properly bootstrap a writeable data_dir when it is
(partially) nonexistant.
Depending on the startup parameters the data_dir might otherwise
have ended up read-only, preventing the creation of its necessary
components (session store, file store). Only the `addons` directory
of the data_dir needs to be read-only by default.
2017-01-28 00:53:20 +01:00
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