Commit Graph
109254 Commits
Author SHA1 Message Date
Christophe Simonis 8e38a3d069 [MERGE] forward port branch 9.0 up to ea879956b1 2018-01-26 13:17:23 +01:00
Christophe Simonis ea879956b1 [FIX] pad: allow to create records with unknown fields 2018-01-26 12:44:18 +01:00
Jairo Llopis 055bac5fcc [FIX] website: Form editor addon is enterprise
Introduced at f90290d1

Closes #22370
2018-01-26 11:09:46 +01:00
Christophe Simonis 9620989501 [MERGE] forward port branch 9.0 up to 222cadda41 2018-01-25 20:24:39 +01:00
Christophe Simonis 222cadda41 [FIX] base: sort ir.actions.act_window.view records deterministically 2018-01-25 20:20:09 +01:00
Nicolas Martinelli 842e02020b [FIX] purchase: change invoice date
- Main currency: USD
- Create a PO in EUR
- Create an invoice from the PO
- The invoice is in USD and the exchange rate is applied
- Change the currency to EUR

The conversion is not applied anymore.

The original issue was that changing the date would overwrite any amount
modified in the invoice. Actually, the dependency on the date is not
really necessary. Indeed, this is supposed to help enconding invoices,
but it is likely that:
- If the PO is issued in a currency A, the bill received is in currency
  A.
  => no conversion necessary (solved from 11.1).
- If the PO is issued in a currency A and the bill received is in
  currency B, the exchange rate used by the vendor is different from
  ours.
  => manual corrections are necessary

Therefore, we remove the dependency on the date for the amount
recomputation. However, we still use it in the onchange. This way:
- the amount estimated should be close to the amount requested
- we avoid unexpected recomputation of amounts

Introduced with d8112b0238.

opw-805926
2018-01-25 17:04:33 +01:00
Nicolas Lempereur b27abee396 [FIX] web_editor: ready when translations ready
$('web_editor.base').ready() returns a deferred that:

- wait at least for $(document).ready()
- wait at least for require('web.ajax').loadXML()
- at most once starts translations configuration

But there is an issue since there is unexpectedly no reference to the
translations, whilst it should have also been ready when ready was
resolved.

This commit keep the reference so translations can be used after
$('web_editor.base').ready() is resolved as it was before 7dfdfa0103.

note: in 11.0 it should be solved with 29729769 (so fix is for [10,11[)

opw-804148
closes #22522
2018-01-25 15:58:32 +01:00
qsm-odoo 25849e9186 [FIX] web_editor: properly allow formatting text (normal/header 1/...)
Sometimes the formatting buttons had no effect or formatted more than
they should (like a whole column when triple clicking on a paragraph
only). This was because of the `listBetween` function implementation.
This is supposed to return all the nodes between one element and another
one... but the logic is wrong without saying from which *point* to start
and which *point* to end. For example, when asking the list between an
element and its parent, the result is very wrong as there is no way to
go from the beginning of an element to the beginning of its parent using
the `walkPoint` function as the `listBetween` function is doing.

Ideally, the function should be entirely fixed but this can be tricky.
For now, the function is just extended to allow to specify points
instead of nodes, and those are used by the `formatBlock` function to
solve the current problem.
2018-01-25 14:36:47 +01:00
qsm-odoo fb81c331f8 [FIX] web_editor: fix double Shift + Enter
Pressing Shift + Enter twice was buggy because of small refactoring
made by https://github.com/odoo/odoo/commit/c227b8fd88e0ed635a8e807501b559b46fee7786#diff-cc5180b5ec2395c1df5c4e475aff43fbL416

opw-806003
2018-01-25 13:58:59 +01:00
Romain Derie edac5550ec [FIX] website_blog: copy dict correctly
The 'copy_vals' dict would refer to the same 'vals' dict since list are
mutables. This was not the expected behavior.
2018-01-25 13:09:31 +01:00
qsm-odoo 2fad2e43b8 [FIX] web_editor: solve all triple-click issues
... hopefully.

This *must* be forward-ported.

Depending on the browser, the triple-click behavior is different. This
is especially problematic on Chrome, where blank characters at the start
of the neighbor of the clicked element are selected.

A weak attempt to solve that was made by commit https://github.com/odoo/odoo/commit/b85bd358234684974f9af63bc5f28cfabb527767

This commit hopes to solve all the issues once and for all by fully
reimplementing the triple-click for all browsers. The concept is simple:
when a triple-click occurs, select the whole *inner* content of the
deepest DOM *element* that was clicked.
2018-01-25 12:44:36 +01:00
qsm-odoo 78a556601e [FIX] web_editor: prevent crash when dropping snippets
For some unknown reasons, the editor sometimes crashes when dropping a
snippet. As a temporary fix, the non-critical line that causes the
problem is try/catch protected by this commit.
2018-01-25 11:11:34 +01:00
Christophe Simonis efd300156b [MERGE] forward port branch 9.0 up to d29c2dbbdd 2018-01-24 17:22:44 +01:00
Lucas Perais (lpe) d29c2dbbdd [FIX] account: no payment terms on refund
In the case where:
create an invoice with payment terms that contains at least 2 term lines
Validate
create a refund by clicking cancel and reconcile

Before this commit, the refund move lines were wrongly created and reconciled with the invoice's move lines

After this commit, since payment terms are irrelevant on refunds, we set it to false and the problem doesn't raise

OPW 804752
2018-01-24 16:41:42 +01:00
Lucas Perais (lpe) adad192cc0 [FIX] account: reconciliation on payment terms
The case: create an invoice of 2000 euros. Payment terms have been configured as:
1) fixed amount 150, 0 days after invoice date.
2) fixed amount 200, 10 days after invoice date.
3) fixed amount 200, 20 days after invoice date.
4) balance, 30 days after invoice date

