Commit Graph
116988 Commits
Author SHA1 Message Date
Odoo Translation Bot 01d024d2d5 [I18N] Update translation terms from Transifex 2018-05-27 07:03:37 +02:00
qsm-odoo 38ac59871e [FIX] portal, web_editor: keep BS 'img-responsive' *opt-in*
Bootstrap 'img-responsive' behavior was opt-in for a reason but commit
https://github.com/odoo/odoo/commit/f79b00c3b71e02f73537cb17285a6902fc0906b5
tried to defy that anyway. This would break existing client databases
... or at least our odoo.com.

This commit adds the img-responsive class for *new* *editor* images
(still with inline-block display), preventing breaking libraries or
custom (prod) images.
2018-05-25 17:58:54 +02:00
Christophe Simonis 58e3552246 [MERGE] forward port branch 11.0 up to 2ca7296000 2018-05-25 11:50:02 +02:00
Christophe Simonis 2ca7296000 [MERGE] forward port branch saas-15 up to dbb2b9bf73 2018-05-25 11:08:39 +02:00
Aaron Bohy 04ba755f82 [FIX] web: AbstractController: handle concurrent reloads
Let's assume the following scenario in a Kanban view with a default
filter. The user removes the filter, and quickly adds a new one.
On a slow network, it may happen that the second reload request
returns before the first one. On odoo.com, this is easy to
reproduce on the tasks Kanban view.

Before this rev., when this occured, the result of the first
request was displayed, whereas it should have been ignored as
another request was done later on.
2018-05-25 08:11:49 +02:00
Christophe Simonis dbb2b9bf73 [MERGE] forward port branch saas-14 up to cafe56da80 2018-05-24 19:40:05 +02:00
Toufik Benjaa b2aab354c4 [FIX] payment: Remove lang when creating payment transaction
- Having a lang set when trying to create a payment transaction can cause issues due to uninstalled langs on the database.
2018-05-24 19:24:26 +02:00
Christophe Simonis cafe56da80 [MERGE] forward port branch 10.0 up to 3051d1dd2f 2018-05-24 18:24: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
Goffin Simon f9ce42c763 [FIX] sale_timesheet: ZeroDivisionError
To avoid a division by zero.
Courtesy of @tbe-odoo

opw:1850023
2018-05-24 16:29:12 +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
Nicolas Lempereur 56e3100a0b [FIX] stock: remove return return test dead code
In saas-11.2, the traceability has been rewritten and there is no notion
of upstream/downstream, also the code tested seems to have become dead
in some instance (in particular: the one this test tested), so will be
improved soon.

opw-1845444
closes #24887
2018-05-24 15:35:58 +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
Jeremy Kersten 0179b4370b [FIX] stock: error during fwd-port 2bc6ea1b37 2018-05-24 10:01:57 +02:00
Rémi Rahir 4c08e2a945 [FIX] iap: install web_settings_dashboard along with iap 2018-05-24 09:56:02 +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
LofbergValentin 80c03bcd72 [FIX] website_sale: fix the missing action on checkout form
Remove wrong attr name '/shop/checkout' and add the action '/shop/address'.

It allow others routes to render the form, and that the submit form is handled
by the default checkout process.

Todo: make this 'action url' as an argument
2018-05-24 09:32:17 +02:00
Joren Van Onder 1e21b79feb [FIX] website_quote: install sale_payment together with website_quote
Stable version of 65a589eb54 (reverted
at 935043dda1) that doesn't cause the
following errors:

odoo.modules.graph: module website_quote: Unmet dependencies:
sale_payment

on existing databases without sale_payment installed.

A downside of this approach is that sale_payment can be uninstalled
without uninstalling website_quote. Adding an uninstall_hook to
sale_payment could solve that, but it wouldn't warn the user
website_quote would be removed in the "Uninstall module"
wizard. Keeping in mind this is only a temporary hack for stable,
keeping sale_payment installed in this case shouldn't cause any
issues.

