Commit Graph
109722 Commits
Author SHA1 Message Date
Martin Duvergey d0a2a4eef6 [CLA] mduvergey signs Odoo's CLA
Done at #24905
2018-06-11 17:47:38 +02:00
Swapnesh Shah af752e7158 [FIX] website_forum: Fixed maximum recursion depth
Before this commit, you can set the question of a post like the post itself.
That will generate a traceback:
    RecursionError: maximum recursion depth exceeded in comparison

Now we check that there is no recursion
2018-06-11 16:49:38 +02:00
Alexis de Lattre 66182a5645 [FIX] account_bank_statement_import: access right fix
This commit fix an access right issue when a user that belongs to account.group_account_user (and not to account.group_account_manager) imports a bank statement file.

Was PR #25041. Courtesy of Alexis De Lattre (Akretion)
2018-06-11 15:42:01 +02:00
Goffin Simon e15990489c [FIX] mrp: Produced Lot is not updated if multiple productions with the same Lot
Steps to reproduce the bug:

- Create two products P1 and P2 requiring a lot
- Create a BOM B for P1 and requiring 3 P2
- Set on B a routing with a work order
- Create an inventory adjustment with 2 lots for P2:
   - Lot1 with 20 P2
   - Lot2 with 10 P1
- Create a MO for 10 P1
- Start the production and create a current lot Lot3 in Current Production sheet
- Set as current Qty 5 with Lot3 as current lot and Lot1 as Product Lot
- Click on DONE
- Set as current Qty 2 with Lot3 as current lot and Lot1 as Product Lot
- Click on DONE
- Set as current Qty 3 with Lot3 as current lot and Lot2 as Product Lot
- Click on Done

Bug:

When you checked the produced qty on the MO in the Finished product sheet, it only displayed 5 instead of 10.

opw:1849796
2018-06-11 15:19:17 +02:00
Laurent Mignon (ACSONE) 3c628bae49 [FIX] base: allow erp manager to set multi-company on a user
If a user member of group 'group_erp_manager' create a new user and adds
the user in multiple companies, the system raises an AccessError on ir.ui.view

When adding a user in multiple companies, he is automatically added in
the 'base.group_multi_company' group.
Modifying a 'res.group' record recomputes the view architecture.
The ir.ui.view records is writable by 'base.group_system' users.

Closes #21207
2018-06-11 15:04:15 +02:00
Goffin Simon f6d69ff2d3 [FIX] odoo: copy_translation translates the wrong view
With website_version, when publishing a version and copying the current version,
the copy_translation wrote a new translation for the copy of master in the published
view instead of the copied view.

Reason:

When writing in the view, odoo checked in the context the current version and
wrote in the view corresponding to the key and the verion seen in the website.
So when copying a view, it translated the copied view instead of the copy of
the view.

The write is made by the function copy_translation with the line:

   "new_wo_lang[name] = old_wo_lang[name]"

opw:1856150
2018-06-11 13:22:01 +02:00
Flavien Chêne a023a55f95 [CLA] signature for Zelwak 2018-06-11 12:14:36 +02:00
Flavien Chêne 8dc3bd4b63 [FIX] website_sale: Correct set 'checked' attribute on variants list
Purpose
=======

In the website_sale.product_variants template, for the "checked" attribute in the radio input,
it must be " checked' if variant_id_index == 0 else None " instead of "' checked' if
variant_id_index == 0 else '' ".

For this moment, it checked the last variant because we get " checked="checked" " for the
first and " checked="" " for the others.

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

Use None instead of '' for the checked attribute if it shouldn't be checked.
2018-06-11 12:13:19 +02:00
Adrien Peiffer (ACSONE) 31f3687124 [IMP] payment_stripe: Fill email on stripe modal to avoid retyping it
Purpose
=======

Currently, users have to retype email in the stripe payment popup.

For event registration, the email address must be typed 3 times (the first
for the registration information, the second for the billing information
and finally for the payment on the stripe popup)

Specifications
==============

As the email is already filled on billing information view, isn't
necessary to retype in the payment form.
2018-06-11 11:27:49 +02:00
Adrien Peiffer (ACSONE) 52f5bb27ce [FIX] website_event: improve registration modal behavior
Currently there are 3 ways of going out of the modal: clicking cancel
registration, hitting the close button or clicking outside the modal.
The latter one however does not trigger the close event for modals and
therefore buttons of event registration are not reset correctly. This
commit fixes that behavior by preventing to close modal by clicking
outside of it. Buttons should be used and flow is now fixed.

Closes #25174 .
2018-06-11 11:23:28 +02:00
Simone Rubino 56e8a4a82a [FIX] website_project_issue: put 'view task' button in email to portal users
Commit
https://github.com/odoo/odoo/commit/9e981f6535cc7d8e46bc53ebd279b377c805e6a2
removed the 'view task' button for the groups 'customer' and 'portal'.
Since this button works fine for portal users, we put it back for them.

opw 1849770
2018-06-11 11:07:24 +02:00
Rod Schouteden 5c03430d9f [FIX] service: do not break on gevent 1.3
gevent 1.3.0 removed backward compatibility on gevent.wsgi.
make the new path the default

While the recommanded version on requirements.txt is 1.1, a server can not
launched with the 1.3

Closes #24780
Fixes #24779
2018-06-11 10:42:09 +02:00
Rod Schouteden 84ce2ead86 [CLA] signature for schout-it
Done at #24780
2018-06-11 10:42:09 +02:00
Odoo Translation Bot 11515e14f7 [I18N] Update translation terms from Transifex 2018-06-10 00:27:35 +02:00
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