Commit Graph
109708 Commits
Author SHA1 Message Date
Christophe Monniez 2da4eb5898 [FIX] packaging: add BeautifulSoup to py2exe setup
When trying to import an OFX bank statetement under MS Windows, a
Traceback states that BeautifulSoup is missing.

During the build process, py2exe didn't autodiscover that BeautifulSoup
is needed by the ofxparse package.
With this commit, BeautifulSoup is explicitely added to py2exe packages.
The Nightly VM was updated accordingly.

opw-1848202
2018-06-08 14:31:06 +02:00
len-odoo 867bbff589 [FIX] mrp: help message to disambiguate meaning of duration value
The duration field on a workorder computes the total time spent on it.
The mrp_time_counter widget that is used to display it only computes the total
time spent on it by the currently logged user (ignoring the field stored value).
To help the user understand the inconsistency between the two values, we add a
help tooltip.
Since this really depends on the widget used to display the value, the tooltip
is directly put in the view.

opw 1854802
2018-06-08 14:01:34 +02:00
Lucas Perais (lpe) f01e298d53 [FIX] account: in account config, constrain exchange diff journal's domain
Before this commit one could choose any journal for the registering exchange rate differences.
That could lead to accounting errors down the line

After this commit, we apply a domain on the field, and there is no problem afterwards

OPW 1851616
closes #25101
2018-06-08 09:45:21 +02:00
Nicolas Martinelli b0a29532ff [FIX] website_livechat: use only consumed ratings
The percentage computation of statistics only uses the consumed ratings
>= 1 (through `rating_get_repartition`), while the initial search of the
first 100 ratings doesn't have this restriction. It leads to an
inconsistency between the ratings displayed and the percentages
computed.

Moreover, if there are less than 100 ratings, the percentage might not
be a natural number => use of float and round.

opw-1854863
2018-06-07 13:09:24 +02:00
Martin Trigaux ab8d7c9360 [FIX] doc: correct path to enterprise
opw-1856379
2018-06-07 12:15:30 +02:00
Martin Trigaux 0780f10c54 [FIX] portal: use expected ID format
Introduced during forward port at 6a7db305
_company_default_get returns a res.company record, not an ID

