Commit Graph
123249 Commits
Author SHA1 Message Date
Odoo Translation Bot 0efff5f030 [I18N] Update translation terms from Transifex 2019-01-21 16:49:26 +01:00
Christophe Simonis 9d2e201692 [FIX] web: correct forward-port 2019-01-18 17:03:46 +01:00
Christophe Simonis d31306e07a [MERGE] forward port branch 12.0 up to 6e5ac01160
Also contains fixes for previous forward-port.
2019-01-18 16:18:17 +01:00
Christophe Simonis 6e5ac01160 [FIX] web: correct forward-port of 187c32c2c7 2019-01-18 15:27:22 +01:00
Christophe Simonis 7276e8203e [FIX] purchase: correct previous forward-port.
Domain was apply on the wrong model.
2019-01-18 14:37:51 +01:00
Christophe Simonis a337b9ec92 [MERGE] forward port branch 12.0 up to f854e01a98 2019-01-18 14:26:33 +01:00
Christophe Simonis f854e01a98 [MERGE] forward port branch saas-11.3 up to 4aa153e65c 2019-01-18 10:58:41 +01:00
Nicolas Seinlet f8e37d6a80 [IMP] improve overridden sql constraints support
If module A define an sql constraints and module B, which depends on 
module A, override the sql constraint, we must ensure having only the 
last definition in constraints list. Having the two versions in the list
makes the ORM continuously trying to drop the second version by the 
first one, then recreate the second version, when performing operations 
like an upgrade a module B.

An illustration of this is the login_key on res.users, which is unique
per login in base, but unique per (login, website) in website.

closes odoo/odoo#30334
2019-01-18 09:20:02 +00:00
Christophe Simonis 4aa153e65c [MERGE] forward port branch 11.0 up to 19558129f0 2019-01-17 20:49:36 +01:00
Christophe Simonis 19558129f0 [MERGE] forward port branch saas-15 up to c0471dd857 2019-01-17 19:07:34 +01:00
Christophe Simonis c0471dd857 [MERGE] forward port branch saas-14 up to 17adccd95c 2019-01-17 18:07:26 +01:00
Christophe Simonis 17adccd95c [MERGE] forward port branch 10.0 up to 50bae1c0c5 2019-01-17 17:08:39 +01:00
Julien (juc) Castiaux 71c4c13996 [FIX] web_editor: save less file
Modifying less files and saving them using the web editor can raise
and error. The error is due to the way odoo save the modified file.

It extends the view containing the URL of the file by filtering views
related to the xml bundle id and keeping those that have the said URL
in their content.

This lookup fails to give just one result in case there are multiple
file containing the said URL. This fix change the filter from a
bare `if url in view.arch` to a correct xpath lookup.

The "/web/static/src/variables.less" less file was one of the
problematic files.

opw-1889794

closes odoo/odoo#30186
2019-01-17 15:19:54 +00:00
Nans Lefebvre ba41c3c1cc [FIX] base: disable prefetching during module uninstall #2
Create any module that inherit 'res.lang'.
Define any new field that is added with that inheritance.
Install that module. Then try to uninstall it. Traceback ensues.

When trying to write 'state': 'uninstalled' on the module,
the prefetching tries to read a column that has been deleted
by the _module_data_uninstall.

opw 1917369

closes odoo/odoo#30176
2019-01-17 15:08:31 +00:00
Jorge Pinna Puissant e6b5a0e2eb [FIX] payment: Acquired deployed in production
Before this commit, in the config bar (Sales or Invoicing) when you configure a payment
acquirer,  it was deployed in test mode, and not in production mode. Note that, the config
bar wizard asks for the production credentials.

Now, when you configure a payment acquirer, from the config bar, the acquirer is deployed
directly in production mode.

opw-1918412

closes odoo/odoo#30319
2019-01-17 14:25:25 +00:00
Denis Ledoux 8865d63134 [FIX] res_partner: a partner is portal if he has no employee users
Currently, a partner is considered a portal
if he has no users
or
if at least one of his users is portal.

This causes problems if an employee has two users,
one portal, one employee
and gets notified in a thread (e.g. @ Marc demo):
The email sent won't contain the action buttons (e.g. view opportunity)
because the employee is considered as portal.

