Commit Graph

95067 Commits

Author SHA1 Message Date
Josse Colpaert 1de37862d6 [FIX] stock: when matching moves with pack operations through quants, it did not match the packages correctly. Courtesy of Pedro Baeza
Before, it did a search to see if the package existed,
but the only thing it needs to do is see if the package
on the pack operation corresponds to that of the quant.  (no need to check children also)

There is a test added:
A picking with 120 pieces incoming, 120 in pack 1, 80 in pack2
When we deliver those in a picking out, with product pack operations: (by taking them out of the pack)

120 from pack 1 and 80 from pack2,
we should only have 2 quants and links between moves in the end

And before, it generated 3 because it matched the wrong quants and made the wrong links.

opw 693760 closes #13836
2016-11-16 11:26:20 +01:00
Olivier Dony 46ce74cdde
[FIX] hw_posbox_homepage: update links and version
Also added a direct link to the remote connect page to
grant remote SSH access via ngrok.
2016-11-14 17:11:57 +01:00
Olivier Dony 265c9f7b06
[IMP] hw_proxy: add lsusb full output to hw status page 2016-11-14 17:11:57 +01:00
Olivier Dony d1b0b9e656
[FIX] point_of_sale: check required commands before building POSBox image 2016-11-14 17:11:57 +01:00
Olivier Dony f579acf02f
[FIX] hw_scale: update driver for rs232_devices map and support AdamAZExtra scale
This commit fixes the driver to respect the new device
registration mechanism via hw_proxy.rs232_devices.

It also refactors the code to more easily support multiple
scale protocols, and introduces support for the ADAM Equipment
AZExtra scale protocol. (Might be compatible with other ADAM
Equipment scales)

Support for th AZExtra scale is experimental at the moment,
especially given two annoying problems with this model:
 -  they do not support proper probing (stays mute until a
    non-zero weight is measured), so they have to be probed
    last and *assumed* to work
 -  the scale beeps when a read attempt is made and the
    weight is not stable yet, or the weight has been already
    read previously. This constant beeping during operation
    is mitigated by extra delays between readings, but might
    still prove to be a major issue for supporting this scale.
2016-11-14 17:11:57 +01:00
Olivier Dony eeadeb0d6e
[FIX] hw_proxy,hw_blackbox_be: make RS-232 drivers protect their device
RS-232 drivers now need to register any device
they are handling in the hw_proxy.rs232_devices map.
This will prevent other drivers from probing them,
possibly messing up with the device.
Any update to rs232_devices must be done while holding
the hw_proxy.rs232_lock.

The hw_scale driver will be updated to use this mechanism
in the next commit, that will also handle a new RS-232
scale protocol.
2016-11-14 17:11:57 +01:00
Olivier Dony 2fd4dfca7f
[FIX] point_of_sale: update POSBox image creation script
- ngrok download URL has changed
- default kernel for raspbian image has changed and needs to match
- remove pre-existing git checkout to avoid conflicting
- wait a few seconds after setting up loop dev with kpartx to access image
  contents - sometimes required to let the device appear in /dev
2016-11-14 17:11:57 +01:00
Christophe Simonis 51561d3ac8 [FIX] base: restart server when installing module from apps
When a new module is installed, its controllers and static files should
be available. A restart is required to do so.
2016-11-14 13:45:24 +01:00
Odoo Translation Bot fa544c9da0 [I18N] Update translation terms from Transifex 2016-11-13 02:57:18 +01:00
Nicolas Martinelli 4809b57283 [FIX] account: tax line amount
The company currency is USD, the invoice currency is EUR.
- Create an invoice in EUR, set an invoice date
- Compute the taxes (click on "update" button)
- Change the exchange rate between EUR and USD
- Validate the invoice

At validation, the tax lines are not recomputed. Therefore, the tax
amounts, are still converted in the company currency using the old
rates. On the other hands, the other account move lines will have the
appropriate new rate.

Closes #14024
opw-692430
2016-11-07 14:31:00 +01:00
Nicolas Martinelli 0a17be70e0 [FIX] account: tax line amount
The company currency is USD, the invoice currency is EUR.
- Create an invoice in EUR, set an invoice date
- Compute the taxes (click on "update" button)
- Change the exchange rate between EUR and USD
- Validate the invoice

At validation, the tax amounts are not recomputed. Therefore, they are
still converted in the company currency using the old rate.