opw-1855856
2018-06-06 11:19:37 +02:00
Damien Bouvy e2efec8e54 [FIX] pos: reconciliation and performance issues (#24610)
Before this commit, the complete list of orders of the pos session
was processed through the reconciliation mechanism to check if an
automatic reconciliation was possible (introduced in a controversial
'bug fix' at fe70f07, itself a backport of a master commit at
a2319b4). The goal of this auto-reconciliation was to avoid potentially
silent and numerous customer statements that could be reconciled
automatically.

This is mostly useless in a lot of cases, since a lot of users do not
set any partner_id value on the pos order - there is nothing useful to
reconcile. Going through the whole list of orders is time-wasting
(especially since the reconciliation method does not scale well).

Combine this with users who do not close their POS session often enough
and closing a session can suddenly take up to several hours to process
instead of several seconds with practically no obvious gain.

After this commit, only orders which have a partner set on them will be
auto-reconciled.

opw-1818838 and opw-1817172
2018-06-06 10:09:04 +02:00
Adrian Torres c25b68f324 [FIX] orm: re-create constraints of extended fields
Before this commit:

* Module A defines a field X of model M
* Module B inherits from model M without touching field X
* Module C inherits from model M and extends field X by giving an INDEX
/ NOT NULL constraint.
* Module B and C depend from Module A, but not each other

If all three modules are installed and Module B is updated, the INDEX /
NOT NULL constraint could be dropped.

This happens because Module B can be loaded before Module C is loaded,
if that's the case, then after the upgrade of Module B, during the
schema checking, we verify that the field object we have and the field
on the DB are the same, since Module B doesn't introduce the index then
this check is false and we drop the index. When we get to loading Module
C, we do not do any schema checking because the module is not marked as
`to upgrade`, therefore the index is lost forever.

To solve this, we re-init the models that belong to the set of the intersection
between upgraded and modified models and loaded and modified models.

Fixes #24958
2018-06-05 11:07:33 +02:00
Christophe Simonis bc8f5c5e42 [MERGE] forward port branch 9.0 up to 0046bf7292 2018-06-05 10:54:09 +02:00
Lucas Perais (lpe) 0046bf7292 [FIX] web_editor: disable button when html field loading
Backporting bed33e1 and 472c5a4f9f from v10.0

OPW 1853150
closes #25043
2018-06-05 09:52:09 +02:00
Lucas Perais (lpe) 2039753ef4 [FIX] account: reconcile in liquidity accounts.
Make one Payment
Reverse the entry of this payment.

Before this commit, only the lines in the receivable were reconciled.
The lines in the liquidity were'nt, leaving the two entries appearing
in some reports

After this commit, the four lines are reconciled two by two, even in the liquidity
account

OPW 1816641
closes #25026
2018-06-05 09:47:28 +02:00
Nicolas Martinelli b837bbdd8b [FIX] mass_mailing: unsubscribe if trailing '/'
If the `web.base.url` contains a trailing `/`, the replacement of the
`/unsubscribe_from_list` link won't work since the string to replace
will be `my_url//unsubscribe_from_list` instead of
`my_url/unsubscribe_from_list`.

Fixes #24731
opw-1848572
2018-06-05 08:35:50 +02:00
Christophe Simonis 97d611fcd4 [MERGE] forward port branch 9.0 up to 66a60c70f3 2018-06-04 18:06:44 +02:00
Nicolas Lempereur 57a64bbc86 [FIX] website_event: unblock button when no reserve
In 11.0, this change e9454e79 solved the use case of:

- opening the registration of a ticket
- discard

=> the page must be reloaded to register a ticket

A new report is that since 9.0, if we try to register 0 ticket we would
also have to reload the page.

This commit backports e9454e79 and solves the 0 ticket registration.

10.0 version of 9.0's #24966
opw-1851622
closes #24991
2018-06-04 10:20:27 +02:00
Odoo Translation Bot d88dd23ae2 [I18N] Update translation terms from Transifex 2018-06-03 00:27:35 +02:00
Nicolas Lempereur 66a60c70f3 [FIX] website_event: unblock button when no reserve
In 11.0, this change e9454e79 solved the use case of:

- opening the registration of a ticket
- discard

=> the page must be reloaded to register a ticket

A new report is that since 9.0, if we try to register 0 ticket we would
also have to reload the page.

This commit backports e9454e79 and solves the 0 ticket registration.

opw-1851622
closes #24966
2018-06-01 10:53:30 +02:00
Odoo Translation Bot ea3b895589 [I18N] Update translation terms from Transifex 2018-06-01 02:39:45 +02:00
qdp-odoo 579b233d38 [FIX] l10n_fr_certification: can't change module dependancies on stable version
Commit https://github.com/odoo/odoo/commit/2eb344f23b3a9daa8e7c7ddaead145a8b05b39bf changed the dependancies of l10n_fr_certification which is not acceptable on stable. Instead, the method to check is now moved in account module (to avoid duplicated) and it is called by l10n_fr_certification and account_lock module.
2018-05-31 14:37:24 +02:00
Laurent Smet fb59b56014 [FIX] account: fix test on closed period since account_lock module
Module account_lock has been introduced by:
https://github.com/odoo/odoo/commit/2eb344f23b3a9daa8e7c7ddaead145a8b05b39bf

A new constrains appears on the lock dates: their must not be set
after the last day of the previous month.
Then, it breaks the test on closed period that set the lock date 'yesterday'.
2018-05-31 13:13:14 +02:00
Laurent Smet 2eb344f23b [ADD] account_lock: new module making the lock date irreversible
Was task: https://www.odoo.com/web#id=38178&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
Was PR #22094
2018-05-31 10:06:19 +02:00
Lucas Perais (lpe) 16a8459a2e [FIX] sale_mrp: allow production without finished products
Have a mrp.production that you cancel, and delete the finished products lines

Before this commit, the computation of the sale_name crashed because we did
an index selection on an empty recordset

After this commit, there is no crash

opw 1851217
closes #24923
2018-05-30 14:14:09 +02:00
Lucas Perais (lpe) 1ad3d1847e [FIX] hw_escpos: complying to barcode method A
Have a XMLReceipt with the line:
<barcode encoding="CODE39">123456789</barcode>

Print the receipt.

Before this commit, jibbrish characters were printed and also kinda 'broke'
the spacing between commands
e.g. If you add an EAN13 barcode below the code39 it would have failed to print correctly too

After this commit, everything prints correctly

OPW 1849284
ref: https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=128
closes #24965
2018-05-30 14:05:26 +02:00
Christophe Simonis 2288a89564 [MERGE] forward port branch 9.0 up to ea0fcd52d9 2018-05-29 17:52:20 +02:00
Goffin Simon f349d2f3ab [FIX] mrp: A traceback was raised when creating a warehouse
When creating a warehouse, a traceback was raised if the xml_id: mrp.route_warehouse0_manufacture
was not found.

opw:1852761
2018-05-29 14:14:24 +02:00
Goffin Simon b5ea61bf72 [FIX] product: Print "Products Labels"
The number of characters must be taken into account to print the
barcode. With 13 characters -> EAN13, with 8 characters -> EAN8 else
-> Code128

Backport of 12b11c1e6f

opw:1849965
2018-05-29 14:06:06 +02:00
Josse Colpaert eabcb9ff1a [FIX] stock_account: setting standard price with multiple real-price outs with negative quants fixes #24925
Somehow the function treated multiple records with
 the new api translation from 9 to 10.

Steps to reproduce:
This applies to delivery orders and manufacturing orders. As an example:

Create an MO with 2 products on the BOM
Both products must have real time costing with FIFO
The first product on the bom must not be available
For the second product on the BOM, the standard_price must be different from the cost of the next quant to be consumed
Complete the MO, letting the first product result in a negative quant
Current behavior:
The standard_price of the second product on the BOM does not get updated.

Behavior after this fix:
The standard_price of the second product on the BOM gets updated.

Thanks to matt454357.
2018-05-29 08:24:02 +02:00
qsm-odoo ea0fcd52d9 [FIX] web_editor: properly save a t-field in a t-ignore environment
When a t-field element was in an editable t-ignore environement,
modifying it was leaving the edit mode style attached to it. This
was because of:
1) When the t-field element was changed, it was marked dirty but
   also its parent editable container. Fixing this, only solves
   the case where only the t-field (and not one of its neighbors)
   is changed but it was worth fixing anyway.