Before this commit, when issuing a payment of 150 at day 0, that payment got reconciled with the balance line.

After this commit, the payment is reconciled with the right payment term line

OPW 805006
2018-01-24 16:38:41 +01:00
Lucas Perais (lpe) 7dd3ab9c55 [FIX] website_sale: pending message do not disappear
On the payment confirmation page, when the payment is still pending.

Before this commit:
the user friendly message disappeared and a warning icon took its place

After this commit, the warning icon is prepended to the message.

OPW 787799
2018-01-24 16:18:02 +01:00
Romain Derie 3c998acaaf [FIX] website_blog: archive multiple blog.post throws a server error
Step to reproduce:
  - Go to 'Blog' > 'Blog Posts' in the 'Website Admin' module
  - Select several blog.post on the list view
  - Click on 'Archive' in the 'Action' dropdown

This will throw a server error since write() is overriden for blog.post and
do an ensure_one()

This commit closes #22208
2018-01-24 15:48:49 +01:00
Nicolas Martinelli 34bfadb2f2 [FIX] web: suggested date
- Set the OS to a GMT- timezone (e.g. 'America/Los Angeles')
- Set the format of the date to '%d/%m/%Y'
- Go to 'Account > Adviser > Journal Entries'
- Type '02-01-2018'

The suggested date is 31/01/2018.

Setting the moment object as UTC will lead to a conversion of the date
to the OS timezone when calling `toDate`, e.g.:
Mon Jan 31 2018 16:00:00 GMT-0800 (PST)

UTC should only be used in case of datetime, not date.

opw-803466
2018-01-24 14:11:55 +01:00
Christophe Simonis c0fa5228d8 [MERGE] forward port branch 9.0 up to 779afb7ac5 2018-01-24 11:50:35 +01:00
Martin Trigaux 0ac6043ec7 [FIX] base: bad back-port
53e221fc was intended for 11.0 and backported too quickly in 10.0

Remove fields that do not exist yet
2018-01-24 11:39:56 +01:00
Sergei Ruzki 53e221fc16 [FIX] base: adding BYN to currenciest list
From 2016-07-01 BYN is new currency sign for Belarus
See https://en.wikipedia.org/wiki/Belarusian_ruble

BYR is no longer used.
Kept for backward compatibility and stability reason

Closes #22307
2018-01-24 11:19:27 +01:00
Sergei Ruzki 1ac7257dd2 [CLA] signature for sergeiruzkiicode
Done at #22307
2018-01-24 11:18:52 +01:00
tbe-odoo bc69b47073 [FIX] http: Implicit session deactivation -> Explicit destruction
- Replace the implicit session deactivation with explicit destruction.
2018-01-23 16:21:10 +01:00
Nicolas Martinelli 822a5e9085 [FIX] account: default FY day and month
In any piece of code, execute the following:
```
self.env['account.config.settings'].create({})
```
It overwrites the values of `fiscalyear_last_day` and
`fiscalyear_last_month` to 31 and 12.