Closes #14024
opw-692430
2016-11-07 13:35:54 +01:00
Odoo Translation Bot 369e0bcb45 [I18N] Update translation terms from Transifex 2016-11-06 02:56:48 +01:00
Goffin Simon e0ffc23a59 [FIX] report_intrastat: Not allowed to delete record
It's not allowed to delete record from the tree view of intrastat report.

opw:692016
2016-11-03 14:46:47 +01:00
Nicolas Martinelli 2508786127 [FIX] account_asset: first depreciation amount
When an asset is set as Prorata Temporis, with a one month period, the
first depreciation amount is computed on the basis of the remaining days
in the purchase year. This doesn't make sense for a monthly
depreciation.

This commit makes the distinction between a monthly and a yearly
depreciation. In the case of a monthly depreciation, the remaining days
in the purchase month are taken into account.

opw-690034
2016-11-03 09:15:05 +01:00
Olivier Dony f2158e32c8
[FIX] http: permit debug mode on CORS-enabled routes
As of f814dd9908355465dd03735f4589dd1697b3658a, debug
mode causes an extra X-Debug-Mode header to be sent
by the rpc() JS method.

This custom header was not whitelisted in the accepted
CORS headers, therefore any cross-origin call to a route with
`cors=True` would fail in debug mode, with a console error
along those lines:
   "Request header field X-Debug-Mode is not allowed by
    Access-Control-Allow-Headers in preflight response"

This would prevent loading the POS GUI in debug mode,
for example.

This commit is necessary in the 8.0 branch because
the POSBox is currently based on a 8.0 server and may
be accessed by a 9.0 POS or later, thus with the extra header.
2016-11-02 14:03:19 +01:00
Christophe Simonis 86a9b7893e [IMP] tests: use long message in case of error 2016-11-02 11:45:29 +01:00
Goffin Simon d406314638 [FIX] account_voucher: Wrong reconciliation of customer payments
Steps to reproduce :

1. Create a new customer
2. Create an invoice with an amount of 50.- for this new customer and validate it
3. Create a refund with an amount of 70.- for the same customer and validate it
4. Create a Customer Payment for this customer and validate it. The Invoice will be paid with 50.- of the refund. 20.- are still on residual in the refund.
5. Create a new invoice with an amount of 50.- for the same customer.
6. Create a new Customer Payment for the same Customer and validate it.

The Full Reconcile Boolean stays checked inspite of "Open Balance" of Refund amount is less than the Invoice amount.

After the fix:
Full Reconciliation Boolean doesn't get checked and Allocation amount on invoice journal item line should be same
as Open balance of the Refund Journal Item. So Invoice stays open with Balance amount.