opw-1847977
2018-05-23 13:51:15 -07:00
Christophe Simonis 2bc6ea1b37 [MERGE] forward port branch 11.0 up to 02ee3fd88e 2018-05-23 19:33:40 +02:00
Christophe Simonis 02ee3fd88e [MERGE] forward port branch saas-15 up to 1b81f1a5c9 2018-05-23 18:36:28 +02:00
Christophe Simonis 1b81f1a5c9 [MERGE] forward port branch saas-14 up to 373a1c1128 2018-05-23 18:34:28 +02:00
Christophe Simonis 373a1c1128 [MERGE] forward port branch 10.0 up to 682ae1cc64 2018-05-23 18:30:36 +02:00
Christophe Simonis a496ca981c [FIX] stock: move company initial setup logic in model
Followup of 4e71bd5caf
2018-05-23 17:07:28 +02:00
Josse Colpaert 73e213edef [FIX] stock: non-tracked products should follow FIFO removal strategy too
In a warehouse, mostly most of the products have no lot.  It stays
important however to avoid having old products in stock, certainly if
we can distinguish them by pack or location.

As now in stable, in_date is not put on the quant for non-tracked products,
databases might mix quants with and without in_date of the same product.
We should see those without in_date as the oldest.
That is why we need to be able to apply a ASC NULLS FIRST (ASC is NULLS LAST by default) for FIFO
or DESC NULLS LAST for LIFO.

In order to do that, we copied the code from the _search method of the ORM to
be able to do this special order as the orm itself is restrictive as it
supposes the order itself has no spaces.

We adapted and added some tests to check it handles the combination of NULL/NOT NULL well.
2018-05-23 14:38:13 +02:00
Nicolas Martinelli 0b412c250a [FIX] website_sale_delivery: selection at first rendering
- Set up as a shipper with the highest priority one which will cause an
  error (e.g. service not available for customer address)
- Order a product on eCommerce, go to Payment page

Nothing prevents to click on the 'Pay Now' button, although the shipper
rating has failed. Moreover, the error is not displayed in the label of
the shipper.

Workaround: we force a click on the selected default shipper to trigger
the update. The good solution would probably be to have a completely
dynamic shipper rating integration, instead of some processing at first
rendering and then extra dynamic processing.

opw-1838765
2018-05-23 13:17:15 +02:00
Goffin Simon 04dd688091 [FIX] account: wrong view from button "Invoices" from a payment
When clicking on button "Invoices" from a payment, it always displayed
the supplier views instead of taking care about the type of the payment.

opw:1849397
2018-05-23 11:37:35 +02:00
Alexandre Kühn 8dbebe0242 [FIX] web: fetch name_gets on list only when there are data
Revision on 8ac98fc78a

The commit above does not check whether the list contains data or not.
As a result, if there are no data in the list, there is no reason to
fetch `name_gets`.

In fact, there could be a traceback because some parameters of this rpc
are computed from data in the list. So if there are no data in the list,
the parameters of the rpc are undefined. This was the case for a test
in enterprise.
2018-05-23 09:43:12 +02:00
Alexandre Kühn c587c0029b [FIX] web: only abandon records on discard without savepoint
Revision on https://github.com/odoo/odoo/commit/9a9da5763b38a3bce54e9c4870af0032e38cacc3

The intent of the commit above was to no abandon records in a list on
discard when these records have been created from a `default_get`.

Also, the `default_get` may also perform an `onchange` that could create
more records. The records from this `onchange` must also be included in
the "do not abandon" rule.

However, the rule was too relax, so that any following `onchanges` from
a user interaction was also considered into this rule. As a result, it was
not possible to abandon such records.

With this fix, we restrict the rule to `default_get` (already the case) and
only the `onchange` right after a `default_get`. Any record created on an
`onchange` from a user interaction after a `default_get` should be abandoned
on discard.

Representation of creating the list:

                               savepoint
   |----------|-----------|-------||--------|------->
 create   default_get  onchange1         onchange2

record in the list is created by default_get or onchange1
    => do not abandon on discard
record in the list is created by onchange2
    => abandon on discard
2018-05-23 09:43:12 +02:00
len-odoo cf82fbab5f [FIX] mrp: display info text on work orders view
When seeing the work orders view, it would display an empty black box instead of
the proper message.

The message is not displaed since creation is deactivated.

opw 1839001
2018-05-23 09:31:13 +02:00
Lucas Perais (lpe) d1df278f01 [FIX] stock: portal user can see pack operations
Have a delivery for a client, with pack operations
Connect on this user's portal