A partner of an employee can have multiple users
linked if at some point two partners were merged,
and the partners had each a user, one a portal
and the other an employee.

This revision changes this behavior,
to consider a user as not portal (employee)
if one of its users is not a portal (an employee).

This is uniform with to the behavior of the
`share` field of `res.users`,
which is `True` when the user is part of the group employee.
```
user.share = not user.has_group('base.group_user')
```

opw-1914103

closes odoo/odoo#30314
2019-01-17 13:08:35 +00:00
Nicolas Martinelli 4da161244d [FIX] stock_account: ctx after group by
- Set valuation to FIFO
- Make a PO for a product
- Validate the picking
- Execute the Inventory Valuation report
- Apply group by Category
- Click on the 'Valuation' info button

A traceback occurs because of the usual `group_by` context key which is
kept.

opw-1918915

closes odoo/odoo#30313
2019-01-17 13:00:47 +00:00
Lucas Perais (lpe) 0dd38282c3 [FIX] crm: test lead from email needs second company
Because of a742813c36fc8cdf4e41c72e00944b6901be6017.
Apparently when crm is installed alone, there is only one company

closes odoo/odoo#30312
2019-01-17 12:53:08 +00:00
wan 50bae1c0c5 [FIX] account: journal dashboard graph wrong value
OPW 1918926

Current behavior:
  The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values.

Desired behavior:
  There is no override of the values correctly computed.

closes odoo/odoo#29936
2019-01-17 12:37:36 +00:00
Lucas Perais (lpe) 187c32c2c7 [FIX] web: pivot correct context after reload
Open a pivot view with default filters automatically activating
Disable those filters

Change the groupBys on the rows and cols of the pivot

Save your result as a favorite filter

Before this commit, the filter did not contain the context information for columns groupby
Also, the search view did not exploit the context of the new filter as it should be

After this commit, the flow works as expected

OPW 1913732

closes odoo/odoo#29415
2019-01-17 12:37:25 +00:00
Jorge Pinna Puissant 91fb15510f [FIX] hr_timesheet: task view in mobile
Before this commit, there were not specific view for the mobile devices.
The analytic account views were used.

Now, there are specifics views for the timesheet in the tasks.

opw-1913371

closes odoo/odoo#30309
2019-01-17 12:26:20 +00:00
Hardik Prajapati 81c090751f [FIX] mrp: Barcode on Manufacturing Order Report
opw-1925956

closes odoo/odoo#30304
2019-01-17 12:17:33 +00:00
Nans Lefebvre 01cd87794d [FIX] web: remove the report_layout from studio selectable widgets
Open studio to modify the widget displaying a relational field.
The report_layout widget can be selected, say, to display payment terms.
Obviously it doesn't make sense.

We remove its supported field, as the field is not generic
(indeed there is only one use for it in the codebase).

opw 1919369

closes odoo/odoo#30303
2019-01-17 10:19:23 +00:00
Lucas Perais (lpe) 15cd94b746 [FIX] base: merge contacts linked to by an o2m field with caps
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)

create two objects of that class, each one linked to a different partner with the new o2m

merge the partners

Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name

After this commit, the second object still exists

OPW 1925060

closes odoo/odoo#30300
2019-01-17 12:30:20 +00:00
qsm-odoo 606bae9e92 [FIX] web_tour: ensure Tip template is loaded
The 500 page has `session.is_frontend === undefined` as it has its own
whole HTML template.
In that case, the ajax.loadXML is not done, making the tour crash when
visiting a 500 error page.

This is needed for #29957 that has a test tour on 500 error page.

closes odoo/odoo#30240
2019-01-17 11:53:09 +00:00
pha-odoo 649ea4927e [FIX] hr: move print_employee_badge to the hr module
closes odoo/odoo#30302
2019-01-17 09:59:57 +00:00
Lucas Perais (lpe) ba39efdfc6 [FIX] base: merge contacts linked to by an o2m field with caps
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)

create two objects of that class, each one linked to a different partner with the new o2m

merge the partners

Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name

After this commit, the second object still exists

This commit is tested in v12.0 with PR #30300 only. In v10.0 it is not testable as
the model concerned is in CRM, and that no new fields in business modules can be added in stable

OPW 1925060

