Commit Graph
109442 Commits
Author SHA1 Message Date
David Arnold 231cae2e7f [FIX] fields: copy_cache with failed values onto sudo env (#23122)
Do not copy failed values, as they usually reveal access error that should
not occur in the sudoed env.

Closes #23121
2018-03-12 10:14:01 +01:00
Alexandre Kühn 3360c550cc [FIX] board: redirect to form on calendar event click
Before this commit, when clicking on a event of a pinned calendar view
in the Dashboard app, nothing occurs.

The cursor turns into pointer type when hovering on an event, suggesting
that clicking on it should do something. Kanban and list views redirect
the user to the document's form on click, so a similar behaviour is
expected with calendar view.

This is indeed the case in v11, but not in v10. The reason that it works
in v11 for calendar is that when we click on a record of a pinned views
in dashboard, it performs a do_action to open the form view. In v10, however,
it performs a do_switch_view to the form view. Since there's only one view mode
when we pin something in dashboard, the processing of the click fails silently.
Kanban and list were working because the dashboard app overrides their
handlers functions when loading the views, which wasn't the case with calendar.

This commit solves the issue by also overriding the handler function
of calendar view, so that it performs a do_action to open a form instead
of performing a do_switch_view to the form view.

(Note: pivot and grid views work, because they use do_action)

opw-1817725
2018-03-12 08:38:52 +01:00
Simone Rubino 671d54114f [FIX] project_issue: override _track_template
Properly override `_track_template` similarly to what is done for
`project.task`, so the method can accept a recordset.

Co-authored by: Nicolas Martinelli <nim@odoo.com>

Closes #23466
opw-1823244
2018-03-12 08:13:00 +01:00
Simone Rubino 18109edc6e [CLA] Signature for SimoRubi 2018-03-12 08:13:00 +01:00
Nicolas Martinelli 00acd9882b [FIX] l10n_fr_fec: escape references
Escape the character `|` in the reference, to avoid messing with the
exported CSV file.

opw-1814994
2018-03-12 08:09:20 +01:00
Odoo Translation Bot 3e7835134d [I18N] Update translation terms from Transifex 2018-03-11 00:27:33 +01:00
Juan Pablo Arias 895f32d185 [IMP] base: add Panama address format
Closes #19217
2018-03-09 17:10:46 +01:00
Juan Pablo Arias 6d6a8f2b5b [CLA] add new email to Kurkop's CLA
Done at #19217
2018-03-09 17:10:46 +01:00
Fabrice Henrion f4042b5975 [FIX] doc: grammar
Closes #19377
2018-03-09 15:37:47 +01:00
Akim Juillerat af83bb6640 [FIX] stock: add space in warehouse sequences name
The sequence name was something like:
    	"YourCompanySequence in"

Closes #19564
2018-03-09 14:15:56 +01:00
Olivier Colson 6f35d859c5 [FIX] account: show partial payments into partner ledger
Before that, partial payments of invoices were not shown into the partner ledger unless the option to show reconciled entries was activated. This was due to the fact we checked full reconciliation with the field "reconciled" instead of the full_reconcile_id, so the query did not return the partial payments (which have reconciled=True, but don't have any full_reconcile_id unless the invoice is fully paid).
2018-03-09 14:02:19 +01:00
ddelangle 21c509964c [FIX] base: use correct MAD currency symbol
change د.م. to DH

source:
	http://www.iotafinance.com/en/ISO-4217-Currency-Codes.html

Closes #20064
2018-03-09 12:19:46 +01:00
ddelangle 277c382f5e [CLA] signature for kazacube
Done at #20064
2018-03-09 12:19:31 +01:00
Lucas Perais (lpe) 262be78957 [FIX] sales_team: allow own_lead user to qualify leads
Use case:
Have a user with access rights "See Own leads"
In the CRM settings check the "use leads" boolean

Before this commit:
This user couldn't create a lead directly nor qualify it as an opportunity
AND
the default sales team on the lead displayed as 'Unknown'

After this commit:
This user can read the sales team, even though he is not a member of them
He can create leads on the default sales team
And qualify them as opportunities

OPW 1816309
ref #22360
2018-03-09 09:13:41 +01:00
Lucas Perais (lpe) 45c5a07d89 [FIX] account: allow to include zero amount lines in aged partner balance
Make an invoice
Make a payment
Unreconcile them

Before this commit:
The invoice and the payment weren't display in the aged partner balance

After this commit:
Both payment and invoice *can* be included in the balance

OPW 1819359
2018-03-09 09:07:33 +01:00
Nicolas Martinelli 303f547690 [FIX] point_of_sale: round unit_price
- Set the product price decimals to 5
- Create a product costing 0.32
- Create a pricelist with 20 % discount when quantity is > 100
- Set a default fiscal position on the POS
- Lauch a POS session
- Add 500 units of the product

The unit price is rounded to 0.26, while it should be 0.256.

This is due to the call to `compute_all`, which will round to the
currency precision.

opw-1816997
2018-03-08 15:24:05 +01:00
Martin Trigaux 1274758033 [FIX] gamificiation: partial backport of 56645335
Was making subject `mail.message()`

Closes #9557
2018-03-08 14:59:50 +01:00
Martin Trigaux 205fd6afe2 [FIX] sale: translate Uncategorized layout 2018-03-08 14:19:54 +01:00
Denis Ledoux b98233aacc [FIX] stock_landed_costs: gap in landed costs sequences
On creation of a new landed cost,
in the web client,
the name was filled with the next sequence
`self.env['ir.sequence'].next_by_code('stock.landed.cost')`

but then, as the field is readonly,
it is not sent in the create values to the server,
and therefore the server sets again the default value
and generates a new sequence name.
The previous assigned sequence name is therefore never assigned,
and there was an obvious gap in the landed costs sequences.

Besides, using a sequence as a default is never a good
idea, as the record can be discarded, and this will not discard
the sequence number that has been used. There will be again
a gap in the sequence.

See this forum topic for reference:
https://www.odoo.com/forum/help-1/question/how-to-handle-reading-and-writing-to-read-only-fields-2247#answer_2281

I therefore remove the default value,
and use the exact same behavior than on the sale order,
which is pretty similar:
 - The default value is set to `New`
 - Then, on creation, it is replaced to the actual sequence number.

https://github.com/odoo/odoo/blob/bfe88c50e2b4975a23c624cc5b5171158bb9f855/addons/sale/models/sale.py#L273-L279

opw-1823133

Note: This can be back-ported to Odoo 9.0,
but the fix will be different since the module has
been converted to the new API since then.
If I did it in 9.0 in the first place,
mostlikely it would not have been forward ported correctly.
2018-03-08 13:48:17 +01:00
Martin Trigaux 4fc0947850 [FIX] tools: do not escape \t
msgid ""
"You cannot set a negative product quantity in an inventory line:\n"
"\t%s - qty: %s"

Was creating a ir.translation record with a src as

You cannot set a negative product quantity in an inventory line:
t%s - qty: %s

('t' instead of \t)

Closes #23541
Fixes #23521
2018-03-08 13:47:12 +01:00
Christophe Simonis fc2fc62ffd [MERGE] forward port branch 9.0 up to b5da9d65ae 2018-03-08 12:57:19 +01:00
Christophe Simonis b5da9d65ae [MERGE] forward port branch saas-6 up to f48b754cef 2018-03-08 12:40:38 +01:00
Denis Ledoux f48b754cef [FIX] membership: missing triggers to recompute membership dates
When a membership line has its dates changed
(date_from, date_to, date_cancel)

The membership start/stop dates on the member
(res.partner) were not changed accordigly.

opw-1823981
2018-03-08 12:34:33 +01:00
Christophe Simonis 41af298d9d [FIX] hr_payroll: use defined variable
Oversight of previous forward-port
2018-03-08 11:11:44 +01:00
Christophe Simonis d7f4454694 [MERGE] forward port branch 9.0 up to 2f46f3bdb2 2018-03-08 10:50:20 +01:00
Denis Ledoux 2f46f3bdb2 [FIX] hr_payroll: generate payslips sets the employee company
In a multi-company environment,
if a user in company A
created a Payslips batch for an employee in the company B
and used the `generate payslips` button,
the created payslip was set with the user company (A) while
it must be the employee company (B).

opw-1820138
2018-03-07 16:16:52 +01:00
Romain Derie 1c01528375 [FIX] hr_expense: ensure message_new has only one record (singleton)
Before this commit:
Expense emails title are parsed to find a product that match the given [CODE].
For example, an email title like '[CARD] Graphic Card $900' will create an
expense for the product having 'CARD' as internal reference.
Since the search is done with an 'ilike' and with no 'limit', it could return
multiple product: all the one containing the CODE in their internal reference.
This would throw a singleton error when trying afterward to read product.id.
Then, the mail would not go through the mail.thread flow and it would return
a Mail System Delivery fail saying the address does not exist.
Users would get stuck with this, having no way to understand where the error
comes from.

Now, we ensure to find only 1 product.
To avoid breaking the ilike behavior that could be used by users only typing
the first caracters of a long CODE, we still use ilike but force exact match if
there is multiple results.

Closes #23419
opw-1816340
2018-03-07 14:25:16 +01:00
Adrian Torres 69c7d696d8 [FIX] base: whoopsie
Autovacuum wouldn't be executed at all!! `cr` is not defined.

Fixes commit 8b119e2
2018-03-07 11:44:36 +01:00
Stefan Rijnhart (Opener) 1cc21d7eb6 [FIX] account: use correct model in report definition
`account.report.journal` and `account.report_partnerledger` aren't valid models
2018-03-07 11:29:04 +01:00
Christophe Simonis e52607e4e3 [MERGE] forward port branch 9.0 up to 9cf9938f04 2018-03-07 10:37:45 +01:00
Christophe Monniez 9cf9938f04 [CLA][FIX] fix encoding of a CLA that was in ISO8859-1
In a near future (I hope), runbot will reject CLA that are not UTF-8
encoded.
2018-03-07 10:32:52 +01:00
Nicolas Martinelli 8cfb485891 [FIX] im_livechat: empty regex
If `regex_url` is not set, `re.search` crashes.

opw-1805669
2018-03-06 15:02:22 +01:00
Lucas Perais (lpe) d59fe9c58c [FIX] website_sale_delivery: if state_ids is not specified, all states supported
Set up a delivery method that has a country set on it, but no states
(e.g. USA)

When the client is required to fill his address info in and when he chooses USA as the country

Before this commit:
The selection field where the states are selectable is not displayed.

After this commit:
All the states of the country are selectable

The usability choice is to say that if states are not specified on the delivery method
that means all states are supported

OPW 1818591
2018-03-06 13:16:43 +01:00
Christophe Simonis 5e6bb745e8 [MERGE] forward port branch 9.0 up to 4aea19d9e8 2018-03-06 11:56:50 +01:00
Christophe Simonis 4aea19d9e8 [FIX] sale_crm,crm: handle timezone in dashboard
Complete parent commit by correcting overwritten method.

Also use existing method to retrive date depending on tz in context.
2018-03-06 11:23:46 +01:00
Raphael Collet 36d6910269 [FIX] survey: constraint method on recordset 2018-03-06 11:23:29 +01:00
Nicolas Martinelli 037cfc9f67 [FIX] delivery: products not shared
- Define 2 companies A and B. Delivery methods are linked to products in
  company A
- Deactivate 'Share product to all companies'
- Create a user B in Company B only
- As user B, create a SO and open the drop-down list for delivery
  methods

An access error is raised.

Delivery methods should follow the same record rules than the products
they are linked to.

opw-1815490
2018-03-06 10:02:44 +01:00
Aaron Bohy b466b3bc60 [FIX] web: create favorite filters in dialogs
Consider the following scenario: open in edit mode a form view
containing a many2many field displayed with widget many2many_tags,
on the many2many field dropdown, click on 'Search More' (it opens
a dialog), and in the dialog, try to save the current search in
the searchview's favorite menu.

Before this rev., it tried to retrieve the context of the active
view in the closest instance of a ViewManager-like widget in the
SearchView's ancestors.

First, it is wrong as in the given scenario, the requested context
is actually the one of the list controller in the dialog, not the
one of the form controller in the background.

Second, it produces a crash in Studio, when trying to save filters
in the dialog opened by clicking on 'Search More' on the groups
many2many field in the sidebar.

This part of the code can't be tested in this version, but tests
will be added in master.

Fixes #23293
2018-03-06 09:06:45 +01:00
Lucas Perais (lpe) 31ad2aa31e [FIX] crm: avoid timezone date change to mess with dashboard stats
Have your OS be in Vancouver with time = 15:59:00
We are on day X
Have a next activity on a lead, scheduled for today
At 15:59:00 the next activity is not overdue

Before this commit:
Past 16:00:00 the next activity becomes overdue
This is because 16:00:00 is 00:00:00 in UTC (+8 hours)
And the next activity is scheduled for day X
But in UTC, we just passed at day X+1
Hence, the next activity being overdue

After this commit:
The next activity is not overdue, since we are actually on day X

OPW 1815323
2018-03-06 08:58:06 +01:00
Christophe Simonis 2534bd19fb [MERGE] forward port branch 9.0 up to 6deed451ee 2018-03-05 18:50:51 +01:00
qdp-odoo 6deed451ee [FIX] account: fix the runbot after commit 0e881fcd3a
The previous commit forbids to change the currency of a company having accounting entries, but there are some created by demo data and some tests were trying to set a different currency (to set up a fix environment). So in order to allow that in tests, we do it via a SQL query directly
2018-03-05 17:39:10 +01:00
Martin Trigaux 8b119e2ae9 [FIX] base: skip failed autovaccum
This patch prevents bugs fixed at 5d463d2 to block the database.
It was preventing the autovacuum to properly clean old records.
Failing to unlink (may have various different reasons) should not block the
autovacuum to try on other models

Closes #23455
2018-03-05 16:03:01 +01:00
Christophe Simonis 1bfe147f89 [MERGE] forward port branch 9.0 up to 0e881fcd3a 2018-03-05 15:00:56 +01:00
qdp-odoo 0e881fcd3a [FIX] account: forbid the change of currency_id if the accounting app has already been used 2018-03-05 14:50:22 +01:00
len-odoo e710e5df7a [FIX] web: show error when trying to export a report with more than 256 columns
If the user tried to generate a report with more than 256 columns,
he would get a traceback instead of an error message.
Furthermore, if only one measure was selected, then the check was not done
and the user would also get a traceback.

opw-1816931
2018-03-05 12:56:27 +01:00
Christophe Simonis 554afff3ac [MERGE] forward port branch 9.0 up to b8824913a7 2018-03-05 10:38:02 +01:00
Lucas Perais (lpe) 698dffcef0 [FIX] website_sale: avoid duplicated Thanks message
Configure a thanks message on a payment acquirer which has no automatic confirmation (none value)
(The wire Transfer will do)

Make a website sale with that acquirer

When arriving on the confirmation page on the website:

Before this commit:
The thanks message was duplicated: one at the top, just under "transaction is waiting a manual confirmation"
and one at the bottom, where the actual transaction status is displayed

After this commit:
The thanks message just appears at the bottom location

OPW 1787799
2018-03-05 09:06:56 +01:00
Odoo Translation Bot 3527bc004c [I18N] Update translation terms from Transifex 2018-03-04 00:58:51 +01:00
qsm-odoo 80f97fbd19 [FIX] website_slides: load viewer for app's iframes only
The website_slides JS was working on all iframe in all pages while it
should only affect its own ones, which contains a PDF document.
2018-03-02 18:13:22 +01:00
dduarte 99a3ba631e [CLA] PromptEquation / OdooGap signs CCLA
Closes #19223
2018-03-02 17:02:54 +01:00