Go on the SO and then on the delivery

Before this commit, there was an Error 500
because access to fields of pack_operations was forbidden

After this commit, the report downloads well

OPW 1849520
closes #24849
2018-05-23 09:18:21 +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
len-odoo 4e57f94ff9 [FIX] calendar: do not create events past year 9999
datetime.date(year, month, day).weekday() is undefined for year > 9999.
When creating a google recurrent event that is set to never end,
Odoo tries to create 100 individual events.
If in Google calendar the user sets a recurring event to a custom interval,
of say a century, then the hundredth event is in 100x100 years, so in 12018.
Since 12018 > 9999, we get a traceback and synchronisation never happens.

opw 1845311
2018-05-23 09:11:20 +02:00
Adrian Torres 793438915a Revert "[FIX] iap: missing dependency (#24816)"
No dependency change in stable version, instead, an installation hook
should be used.

This reverts commit e9e0f4afc3.
2018-05-23 09:06:40 +02:00
Ivan Yelizariev e9e0f4afc3 [FIX] iap: missing dependency (#24816)
The module uses web_settings_dashboard, but doesn't have it in dependency
2018-05-23 08:43:05 +02:00
Josse Colpaert 8b328665f7 [FIX] mrp: workorders of sub-BOMs
- Create the following BOM structure:
```
  Prod 1 (Manufacture)
  |
  --- Prod 2
      Prod 3 (Kit)
      |
      --- Prod 4
	  Prod 5
```
- The BOMs for Prod 1 & 3 must have a routing set, to generate
  workorders
- Create a MO for 1 unit of Prod 1, process to the end

2 units of Prod 1 are created instead of 1.

This is due to the WO for Prod 3 not having a `next_work_order_id`.
Therefore, `record_production` adds an extra quantity at:
```
production_move.quantity_done += self.qty_producing
```

To prevent this, we set as `next_work_order_id` of the BOM of Prod 3 the
WO of Prod 1.

Closes #19527
opw-1817398
2018-05-23 08:29:27 +02:00
Christophe Simonis 3d7b238b8e [FIX] core: correctly decode 8bit mail headers
When an header contains surrogates, an Header object is returned when
read headers from Message objects.

Also, correctly join header parts in python3.
2018-05-22 16:45:59 +02:00
Christophe Simonis ea3385b41c [MERGE] forward port branch saas-15 up to 9622455f9e 2018-05-22 16:30:03 +02:00
Christophe Simonis 9622455f9e [MERGE] forward port branch saas-14 up to 32a35ccda5 2018-05-22 16:02:56 +02:00
Christophe Simonis 32a35ccda5 [MERGE] forward port branch 10.0 up to 45e2ee0a9b 2018-05-22 15:19:10 +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
Damien Bouvy d5c7370a93 [FIX] base: avoid faulty image url for 1000+ users
Starting with the 1000th user, the kanban view returns the id value
as '1,001', which, for some reason, does not go well when trying to
find the attachment by url...

Use `raw_value` instead, which does not format the id value.
2018-05-22 13:36:37 +02:00
Nicolas Lempereur 076ececb57 [FIX] stock: no loop in traceability report
Depending on the situation, it is possible to have move with origines
and destinations that have a loop.

A simple example is a return of a return, the origin and destination of
the return of a return is the return itself.

opw-1845444
closes #24787
2018-05-22 12:50:20 +02:00
David Arnold c88d5cf1f8 [FIX] l10n_cr: update copyright
DevCO ceased to exist

Closes #24830
2018-05-22 11:37:17 +02:00
Samuele Carli 1d245deddd [ADD] base: add missing Sud Sardegna italian province
Close #24485
2018-05-22 10:45:39 +02:00
Samuele Carli cd9e432579 [CLA] WohthaN signs the CLA
Done at #24485
2018-05-22 10:45:26 +02:00
Jeremy Kersten 2a43614c3c [FIX] web_editor: avoid traceback when open img editor
In some case, (e.g.: demo data), datas_fname is undefined and match of
undefined will crash and block the modal to be opened.

Uncaught TypeError: r.datas_fname.match is not a function
2018-05-22 10:39:35 +02:00