Commit Graph
114556 Commits
Author SHA1 Message Date
Christophe Simonis 2f95cfb8ed [MERGE] forward port branch saas-16 up to f99c4f2b48 2018-01-19 12:43:58 +01:00
Christophe Simonis f99c4f2b48 [MERGE] forward port branch saas-15 up to 0c54862cbf 2018-01-19 11:30:35 +01:00
Lucas Perais (lpe) 56052dee60 [FIX] web,board: a kanban button action should trigger that action
Before this commit, when having a kanban within a dashboard and clicking on an action button,
the action was not triggered, instead, the board form view triggered 'save' on the board model
leading to a server side traceback

After this commit, the action button triggers the demanded one and only this one.

OPW 805707

closes #22191
closes #22371
2018-01-19 11:26:52 +01:00
Nicolas Martinelli fdb585caf5 [FIX] hr_timesheet: access to analytic lines
- Create an invoice with an analytic account on a line
- Validate it

A read access error occurs.

The rule is too restrictive: reading should be allowed for users.

opw-805533
2018-01-19 10:31:45 +01:00
Aaron Bohy ac0e452890 [FIX] web: Kanban: create several records on slow network
Before this rev., it crashed when the user used the quick create
to create several records (very quickly, or on a slow network),
e.g. on crm.lead (there must be a date field on the kanban record
to reproduce the crash).

The crash occurred when the 'read' RPCs for the created records
return misordered. For instance:
  1) 'name_create' record 1 (called and returned)
  2) call 'read' for record 1
  3) 'name_create' record 2 (called and returned)
  4) call 'read' for record 2
  5) 'read' for record 2 returns
  6) 'read' for record 1 returns

At step 5, the kanban column was updated with the new state, but
this state already contained record 1, which wasn't fetched yet.

This rev. ensures that the created records are added to the state
once they are fetched and ready to be displayed, not before.
2018-01-19 09:57:41 +01:00
Christophe Simonis 0c54862cbf [FIX] mail: move and adapt test
Move tests to TestCase where records are created (group_pigs)
2018-01-18 19:09:49 +01:00
Christophe Simonis 3e197bf000 [MERGE] forward port branch saas-14 up to 4887a75e2c 2018-01-18 16:27:43 +01:00
Goffin Simon 66a95d91aa [FIX] account, sale: Incorrect tax description in SO/invoice with tax group
Displaying the amount base for tax group with several lines in sale or invoice
report is too complex to manage. For example before the fix, using a group tax GT
with two excluded taxes(T1, T2) displayed the sum of the base of T1 and the sum of
the base of T2 which was completely wrong. But for a GT with an included tax affecting the amount
base T3 and an excluded tax T4, it 's not possible to display the common amount base for the tax group
because the base of T3 is not equal of the base of T4.

opw:804014
2018-01-18 16:14:27 +01:00
Pierre Masereel 9954d242d4 [FIX] l10n_fr_pos_cert: encoding utf8
complete fix in rev 529a8f5aa8
2018-01-18 16:09:56 +01:00
Nicolas Lempereur b8c8eaa02f [FIX] web: error image when no kanban image
Introduce back part of `formatBinary` that was reverted with 7813a8e7.

When an image is unset, the value was `false` which would end up with a
bin_size of `NaN Bytes` which would end up displaying an error image
with source `data:image/png;base64,NaN Bytes`.

This commit get back a previous behavior so the bin_size when the
attachment does not exist is an empty string (so: '').

opw-805542
closes #22348
2018-01-18 15:53:37 +01:00
Lucas Perais (lpe) 2c0793d981 [FIX] website_portal_purchase: allow user to see relevant PO
Before this commit, on the portal the user could see only the count of PO
not the po's themselves.

After this commit, he can.

OPW 805080
2018-01-18 14:39:49 +01:00
Simon Lejeune 6ef460b6a7 [REF] stock, mrp: remove constraint, add onchanges
We added a constraint in [1] to improve the usability of introducing
tracked move lines in the system. However, this contraint proved to be
too costly (trigger multiple time during the validation process, never
called in batch as it is set on the model at the end of a o2m).

We replaces the constraint by checks on the validating process or by
(non-blocking) onchanges.

With these changes, validating the receipt of 3000 tracked move lines
goes from 17 minutes to around 4.

[1] 482407464a

opw-803887
2018-01-18 14:37:13 +01:00
Christophe Simonis 4887a75e2c [MERGE] forward port branch 10.0 up to ea700016dd 2018-01-18 14:30:51 +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
Géry Debongnie 1bb6887bb6 [FIX] web: fix crash when creating record with too many default values
When creating a record with many default values, it could happen that
the number of ids returned by the default get (or onchange) exceeds the
limit for the form view.