closes odoo/odoo#30301
2019-01-17 09:59:23 +00:00
Christophe Matthieu 586dc9e025 [FIX] web: can reopen ModelField selector widget
Before this fix, in studio when the user select the field then focus out
then focus in and selected a child field, an exception is triggered because
the last page is visible but the data are removed.

backport of 12.0's 9eef25ae0a

opw-1928453
closes #30277
2019-01-16 16:18:59 +00:00
Christophe Simonis 83cc046e9a [MERGE] forward port branch 11.0 up to 4c93e4be0d 2019-01-16 14:26:14 +01:00
Christophe Simonis ff2efcd1a9 [FIX] base: force label of ir.actions.server field crud_model_name
Avoid warning due to duplicated field labels.
2019-01-16 14:06:37 +01:00
RomainLibert 2f526dcd65 [FIX] hr_payroll: do not display conflicting leave button when no type
Basically you can have two types of error when using benefits, the
conflicting leave error and the no benefit type set error.
You can have either one of them or both of them at the same time.

The problem is that when there is an error, we currently have no way of
knowing which error it is.

To resolve this we only display one error at a time starting with the
no benefit type error and then if there is a conflicting leave we
display the next error

closes odoo/odoo#30259
2019-01-16 12:47:47 +00:00
RomainLibert dad7d80a93 [FIX] mail: fix typo in _onActivityUpdated
closes odoo/odoo#30260
2019-01-16 12:40:56 +00:00
Nicolas Martinelli 4c93e4be0d [FIX] event_sale: ticket
- Create a SO with an ticket for an event, confirm
- On the attendees wizard, click on 'Apply'

The event ticket is remove from the registration.

This is because the event ticket wasn't saved when creating the
registration line.

Complement of commits 7492c97bf4 and 0717bb6c0d

opw-1920464

closes odoo/odoo#30262
2019-01-16 10:47:40 +00:00
Martin Trigaux bfe1e20d6b [I18N] export saas-12.1 source terms
To reflect fixes at ec2263080a and cd4080839f

closes odoo/odoo#30253
2019-01-16 10:35:49 +00:00
Romeo Fragomeli c72e5a8bc5 Revert "[FIX] web: empty kanban view on mobile"
Original commit breaking kanban view: 4cd379cf6e
Commit reverted: 287136b85e

Two fixes were added independently to fix this bug but only one is needed.

odoo/enterprise@c8fe86fa22 best fix
287136b85e other fix (now reverted)

Reverting this commit fix the following bugs:
- Swipe on kanban : Not able to swipe on empty column. it only works on cards
- Popup activity on kanban card is unusable
- On kanban separation, "Undefined" cards are before the kanban separation

closes odoo/odoo#30177
2019-01-16 11:00:38 +00:00
Jorge Pinna Puissant 6c47c68eb7 [FIX] hr_org_chart: undefined manager name in breadcrumbs
Before this commit, in the organization chart, when a manager that have too many
subordinates, and we want to view all the subordinates clicking the '...' button. There was
an error in the breadcrumbs, the text 'Undefined' was shown in the place of the manager's
name.

Now, the breadcrumbs shows the name of the manager.

OPW-1923990

closes odoo/odoo#30231
2019-01-16 09:35:35 +00:00
Christophe Simonis 38068f8151 [FIX] account: cherry-pick of 83f5dc8e35
do not set unknow field when creating invoice

The field `reference_type` has been removed with b5bb5bd421

Adapt newly forward-ported test to not use this field.

closes odoo/odoo#30255
2019-01-16 08:47:58 +00:00
Nicolas Martinelli b876cb397d [FIX] website: null type redirection
Commit 68e9d5504c makes the redirection type mandatory, which is
logical. Since we can't add such a constraint in stable, we make the
field required in the view and assign a default value (in case the
module is not upgraded, which is very likely to be the case).

opw-1924983

closes odoo/odoo#30252
2019-01-16 07:51:53 +00:00
Christophe Simonis 952f784454 [MERGE] forward port branch 11.0 up to 4f2f299534 2019-01-15 17:48:36 +01:00
Christophe Simonis 4f2f299534 [MERGE] forward port branch saas-15 up to 3374ac805f 2019-01-15 15:08:01 +01:00
Nicolas Martinelli ae6545ccd5 [FIX] account: numerous reconciliation models
- Create many reconciliation models (more than 100)
- Try to create a manual reconciliation entry