2) Before saving an element, the potential 'o_editable' and
   summernote classes were not removed of its descendant and were
   thus saved.

Bug found with task-38069, merged in stable as it might occur there
too.
2018-05-28 12:20:07 +02:00
Odoo Translation Bot 63401868a5 [I18N] Update translation terms from Transifex 2018-05-27 00:26:12 +02:00
Christophe Simonis 3051d1dd2f [MERGE] forward port branch 9.0 up to 34f567dd39 2018-05-24 16:55:28 +02:00
Christophe Simonis 34f567dd39 Revert "[FIX] mass_mailing: unsubscribe not working in multi lang"
commit a3ab33f212 introduced invalid code
2018-05-24 16:50:09 +02:00
LofbergValentin 6e1b660f9c [FIX] hr_attendance: Keep the kiosk session alive
closes #1800442

Purpose
=======

Odoo sessions are expired when no action has been triggered
for the last 7 days. For kiosk mode, this doesn’t make sense.

It means that once a week, a person with the rights to the
employee under kiosk mode, has to come to the screen and log in again.

Specification
=============

Trigger an action to keep the Odoo session alive.
2018-05-24 16:47:12 +02:00
Christophe Simonis 299b613da3 [MERGE] forward port branch 9.0 up to 919a1af936 2018-05-24 16:31:23 +02:00
jem-odoo 919a1af936 [FIX] purchase: correct product cost in reporting
product.product inheritS from product.template, and they both
define the 'standard_price' field, but implement it differently;
 - product: the field is a company dependent one (so non stored)
 - template: the field is a computed one based on tis variants

For the first case, since the field is not stored in database, when
doing SQL query, we have to get the value from the table ir_property.
That is what purchase report does, but instead of searching on resource
'product.product', it does it on 'product.template'. There are
obviously no entries in ir_property table for 'standard_price' field
on product template. As consequence, the "product value" (cost)
is always null in purchase reporting.
This commit fixes that by modifying SQL query to get the good
value from ir_property table.
2018-05-24 16:21:06 +02:00
Yannick Tivisse 28179bc8cb [IMP] base: Add support for private addresses
This is a backport of commit https://github.com/odoo/odoo/commit/2f15a5fa647d55df36c9019df467802a3aa9b4e3

Purpose
=======

Add the possibility to create private addresses, only accessible for a subset
of users.

Specification
=============

- Add a new 'Private' partner type
- Add a res.groups in base 'Access to Private Addresses'
- Add ir.rules for the following behavior:
    - Every employees/internal users can read non-private addresses
    - Only users in group_private_addresses can access private addresses
- Add in base a simplified form view for private addresses

The following points won't be backported:
- A HR Officer is automatically granted in group_private_addresses
- Use the simplified form view to open the address_home_id form on employees
That's because it requires to update 'base' to make it work. If a user only
update 'hr', this will break his instance while 'base' isn't updated.

But these modifications can be applied manually quite easily.
2018-05-24 13:53:46 +02:00
Goffin Simon a3ab33f212 [FIX] mass_mailing: unsubscribe not working in multi lang
When installing the website with a lang  different than the one set
on the user, the button unsubscribe in the mass mailing snippets
didn't work because the unsubscribe link contains the code of the
language. The function send_get_email_dict in model mail.mail didn't
expect this behavior and so couldn't set the right unsubscribe link
in the mail.

