Commit Graph
117156 Commits
Author SHA1 Message Date
Yannick Tivisse 06a085b25f Revert "[FIX] event: fix rights for event.registration"
This reverts commit 05e914629b
while waiting a clear commit message to justify an access right
modification in a stable release.
2018-06-11 17:15:50 +02:00
Invitu e44cb0ae34 [FIX] hr_attendance: Correctly compute worked hours
Fixes #10381 (wrong calculation on datetime)

if worked hours > 24h, calculation is wrong because "seconds" funtion does not take into account days
See: https://docs.python.org/2.4/lib/datetime-timedelta.html

total_seconds() should be used instead of seconds function
2018-06-11 17:13:29 +02:00
RomainLibert 05e914629b [FIX] event: fix rights for event.registration 2018-06-11 17:12:23 +02:00
Swapnesh Shah 651a7bdada [FIX] sale: disable link from pivot view for sale
Before this commit, linking was enable for pivot view of model sale.report.
User that click on a cell will be redirected on a default view list/form
with all fields.

Now linking is disabled.

If you want to open the sale order on click, you need to start with the
pivot view from model sale.order.

This commit closes #25079
2018-06-11 16:59:37 +02:00
Erick Birbe 10c1187e7b [FIX] website_sale_stock: product cart_qty without request
Reading product's `cart_qty` computed field directly with the XMLRPC API
failed because, in such case, the request is unbound.

Fixes #21530
2018-06-11 16:59:37 +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
Petar Najman 824f5eec1a [CLA] Modoolar signs Odoo's CCLA
Closes #25181
2018-06-11 16:25:43 +02:00
Martin trigaux 3419b260fb [CLA] backport of WT-IO-IT GmbH signature
backport to 9.0 as asked at #25185
2018-06-11 16:13:14 +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
Lucas Perais (lpe) bf0fffff44 [FIX] base: rng tree def: js_class must be included
Before this commit, the js_class attribute on a tree arch was not present in the RNG of the tree view.
This is inconsistent with what is done in Odoo, where that attribute is used for kanban views,
is defined in the view_manager to select the widget,
yet unusable for other views.

After this commit, we add this attribute in the RNG to be able to use it in tree views

Linked to OPW 1837565
closes #25088
2018-06-11 15:01:00 +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
tslai ada4235582 [FIX] website_sale_wishlist: avoid traceback when product has been unpublished
Before this commit, if you add in your wishlist a product, and that this product
become unpublished, the user will have a traceback.

After this commit, we filter the wishlist product to only show published product.

This commit closes #24857 and closes #24618
2018-06-11 12:56:40 +02:00
Duc Dao 91bcd84a02 [FIX] account: Only allow admin to set the first invoice sequence
Purpose
=======

When a Access Rights user create the invoice for the first time, when
click save it will raise an access right issue

A user belong to group Access Rights, when he create a invoice he'll
be able to edit 'sequence_number_next'
The reason is he belongs to 'group_erp_manager' which makes _is_admin
return True.

However, he does not have rights to edit on model 'ir.sequence.date_range'.
So that we should not allow him to edit the sequence of invoice in any case

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

Since only users belong to 'group_system' can edit model ir.sequence.
We should not allow other users edit sequences on invoice form, so
the field won't be displayed for them to edit
2018-06-11 12:44:11 +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
Pedro M. Baeza 1bf483b047 [FIX] website_event_track: Properly sort tracks on website with P3
On Python 3, dict.keys() doesn't return a list, so we can't sort it, but
converting to a list on the fly before calling to sort() is not going to
change the original dict_keys object. Storing directly the list in the
variable, we get the expected result.

Side note: the daylist2 variable is there just for the t-set and was
already present in the code. Renaming it to dummy would be clearer
but that should not be done in stable.

Closes #25113.
2018-06-11 12:03:38 +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
Nicolas Martinelli e2ea066360 [FIX] point_of_sale: refresh when qty changed
- In the POS screen, select a product.
- Set the keyboard on "Price" mode
- Change the unit price
- Set the keyboard on "Qty" mode
- Change the qty