Setting a default value on a related field will automatically write
these values on the related.

opw-805205
2018-01-23 14:51:51 +01:00
Florent de Labarre b3b8a471cc [FIX] stock: To avoid singleton error
In this way, it ensures that a single record is used when calling
the function _get_move_values

opw:806668
2018-01-23 09:35:42 +01:00
Lucas Perais (lpe) 296c5a2106 [FIX] point_of_sale: automatic reconciliation with returns
In the case where:
1- Do an order on the pos selling a product A (amount = 10)
2- Do another order returning a certain quantity of A (with a quantity < 0)
3- Do a third order selling something else (amount = 5)

Before this commit, the account move lines of the payment move and of the sale move of operation 2 weren't reconciled
This was because the credit to the receivable account of the return was reconciled with the debit of the first operation,
leaving the debit of the payment of the return alone
(i. e. the lines number 1 & 3 & 5 were reconciled together, instead of 1 & 2 & 5, and 3 & 4)

We end up in a situation like this (at validation time)

	RECEIVABLE
D	|	C	||	OPERATION		|	Line Number
----------------------------------------------------------------------------
15	|		||	(1 & 3-Engaging Sale)	|	1
	|	10	||	(1-Payment)		|	2
	|	10	||	(2-Engaging Return)	|	3
10	|		||	(2-Payment Return)	|	4
	|	5	||	(3-Payment)		|	5

After this commit, we reconcile the returns for each order before reconciling other transaction chains
The fix is limited in its scope as the automatic reconciliation for the pos transaction is fairly recent
and a "nice to have"

OPW 787298
2018-01-23 09:23:42 +01:00
Lucas Perais (lpe) 779afb7ac5 [FIX] point_of_sale: pos manager should have unlink rights 2018-01-23 09:21:42 +01:00
Nicolas Lempereur 7a63d471ed [FIX] website_event_track: use event timezone
Depending on the location, on the website different timezone were used
to display tracks:

- in `Agenda` day date (as of saas-14): the current user timezone
- in `Agenda` track times: the event timezone
- in `Talks` subtitle: the event timezone
- in `Talks` tracks: the current user timezone
- in a track page: the first user (admin) timezone

With this change in all those instance the event timezone is used.

There is still a usability hindrance in the backend: the timezone used
when encoding track or event datetime is the browser timezone.

So if the browser is GMT+2 and the event is GMT+6, encoding a 4h00 time
would save it as 2h00 (in UTC) and display it on the website as 8h00.

This would make sense to encode these datetime in user timezone but
currently there is no framework option to do it.

opw-805358
closes #22427
2018-01-22 12:38:52 +01:00
Christophe Simonis aac9cd4ca8 [MERGE] forward port branch 9.0 up to 216edc206c 2018-01-22 11:18:14 +01:00
Florent de Labarre c5586134a3 [FIX] purchase: keep context
Modify the existing context instead of replacing it.

Closes #22400
opw-806661
2018-01-22 08:43:45 +01:00
Odoo Translation Bot ae6037e17a [I18N] Update translation terms from Transifex 2018-01-21 00:42:13 +01:00
jem-odoo 2cd74cdd0d [FIX] hr_expense: don't display confusing button
When adding line from expense sheet, you don't want to see
the header with action button, nor the stat buttons.