opw:1850696
2018-05-24 09:46:36 +02:00
David 682ae1cc64 [FIX] website_form: set meta field
Before this commit, if you enable website_form_enable_metadata, that
will crash with a "KeyError: 'meta'"

This commit closes #24848
2018-05-23 09:16:32 +02:00
Christophe Simonis 45e2ee0a9b [MERGE] forward port branch 9.0 up to 0fd06e5948 2018-05-22 14:23:55 +02:00
Randall Castro 42fb77ceba [FIX] l10n_cr: backport of 9da8378a0a
[FIX] l10n_cr: adapt state code

Change res.country.state code to follow ISO 3166-2:CR
https://www.iso.org/obp/ui/#iso:code:3166:CR

Backport asked at #24673
2018-05-22 14:05:21 +02:00
Odoo Translation Bot b6419117d9 [I18N] Update translation terms from Transifex 2018-05-20 00:26:31 +02:00
Joren Van Onder 0fd06e5948 [FIX] pos_mercury: set the paid amount to what is authorized by Mercury
Mercury can partially approve transactions in case a card does not
have enough credit available to cover the full amount.

Before this the payment amount was kept as the full purchase amount
leading to a difference between what Mercury charged and what Odoo
registered as charged.

opw-1840946
2018-05-18 13:23:08 -07:00
Carlos Dauden 9001a75f23 [IMP] analytic: Performance on _compute_debit_credit_balance
Courtesy of Carlos Dauden.
Was PR #24660
2018-05-18 17:39:00 +02:00
Christophe Simonis bfda65d894 [MERGE] forward port branch 9.0 up to 612fd33fb1 2018-05-18 16:19:21 +02:00
Christophe Simonis 612fd33fb1 [FIX] http: correct protocol parsing 2018-05-18 16:15:55 +02:00
Fabien Meghazi c60b22335b [FIX] base: honor registry/cache signaling for multiple threaded servers
Before this patch the registry and cache signaling was only activated
for PreforkServer. In case Odoo was deployed in a multi process/multi
threaded architecture the signaling was not ensured, causing registry
de-synchronisation amongst threaded servers.
2018-05-18 14:20:35 +02:00
Lucas Perais (lpe) abda3464ed [FIX] web: get_file handles arbitrary AND serialized exceptions
Commit bcd4c90 was intendend to make get_file handle uncaught/unserialized exceptions
in the context of a http request

The drawback is that when get_file received a serialized exception (route: /report/download)
the JS modal was empty in that case

This commit handles both the cases

OPW 1848606
closes #24794
2018-05-18 13:03:31 +02:00
Fabien Meghazi 866d1e7190 [FIX] server: fix support for systemd socket activation in threaded server
This patches fixes the untested and broken draft of inetd and systemd
activation support in the threaded server.

This patch also fixes the loss of the process environment in the
`_reexec()` function when Odoo is respawning during the following events:

    - SIGHUP signal is received
    - one click install has been triggered
    - code reload needed when using `--dev=reload`
2018-05-17 18:38:13 +02:00
Goffin Simon a16114efb4 [FIX] mrp: Two fields with the same label on stock.move
The field quantity_done_store had the same label as the field product_uom_qty
on model "stock.move" and there were confusions in the pivot view of
"stock.move".

opw:1841097
2018-05-17 09:54:37 +02:00
Lucas Perais (lpe) cd26eb8e7c [FIX] l10n_fr_fec: EcritureLib should not be empty
Make an account move with two move lines.
In those lines' label, just hit the space bar, and post your entry.

Now, get the FEC report.

Before this commit, the EcritureLib field was empty

After, it has the value '/'

closes #24734
2018-05-17 09:24:31 +02:00
Lucas Perais (lpe) 54d1b38844 [FIX] point_of_sale: repair cashier from localStorage on refresh page
open a pos,
change cashier
hit F5

Before this commit, the previous user was set as cashier, forgetting about the change we made
This was because of two things:
- The original fix to do just this use case was pushed in v9.0 as e14ab69
- In v10.0 the commit 475027b
    (For v11.0: a9caef0)
    Was intended to update the res.users objects at their loading to ensure that their access rights were loaded too
    But it did this using the wrong condition

After this commit, it reworks fine

OPW 1844006
related #24762

closes #24764
2018-05-17 09:15:24 +02:00
Raphael Collet bcf20cfbec [FIX] stock: use timedelta instead of relativedelta
Suppose we have a delta between two datetimes:

    delta = dt1 - dt0

If delta is negative but less than a day, ``delta.days`` returns -1 (which is
compensated by positive seconds).  In order to avoid this surprising effect,
use ``delta.total_seconds()`` to compute the number of days.
2018-05-16 16:25:03 +02:00