The product qty and the total price doesn't refresh until you go to the
payment screen.

We manually trigger a change when the quantity is updated.

opw-1855970
2018-06-11 11:01:18 +02:00
Odoo - OpenERP - Acysos S.L 2d12a361e3 [FIX] base: Navarre official name (#24851)
The official name is Navarra, not Nafarroa

Closes #24851
2018-06-11 10:57:00 +02:00
David 407f52e86c [FIX] website_mass_mailing: Use the correct model to unsubscribe
Purpose
=======

When a contact in a mailing list receives a mass_mailing with an
unsubscription link, then he is automatically unsubscribed once the
unsubscription link in clicked instead of opening the
unsubscription form.

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

Now the user can decide wether to unsubscribe or not.

Closes #24969
2018-06-11 10:53:23 +02:00
Gustavo Valverde fc252fa6a1 [FIX] base: specify Dominican Republic formats
Dominican Republic had no formatting for the address, the code country code was
not being evaluated to '1' and the label was set to TIN or NIF, when it should
be RNC.

Address format wasn't regulated, and it's not explicit in the regulation, but
the invoice formats given by the regulators use this formatting
Source:
    http://dgii.gov.do/contribuyentes/personasFisicas/inicioOperaciones/ComprobantesFiscales/Paginas/FormatoDeFactura.aspx

Closes #24820
2018-06-11 10:48:57 +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
Nicolas Martinelli 0d35f569f4 [FIX] point_of_sale: prevent product unlink
- Create a product with variants which can be sold in the POS
- Open a POS session
- Delete a variant (e.g. change the attributes)
- Sell the product in the POS, validate

The POS order cannot be created because the product ID doesn't exist
anymore.

We extend the existing constain on `product.template` on
`product.product`.

opw-1850598
2018-06-11 10:39:18 +02:00
David 561ac24ca7 [FIX] website_form: set meta field
backport of 682ae1cc64

Before this commit, if you enable website_form_enable_metadata, that
will crash with a "KeyError: 'meta'"

This commit closes #24888
2018-06-11 10:35:42 +02:00
Nicolas Martinelli 61c9921596 [FIX] mrp_repair: return move with owner
- Create Product A with 5 Unit(s) on hand
- Created SO for 5 Units(s) A, validate SO and picking
- Return of the same quantity, but assign an owner
- Created RMA for 5 Units(s)

A warning generated: 'A is not available in sufficient quantity in ...'.

By assigning an owner on the return, the product is not considered
available. However, this makes sense since we are not owner of the
product, so it should not be valued.

Ideally, we would need a field `owner_id` on the RMA. Since it is not
available, we use `partner_id`. the logic is the following:
- try to reserve with owner_id = partner_id
- if the available qty is not sufficient, try without owner

When the stock moves are created, we apply the same logic to know
whether we need to create the move with an owner. Note that this is not
really sufficient. Ideally, we should reserve the quantity to repair
when we check if the quantity available is sufficient.

opw-1854346
2018-06-11 10:02:09 +02:00
Adrian Torres 9422b3272e [FIX] sale_timesheet: reset service_type on uninstall
`sale_timesheet` adds a value to the selection field `service_type`, if
any product.product or product.templates are set to this new
`service_type` and then the module `sale_timesheet` is uninstalled, the
`service_type` field won't be implicitly reset to the default, existing
value of `manual`, due to this, when accessing a view displaying
product.product records the view will crash and won't be accessible as
long as it contains an undefined selection value.

this commit explicitly resets the field to the base value upon
uninstallation.

opw-1856776
2018-06-11 09:48:20 +02:00
Adrian Torres b680dac375 [FIX] website: properly unlink res_config_settings recs
res_config_settings.website_id should be ondelete='cascade', however
that is not suitable for stable, so we emulate the ondelete cascade
with an SQL query during ir.model unlink (website uninstallation).

Fixes #25078
2018-06-11 09:45:20 +02:00
Nicolas Martinelli 1ce2536095 [FIX] point_of_sale: vat_label if no country
- Do not set a country on the company information
- Create a POS order, validate

A crash occurs because of an undefined value.

opw-1856267
2018-06-11 08:24:09 +02:00
Nicolas Martinelli e9b21c37f4 [FIX] payment_authorize: state code
According to Authorize.net documentation, the state code should only be
used for United States. For the other countries, use the state name
instead.

opw-1854278
2018-06-11 08:11:39 +02:00
Odoo Translation Bot 3adeb46cdd [I18N] Update translation terms from Transifex 2018-06-10 04:40:02 +02:00
Odoo Translation Bot 11515e14f7 [I18N] Update translation terms from Transifex 2018-06-10 00:27:35 +02:00
Joren Van Onder e1a9546334 [FIX] event: print time on badge using the event timezone
Otherwise the time is printed using the timezone on the user printing
the badge. This fix is inspired by how the times are rendered by
website_event (e.g. website_event.index).

Using the date_{begin,end}_located fields was considered, but their
formatting is not configurable and they result in lines that don't fit
well on the badge.

opw-1853238
2018-06-08 15:00:37 -07:00
RomainLibert c0618d72d0 [FIX] event: use sudo to compute event_count
You could not see the partner page when not having the event rights.
2018-06-08 16:33:45 +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
Pedro M. Baeza 64645457dd [FIX] base: Allow to create a contact without type
If you don't define an explicit address type, then the
record is not going to be accessible.

In the ORM:
>>> env['res.partner'].create({'name': 'Test', 'type': False})
res.partner(44356,)
>>> env['res.partner'].search([('type', '!=', 'private'), ('id', '=', 44356)])
res.partner()
>>> env['res.partner'].search([('type', '=', False), ('id', '=', 44356)])
res.partner(44356,)

due to the fact that NULL in the database is undefined and can't be
compared to a specific key.
2018-06-08 12:24:19 +02:00
Lucas Perais (lpe) dded98a04c [FIX] mail: open a channel in discuss on systray click
User B mentions @UserA in a channel on discuss
User A gets two notifications: one for direct chat,the other for the channel
User A clicks on the notification for the channel

Before this commit the form view of the channel was opened

After this commit, the channel is opened in discuss

OPW 1849577
closes #25074
2018-06-08 10:06:11 +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 7693ba2d35 [FIX] purchase: qty updated
- Create a PO with 2 different product lines (A & B), confirm.
- Change quantity of B and save

The chatter message mentions A, while the quantity of B was changed.

opw-1849258
2018-06-08 09:41:19 +02:00
Swapnesh Shah 59bfef4c27 [Fix] hr_holidays: do not copy parent_id
When creating an allocation by employee tag if you copied any allocation
made, it was still linked to the parent allocation, hence when
confirming/refusing the parent allocation it would confirm/refuse the
copied one too.

Closes: #25106
2018-06-07 17:02:09 +02:00
jem-odoo a7d9d966a5 [FIX] models: m2o display name as sudo in read_group
In 10.0, the resolution of the m2o field in a read group was
done with a `read` (which sudo the name_get). So, the access
rights were bypassed to get the display_name of the related
records.
In 11.0, a call to `name_get` but not as `sudo` causing access
error in some case. For instance;
- a user has read access on project
- he log some timesheets
- its access to project is removed, but not the timesheet ones
- trying to access its own timesheet via the grid view (which does
a read_group)
- the user gets the access error for project.

The read_group should reproduce the behavior of the `read` method,
so the `name_get` for m2o field during a read_group is now sudoed
to restore previous behavior.

opw-1855942
2018-06-07 16:52:00 +02:00
Nicolas Lempereur f6a74f40b5 [FIX] portal: typo in domain portal_message_fetch
In bd4f09f there was a typo in the domain portal message fetch (two `&`
instead of one), luckily this did not cause an error in 11.0

But in master expression.AND normalizes the domain, thus we got an error.

opw-1819702
closes #25131
2018-06-07 15:17:05 +02:00
Nicolas Martinelli 9d85fea1c3 [FIX] board: add extra info
When an element is added to the dashboard, it is unclear to the user
that he needs to refresh the browser for the changes to take effect.

opw-1853242
2018-06-07 13:19:17 +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