For example, we can see the issue in the expenses list view.  We can
increase the limit in the pager, to a value higher than 40.  Then,
clicking on select all, then on 'Submit to manager' in the action menu
will result in a traceback.

The Submit to manager action will trigger a new action with a context key
'active_ids' with a large number of ids.  After that, the web client
will execute the server actions, which will return a new action with a
context key 'default_expense_line_ids' with a bunch of ids.  Then, it
will attempt to create a form view.  This will call the
makeDefaultRecord method in the basic model.  This method will generate
the commands for the one2many, for all ids, but will only load the 40
first sub records.  After, it will attempt to apply the onchanges, with
some code that assumes that all operations of type 'ADD' correspond to a
local datapoint.

In this commit, we fix the code to properly work with operations of type
ADD with a res_id, but with no id. In that case, we simply generate a
command 'LINK_TO', since the value has not been changed.

opw 804370
2018-01-18 14:13:34 +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
Goffin Simon 07240a9369 [FIX] account: Error when duplicating a purchase invoice
In multi company, when a user 1 creates a purchase invoice I in company A.
The responsible of the invpoice I is user 1. But if the user 1 changes his company from
company A to company B. Then it raised an access error when a user 2 in company A
tries to duplicate the invoice I because the responsible is in an other company.

Now the responsible is not duplicated to avoid access error.

opw:805573
2018-01-18 14:08:45 +01:00
Nicolas Martinelli 13f5775451 [FIX] stock: source document
Make the source document editable again depending on the picking state.

opw-805131
2018-01-18 12:28:15 +01:00
jem-odoo c2b0c28bfa [FIX] hr_timesheet: extract common class tests
Others test classes extends the setup method, and break the
tests enviroment configuration. Extracting the global setup
in a common class is more modular and will make the enterprise
tests green again !
2018-01-18 12:14:26 +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
qdp-odoo 6e9163150e [IMP] account: make currency_exchange_journal_id field visible in settings 2018-01-18 08:00:45 +01:00
Christophe Simonis e72eb4f38d [MERGE] forward port branch 9.0 up to 74b564cf8d 2018-01-17 18:00:05 +01:00
Nicolas Lempereur 529a8f5aa8 [FIX] l10n_fr_certification: py3 json.dumps typo
In python3 json.dumps acts differently:

- encoding parameter is not available
- output is unicode (in python 2 it was bytestring if only ascii or
  unicode otherwise)

This commit adapt string types so getting hash for the certifications
works for python2 and python3 by having unicode up to the sha.

Since ensure_ascii is set on json.dumps, these things are not risky
since uncode and bytestring can be combined without encoding error.

opw-804561
closes #22301
2018-01-17 16:26:31 +01:00
qsm-odoo 59e1bdff22 [FIX] web_editor, website: properly clean snippets before saving
/!\ Partial backport of https://github.com/odoo/odoo/commit/0a31cb9b4ae461119ecafdd05c5b979621ffb039
/!\ Should not be forward-ported