Closes #16996
2018-01-19 15:37:05 +01:00
qsm-odoo 216edc206c [FIX] web_editor: properly evaluate if a range is an image
The previous implementation apparently came from an old version
of summernote (see https://github.com/odoo/odoo/commit/d33086c03fc1a0882be38ae62989b7f72df20d3b).

This commits should improve it to handle all known cases.

See https://github.com/odoo/odoo/issues/20877
2018-01-19 14:02:24 +01:00
Atchuthan, Sodexis 171ce8fb2a [FIX] payment_authorize: Credit cards expiration date
- Fixes the validation for credit cards expiration date.

In the courtesy of @SodexisTeam
2018-01-18 15:21:18 +01:00
qsm-odoo f314cf0bb3 [FIX] web_editor: deleteContents when no selection
Changing the `deleteContents` method of the editor is tricky. This
commit however dares to add a behavior: if the range does not
represent a selection but only the cursor position and is then asked
to delete its content... it should not do anything as nothing is
selected.
2018-01-18 15:19:16 +01:00
qsm-odoo cdb2cf744f [FIX] web_editor: DOMElement used as jQuery element
The function receives a jQuery element most of the time but it
may receive a DOMElement in some cases.
2018-01-18 15:17:48 +01:00
Christophe Simonis ea700016dd [FIX] mail: give access to mail.message to notified users
Before this commit, users had only access to messages if they were
recipients. However, you can still be notified for messages your are not
a recipient; leaving you with notifications (needaction) on unreachable
message.
2018-01-18 14:28:25 +01:00
Maximilien Tantin 710ce85c31 [FIX] website_sale: fix wizard_checkout when only services
This commit display only 'Invoicing' if cart have only service.
Set website_sale_order variable to get right context of order.

This commit closes 22259
2018-01-18 14:13:23 +01:00
Jairo Llopis a92eba42b8 [FIX] website_form: avoid race condition
This fixes what is explained in https://github.com/odoo/odoo/issues/20821#issuecomment-358574349

 (PR #22330)
2018-01-18 11:43:53 +01:00
Nguyen Duc Tam 094c735f00 [CLA] Signature for nguyenductamlhp
Closes #22255
2018-01-18 09:56:17 +01:00
Yenthe V.G 40998a4ded [CLA] OdooExperts signs CCLA
Company renamed, was Bas Solutions
Closes #22324
2018-01-18 09:39:44 +01:00
Christophe Simonis e72eb4f38d [MERGE] forward port branch 9.0 up to 74b564cf8d 2018-01-17 18:00:05 +01:00
Jeremy Kersten 74b564cf8d [FIX] website_slides: dont show upload button for public user
This commit closes #15369
2018-01-17 15:37:58 +01:00
Christophe Matthieu 128656f6ea [FIX] website: space symbol is missing when compress html is enabled
Issue: when the qWeb compress rendered HTML for a better Google PageSpeed
result, some text fields are missing spacebar between fa icons and text,
and between some fields.
2018-01-17 14:50:15 +01:00
Swapnesh Shah 57e37d6629 [FIX] calendar: Made Start/End date required in meetings
This commit closes #22279 and closes #21979
2018-01-17 14:12:06 +01:00
Swapnesh 0690911d75 [CLA] signature for sswapnesh
Backport of 4e333607f1

CLA already signed in v11
2018-01-17 14:12:06 +01:00
Goffin Simon c05c2cc03c [FIX] hr_payroll: Unable to refund payslip
The function action_payslip_done has been overwritten in module hr_payroll_account.
Due to this overwrite, the function compute_sheet which creates the payslip lines
was called after the creation of the entries.

Then creating a refund payslip didn't create any entries.

opw:785033
2018-01-17 13:11:41 +01:00
Nicolas Lempereur 80f1d9ded6 [FIX] mail: reduce no sudo effect mark_all_as_read
The "Mark all read" button either set all messages as read, or if a
domain is given, filter messages on it.

But this filtering is also dependent on not doing sudo so odd
notification to which we would somehow not have any access would never
disappear in the unread number.

Adding a sudo is risky, so this changeset just modify the test on domain
since in most instance the domain is just an empty list (so: []).

The added test before this change would fail at the last assert ("mark
all read should conclude all needactions even inacessible ones").

opw-805185
closes #22277
2018-01-17 11:49:48 +01:00
Nicolas Lempereur 23a2bac3fa [FIX] hr_equipment: no technician subscribe in 9.0
In 9.0, an "Human Resources / Employee" see only hr.equipment for which
they are set as the "Employee".

But the code automatically subscribed the "Technician" because the field
name was named technically "user_id" which is automatically subscribed
by the system.

This led to a possible issue with read / unread message because of
feature that just happen by coincidence.

For 9.0 only (in 10.0 the field has been renamed technician_user_id and
access rules have been changed).

opw-805185
closes #22273
2018-01-16 15:09:45 +01:00
Nicolas Lempereur ef8cd11a6b [FIX] website{,_slides}: display date in locale
In 10.0 since 52f268d0 some parts such as the date/datetime widget are
adapted to the current locale and not just displayed in english.

But the dates in the slides module are always in english because they
don't wait for the locale to be loaded.

To wait for the locale, this commit also adds a reference localeDef on
the website.website module.

note: this fix is only for [10.0,11.0[, another fix must be done in 11.0

opw-804555
closes #22241
2018-01-15 16:31:19 +01:00