opw:691577
2016-10-31 11:55:49 +01:00
Odoo Translation Bot c340284a60 [I18N] Update translation terms from Transifex 2016-10-30 02:56:40 +02:00
Wolfgang Taferner c39ca45c6d [FIX] config: avoid to accept server-wide-modules with None as a module
Fixes #14048
Fixes #14045
Closes #14051
2016-10-28 15:02:52 +02:00
Martin Geubelle 9f09c625f5 [FIX] calendar: rule._bynweekday can be a set
Depending on the version of dateutil, rule._bynweekday can either be
a tuple or a set (see https://github.com/dateutil/dateutil/pull/54), which,
in the case of a set, breaks the access by index (see related issue:
https://github.com/dateutil/dateutil/issues/24).

By casting it into a list, we make sure that we can access [0] in both case.

Credits to jke ; closes opw-690761.
2016-10-28 11:26:23 +02:00
Leonardo Rochael Almeida 5ee4344efd [IMP] Allow configuration of server_wide_modules from file
Allow reading and saving the value of `server_wide_modules` from the
configuration file, instead of just the command line.
2016-10-25 15:23:41 +02:00
Simon Lejeune 097f46e09a [REF] packaging: debian: depend on python-babel
Before this patch, the debian package depends on `python-pybabel`.
According to the documentation, this is a dummy package for transition
from `python-pybabel` to `python-babel`[1].

This dummy package has thus been removed in debian stretch in favor of
`python-babel`, and the odoo package is thus not installable in debian
stretch.

To fix this, we depend directly on `python-babel`, which is available in
all debian releases[2].

Closes #13905

[1] https://packages.debian.org/jessie/python-pybabel
[2] https://packages.debian.org/jessie/python-babel
2016-10-24 16:22:17 +02:00
Nicolas Lempereur 5d17749ff4 [FIX] web: repair length field in view list
Underscore method _.each expects an array like object when a "length"
property is present.

This was an issue with a record having a numeric "length" field set to a
non-negative value. When changing a line the change would not appear on
blur.

This issue was fixed with 0e664c9e9 but introduced back with f0e331e00.

opw-691070
2016-10-24 13:25:58 +02:00
Odoo Translation Bot 8f484fd137 [I18N] Update translation terms from Transifex 2016-10-23 02:57:47 +02:00
David Beal e773c1dce8
[FIX] resource: prevent error when deleting resource.calendar records
Attendance entries should be cascade-deleted along with the parent
record.

Closes #10310
Closes #13044
2016-10-21 19:57:23 +02:00
Jairo Llopis 85b34f4be3 [FIX] openerp: tests: make failing PhantomJS tests actually fail 2016-10-17 13:45:23 +02:00
qdp-odoo 001610ece9 [FIX] anglo_saxon_dropshipping: fix accounting entries creating on anglo_saxon + real_time + dropship.
This revert the fix made on 7bdd4de and replace it with a proper one that do create an account entry from stock_input to stock_output on a dropship move. That way, we avoid the manual change of account on supplier invoice. See the whole discussion on odoo#12687
2016-10-17 09:39:53 +02:00
Odoo Translation Bot d1c81f136c [I18N] Update translation terms from Transifex 2016-10-16 02:57:56 +02:00
Jeremy Kersten 33978d7a7a [FIX] stock: adjustement inventory, check options activated in res config
Before this commit, the inventory by lot/pack/serial/... was only visible
if you switch quickly between res_config and adjustment inventory... once
the vaccumn clean the osv memory, the options was ignored.

Same issue with the _get_string_qty_information function.
2016-10-14 18:07:21 +02:00
Adrien Peiffer (ACSONE) d81258ab8e [FIX] Consider currency rate to compute total amount in expense analysis
Like in Invoices Analysis, the expenses must be expressed in the currency
of the company. In this way, it makes sens to sum them to compute the total.

opw:689760
2016-10-13 11:24:06 +02:00
Richard Möhn cb581bc14f [FIX] api: in todo list, group records to recompute by environment (#11267)
The effect of this change is to trigger the recomputation of fields on larger
recordsets.  This takes advantage of batch computations within compute methods.
2016-10-13 10:13:33 +02:00
Jeremy Kersten d3609f7f19 [FIX] web,crm: list view, don't fallback on group_operator declared in python
Partial revert of odoo/odoo@633780a
2016-10-12 18:03:51 +02:00
vnsoft 16430be566 [FIX] models: in method read_group(), allow orderby='id desc'
When orderby argument is 'id desc', an error occurs: "read_group order by 'id'
ignored, cannot sort on empty..."
2016-10-12 13:19:37 +02:00
Alexandre Fayolle 65c685ad24 [FIX] context mutations (#10368)
when extending these methods with the new api, the context is a frozendict
so we need to copy before mutating.

this patch was made by searching for key addition to context and calls to the
update() method on the 8.0 addons, and checking if a copy was made before in
the method.
2016-10-12 12:30:42 +02:00
Jeremy Kersten f4aae1c58b [FIX] email_template: encode date/datetime format
See more details here: odoo/odoo@6191e3f6d0

This commit closes #13704
2016-10-11 17:04:36 +02:00
Christophe Simonis ecb6055b0f [FIX] tools/config: avoid sharing init/demo config
Theses config options should not share the same dict as `init` dict
may be modified by migration scripts to handle new module dependencies.
2016-10-11 16:46:32 +02:00
Olivier Dony 789566a0d0
[FIX] website_livechat: make it auto-install
Most people install the im_livechat module and expect it
to be enabled automatically on their website.
When it doesn't work they try to use the integration JS
code and add it to their website layout, which does not
work as expected.

Setting it as auto-installed solves the issue.
2016-10-11 16:36:39 +02:00
Jairo Llopis dd312e0da2 [FIX] fields: make [(5,)] with computed domain work (#13480)
* Failing test for one2many [(5,)] action, when domain is callable.

The problem is that `self` inside a callable domain becomes the comodel when at [(5,)].

* [FIX][fields] Make [(5,)] with computed domain work.

To reproduce this failure, declare a field like:

```
child_ids = fields.One2many(
    comodel_name="other.model",
    domain=lambda self: [("id", "in", self._ids_to_find())],
)
```

Now set some value to it.

Now unset them. Impossible because ``self`` becomes ``other.model`` in domain evaluation.
2016-10-11 15:14:05 +02:00
Jeremy Kersten 633780a00c [FIX] web,crm: view_list respect group operator defined in the view.
Remove useless avg defined on crm view.

If you define avg='Average Values' in a view, now we see in the footer of list view the average.
2016-10-11 11:50:24 +02:00
Jeremy Kersten 4ca06e0255 [FIX] fields: add group_operator to be availble in get_description.
Web client use fields_get (which one call get_description) to know if
a group operator exists. But until now, group_operator are never returned.

Without it, the web client cannot display the sub-total except for sum
(the fallback in the web client).

This commit closes #13713

Todo: do the same on Class Monetary in next branch
2016-10-11 11:49:55 +02:00
Nicolas Martinelli a1d6c2d631 [FIX] account: check exchange rate
An issue occurs in the following situation:
- Define a currency exchange rate at day 1 and day 2
- Create an invoice at day 1, and calculate the taxes. Do not set an
  invoice date!
- Validate the invoice at day 2

The exchange rate for taxes is the rate at day 1, while the exchange
rate for other amounts is the rate at day 2.

There is actually no way to know what was the rate applied for the
taxes at invoice validation. There are two solutions:
- recompute the taxes at validation
- force the user to set an invoice date and recompute manually the
  taxes

The first solution might have unexpected effects, therefore the second
solution is applied.

Fixes #13473
opw-688517
2016-10-10 10:08:33 +02:00
Odoo Translation Bot d3c4ab23e4 [I18N] Update translation terms from Transifex 2016-10-09 02:56:21 +02:00
Denis Ledoux 964f42fb86 [FIX] purchase_double_validation: from waiting approval to cancel
It wasn't possible to cancel a purchase order
within the state "Waiting for Approval", despite
the fact the button cancel is displayed.

Clicking on the cancel button just did nothing.

This is now properly working, thanks to the additional
path added by this revision, between the workflow states
`CheckForApproval` and `cancel`.

opw-688685
2016-10-06 16:07:16 +02:00
Olivier Dony 3d55aff1c8
[FIX] convert: properly catch Value/Name Errors 2016-10-03 23:41:44 +02:00
Olivier Dony ba7880a249
[FIX] base: force local cursor in case of mismatch 2016-10-03 19:48:09 +02:00
Olivier Dony 12634e1227
[FIX] base_import_module, tools: raise a clear error for unsupported file types
Also restrict XML data attribute evaluation context
even for real module data files. This will prevent
accidentally depending on context parameters that
would not be available inside base_import_module.
2016-10-03 19:48:09 +02:00
Odoo Translation Bot ca18a1699c [I18N] Update translation terms from Transifex 2016-10-02 02:57:59 +02:00
Manuel Vázquez Acosta 5b692df1b1 [FIX] mail: Ignore case for mail aliases.
When receiving new mail (not replies) to an alias we should not take
case into account.

This also homogenize the treatment of local parts.  For instance, lines
967 and 980 convert the local part to lower case to avoid
case-sensitivity issues.

Also `mail_alias` normalizes alias names by lowering case and finding,
if necessary to make it unique, a suffix to alias name provided.

From RFC 5321, section 2.4:

  > Exploiting the case sensitivity of mailbox local-parts impedes
  > interoperability and is discouraged

Closes #334
Closes #13037
2016-09-30 18:41:39 +02:00
Jairo Llopis 295f62741d
[FIX] tools: cherry-pick of 0529a7f9
extract terms in correct folder

If two addons path have a common part in the folder name (e.g. `/home/alice/dev`
and `/home/alice/devodoo`), the `get_module_from_path` method may match the
wrong folder.
A file `/home/alice/devodoo/bob/models.py` would wrongly match `/home/alice/dev`
path (due to the lack of separator) and the returned module would be `odoo`
(`"odoo/bob/models.py".split('/')[0]`).

In such scenario, the translations of files (code, static folder, report) would
not be included in the exported translation file.

Force the module path to ends with a folder separator to avoid wrong matching.

Closes #13363
2016-09-28 13:43:41 +02:00
Alexandre Fayolle 94f58d647c [FIX] auth_ldap: fix authentication with special chars
encode the filter in utf-8

This prevents a UnicodeDecode error in python-ldap when the
filter contains non ascii characters.

opw-682783
closes #10899
closes #12710
2016-09-28 12:58:32 +02:00