Before the websitepocalypse introduced in 11.0 (saas-17), when saving a
page in the editor, every `cleanForSave` method of snippet options were
called, even for snippet options which were not initialized (so if a
snippet was left unchanged before saving, the related `cleanForSave`
methods were called anyway). This behavior was bad code and did not make
much sense and was so removed with the websitepocalypse
(see https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8#diff-4c580abda3220e45c6b3f6bdcf77c733L415)

Unfortunatly, the behavior was necessary given the states of our snippet
options. Indeed, for the "latest posts" snippet, the `cleanForSave`
method removes the entire snippet content (as it is dynamically loaded).
The dynamic loading is performed by the snippet *animation*... and
removing the dynamic content should logically be done by the animation
too... which is the case. The problem is that animations are not stopped
before the editor is saved. This behavior was only implemented in
saas-11.1 (for future version 12.0) with commit https://github.com/odoo/odoo/commit/0a31cb9b4ae461119ecafdd05c5b979621ffb039

As a stable fix for 11.0, part of the mentioned commit is backported
here and some specific `cleanForSave` will be reviewed as animations if
necessary. Note: `cleanForSave` made useless by this commit are left
anyway as this is a stable fix.

See https://github.com/odoo/odoo/issues/22089
2018-01-17 15:55:36 +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
Rémi Rahir 342c57710f [FIX] doc: iap
Corrected a code example that could lead to think that we can capture a non-integer amount of credits.
Added information concerning the commission that Odoo takes as a broker in IAP (25%).
Added information about the new functionality.
2018-01-17 15:13:14 +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
Géry Debongnie ca2060048e [FIX] web: fix issue with multiple pages and relational fields
When fetching x2manys in a x2many, the basic model did not properly sort
the internal data structure before fetching the data.  This is usually
not an issue, except when we have an order which is different from the
order of the res_ids.  In that case, it can cause crash in some
conditions, because the results from the fetchx2manybatched were applied
to the wrong datapoint.

To reproduce this issue, some specific conditions needs to be met. I
think that it is easier to refer to the test, instead of trying to
explain that.

In this commit, we properly sort the data at the correct place. Note
that this probably solves a bunch of other related issues, caused by the
fact that the internal structure was corrupted.
2018-01-17 14:26:37 +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 Martinelli 00039883c1 [FIX] web: timeout of test suite
A timeout of 300 seconds is not enough anymore to run all tests on some
runbots (e.g. runbot12) or Odoo.sh installations. The duration on these
servers is often slightly over 300, leading to a failing test.

This increase is logical since unit tests are added on a regular basis.

opw-805418
opw-804621
2018-01-17 11:54:08 +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
Alexandre Kühn 290e247e82 [FIX] web: remove dead code
Cleaning dead code from these commits that have been reverted:

41fe7f9d1113d026b226b136b4477aaaf9f1f638#diff-54fd886cc58f994ad518ee72df4d3edeR50
2a5488619da22cfd901963dd141e722b195e82ab#diff-f96b339a9374f74489f1f98755e9787bL9253
41fe7f9d1113d026b226b136b4477aaaf9f1f638#diff-86d6d41b5bb7499bf055258d05549d59R3111

With these final changes, we hope to stop the many issues that have occured with
binary fields, from these commits:

255e8ca3d9
7813a8e714
41fe7f9d11
2a5488619d

What remains is the format of binary fields in list views without widgets,
which shows the bin_size instead of the base64 string representation...

... Rest assured, the computation is in JS, so there are no 'bin_size'
shenaningans!
2018-01-17 11:23:23 +01:00
Florent de Labarre a63f6092fc [FIX] product: activity filters on products
Add missing activity filters on products.

Closes #21237
opw-804137
2018-01-17 10:49:04 +01:00
Lucas Perais (lpe) 5140d3d10f [FIX] google_drive: adpating to new framework JS
The google_drive module has not been converted to the new Odoo Javascript framework, and hence was not even started.
This commit corrects that.

The logic is essentially the same as in previous versions

The test implemented contains an inevitable hack that makes sure no other test is affected,
in particular by the new route that the module calls (and that any Sidebar will call)

OPW 801145

closes #21993
2018-01-17 09:35:32 +01:00
Pierre Rousseau bd760f0746 [FIX] sms: use correct format for sending sms
To send a sms, the number must be in international format. If phone_validation is installed and phone_international_format is set to no_prefix, the number is not in international format.
2018-01-17 09:28:49 +01:00
Pierre Rousseau 637bfc2862 [FIX] phone_validation: fix behavior with prefix option
This commit fixes the behaviour of the phone_format function when phone_international_format is set to prefix.
2018-01-17 09:28:49 +01:00
Goffin Simon 733ce266ef [FIX] base, hr_holidays: Printing leaves by department report with no logo
When calling the function report_action from write_company_and_print_report,
it failed because all the required data from the transient model "hr.holidays.summary.dept"
were lost.

opw:803051
2018-01-17 09:13:35 +01:00
Martin Trigaux 22e458775a [I18N] l10n_ch: translate l10n_ch
Export source terms that are not l10n_multilang related

Courtesy of Frederic Clementi

opw-804477
2018-01-16 17:02:50 +01:00
Goffin Simon 73c9b3d014 [FIX] mail: Cannot send new message from Event Track
When the Speaker address is False, it crashed.

opw:805361
2018-01-16 15:58:41 +01:00
Christophe Simonis f05b2b1200 [MERGE] forward port branch saas-15 up to 5e474bb3f9 2018-01-16 15:32:10 +01:00
Yenthe V.G 37849225fe [FIX] base: add Timor-Leste phone code
Closes #22272
Fixes #10596
2018-01-16 15:29:54 +01:00
Christophe Simonis 5e474bb3f9 [MERGE] forward port branch saas-14 up to 64dbc5fbb9 2018-01-16 15:22:32 +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
Christophe Simonis 64dbc5fbb9 [MERGE] forward port branch 10.0 up to ef8cd11a6b 2018-01-16 13:55:47 +01:00
Aaron Bohy cae3364783 [FIX] mail: Activity systray: missing context
Before this rev., terms in the activity systray dropdown weren't
translated because the user_context (containing the user language)
wasn't passed.

Complete c591e4e6

opw-805431
2018-01-16 11:22:26 +01:00
Lucas Perais (lpe) aa08bc58e6 [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-16 11:15:48 +01:00
Arnold Moyaux b609743dfc [FIX] mrp: Unbuild what has not be build
Since commit 55c0221e38 it is
not possible to unbuild what has not been build by ourself.

However we won't block the customer and let him unbuild everythings.
2018-01-16 09:30:34 +01:00