The reconciliation models buttons are displayed on top of all fields,
making it impossible to encode any data.

We limit the size of the `div` to 54 pixels, which corresponds to 3
lines of buttons. All buttons are still accessible thanks to a
scrollbar.

opw-1890781

closes odoo/odoo#30212
2019-01-15 12:15:24 +00:00
Lucas Perais (lpe) 8e87075724 [FIX] sale: inline form SO contains price_total
When removing the editable attribute on the list view
of th o2m towards order_line, when adding a line,
the price_total of the line was neither computed nor sent to the onchange
of the sale order

now it is

OPW 1914740

closes odoo/odoo#30234
2019-01-15 14:28:01 +00:00
Nans Lefebvre 1e966452ff [FIX] l10n_be_invoice_bba: fix mail template
The field reference_type has been renamed invoice_reference_type in v11.
The selection value 'bba' for that field has been renamed 'structured'.
We update the template to reflect these changes.

Discovered thanks to a forward port of that field up to v12.

closes odoo/odoo#30224
2019-01-15 12:50:44 +00:00
Christophe Simonis 3374ac805f [MERGE] forward port branch saas-14 up to 28785f21e4 2019-01-15 11:45:44 +01:00
Christophe Simonis 28785f21e4 [MERGE] forward port branch 10.0 up to 6edfadbdd2 2019-01-15 10:48:11 +01:00
Julien (juc) Castiaux 357b374a7e [FIX] mail: URL with semi-colon
When posting a URL containing a semicolon, odoo stops the link
before the semicolon instead of continuing the link to the end
although it is a valid characters in URL (see RFC-3986)

e.g. the url "example.com&foo;bar" matches "example.com&foo"
     instead of the whole link

opw-1918367

closes odoo/odoo#30198
2019-01-15 09:02:12 +00:00
Nicolas Martinelli 180ace7b1b [FIX] product: unwanted attribute values in name
- Create the following attributes with values:
  Size: S, M, L, XL
  Color: Black, White
- Create a product template with the following attribute values:
  Size: S, M, L, XL
  Color: Black

The `name_get` of `product.product` returns `Name (SIZE, Black)` while
it should only return `Name (SIZE)`.

When using `attribute_id.value_ids`, the list of values contains all
possible values of the attribute, not only the values which apply to the
given product. In this case, it contains 'Black' and 'White', therefore
the condition `> 1` is verified and the attribute is kept for display.

We go back to the original filtering, and add `attribute_line_ids` in
the list fields read in order to avoid prefetching.

opw-1922140
opw-1922447

closes odoo/odoo#30273
2019-01-16 14:48:33 +00:00
Joren Van Onder 302d8a5264 [FIX] point_of_sale: allow refunds on non-cash journals
Cherry pick of 5b769650d6 in version 11.0

A customer can pay an order with a non-cash journal (e.g. a credit
card through a stand-alone terminal).

When this order has to be refunded later it should be possible to do
so on that same journal.

Some code prevented this from happening, notably a check in
order_is_valid which explicitly prevented this for an unknown
reason. There is no explanation in the
commit (4647f896a4) introducing that.

This commit allows the following:

1. input what you want to refund with a negative qty
2. click 'Payment'
3. click the Credit Card (type Bank) journal
4. (amount is auto-populated)
5. click 'Validate'

opw-805302
opw-1913731

closes odoo/odoo#30218
2019-01-16 14:19:13 +00:00
Nicolas Martinelli 614babd1e7 [FIX] account: bank statement with many AML
- Create a bank statement with more than 80 lines (therefore more than
  80 AML)
- Reconcile the lines
- Go back to the bank statement, and try to add a new line

An error arise:
"You cannot do this modification on a posted journal entry, you can just
change some non legal fields"

The error arise on the `move_line_ids` field on which the web client
tries to write.

Actually, this field is hidden since it is only used in the domain of a
stat button. We can make it read-only.

opw-1921138

closes odoo/odoo#30266
2019-01-16 11:09:21 +00:00
Iryna Vyshnevska 92e4c4c347 [CLA] signature for ivyshnevska
Backport to 10.0 of 3b14a7daa6

closes odoo/odoo#30090
2019-01-16 10:03:03 +00:00