Commit Graph
115219 Commits
Author SHA1 Message Date
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
Xavier-Do 935e4f6a25 Task: [mail] clean chatter.
Remove "always" tracking support
Change greay background logic
2018-01-19 10:06:42 +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 Matthieu 4a82e3d4c6 [REM] mass_mailing/website_crm_partner_assign: remove duplicate code 2018-01-19 09:57:20 +01:00
Christophe Matthieu cf209210db [REF] tests_new_api:remove duplicate test 2018-01-19 09:57:20 +01:00
Christophe Matthieu 87eb269d93 [REF] qweb: remove deprecated attributes 2018-01-19 09:57:20 +01:00
Christophe Monniez 48b967fde0 [FIX] web,website,tests: fix typo in test tags
This typo prevented two tests to run.
2018-01-19 09:06:09 +01:00
Alexandre Kühn a87d761fdb [IMP] core: menu tip ux/ui improvement
We would like to make the "no item found" screens more appealing.

Before this commit, it shows a small help tip in the top-left
corner of the screen, just below the "Create" button.

With this commit, these help tips have been replaced by onboarding
screens, which consist of a picture and some text below, both of which
are horizontally centered.

The texts have been slightly changed, so that they are shorter and clearer.

Considered modules:

(A)
    account,
    account_asset,
    account_budget,
    account_test,
    account_voucher,
    analytic
(B)
    barcodes,
    base,
    base_automation,
    board
(C)
    calendar,
    contacts,
    crm
(D)
    delivery
(E)
    event
(F)
    fleet
(G)
    gamification,
    google_drive
(H)
    hr,
    hr_attendance,
    hr_contract,
    hr_expense,
    hr_gamification,
    hr_holidays,
    hr_payroll,
    hr_recruitment,
    hr_timesheet
(I)
    im_livechat
(L)
    l10n_fr_sale_closing,
    link_tracker,
    lunch
(M)
    mail,
    maintenance,
    mass_mailing,
    membership,
    mrp
(N)
    note
(P)
    payment,
    point_of_sale,
    post_mercury,
    pos_restaurant,
    product,
    project,
    purchase,
    purchase_requisition
(R)
    rating,
    repair,
    resource
(S)
    sale,
    sale_timesheet,
    sales_team,
    stock,
    stock_account,
    stock_landed_costs,
    stock_picking_batch,
    survey
(U)
    utm
(W)
    web,
    website,
    website_blog,
    website_customer,
    website_event_track,
    website_forum,
    website_quote,
    website_sale,
    website_sale_digital,
    website_slides
2018-01-18 21:43:29 +01:00
stefanorigano 1f1c5f62c7 [ADD] web: empty_states, add pictures
Add 3 pictures to illustrate empty states across several modules.
Width 120px,  variable height.
2018-01-18 19:17:17 +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
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
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
Christophe Monniez ad7bf6b9c9 [REM] config, loading: remove test-commit and test-report-directory
As there are few use cases for the --test-commit and --test-report-directory
options, they are removed.
2018-01-18 13:27:33 +01:00
Christophe Monniez b356b19033 [IMP] tests: Add the possibility to tag tests
Purpose: When running tests, all the tests for the installed/updated
files are done. This commit adds a 'tagged' decorator that can be used to
tag tests. Combined with a new 'test-tags' CLI option, it adds the ability
to filter which tests are executed. For example, @tagged('slow') will
add a tag 'slow' to the test. The CLI option 'test-tags="slow"' will
only run tests tagged 'slow'.

One can use prefixes to select cases with tags.
'+' or no prefix means that the tests tagged with this tag are selected
for execution. '-' prefix will exclude the tests tagged with this tag.
Exclusion takes precedence over inclusion.

Also, by default, all Odoo tests cases are tagged 'standard' and with
the technical name of the module.
This means that when selecting tests with the 'test-tags'
parameter, if '-standard' is not specified, all tests tags are
going to be executed.
When tagging tests, one can remove such automatic tag by prefixing the
tag name with '-'. E.g. @tagged('-standard') will remove the standard
tag from the test.

Another example, if one wants to test the 'sale' module alone,
even without adding any 'tagged' decorator thos tests can be selected
like that: --test-tags="sale"

Tests are selected or deselected using a TagsSelector. When instanciated,
 a string is passed with comma separated tests selectors like
'+slow,-standard'. When the 'check' method is called  with a test as argument,
it returns True or False if the test has to be executed or not.
2018-01-18 13:20:37 +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
Yenthe V.G 40998a4ded [CLA] OdooExperts signs CCLA
Company renamed, was Bas Solutions
Closes #22324
2018-01-18 09:39:44 +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
jem-odoo 079e1a0c31 [IMP] project_timesheet_holidays: better log message when test fails
For some unknown reason (for now), this module tests fails when comparing
generated timesheet number and leaves duration (in days).
By improving the log message, we can have more informations to understand
why the failure happens 'randomly'.
2018-01-17 14:13:23 +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 e3333d5e07 [IMP] mail: chatter creation message in formview
Before this commit, when we create a new object (e.g. task, product, ...),
the part of the form for the chatter was blank.

After this commit, it displays the chatter with a single temporary message
'Creating a new record...'

This message is only visible by the user that is creating the task, and goes away
when saving the newly created task. Any interaction with the chatter (buttons and
widgets at the top of the chatter, including the message itself) are disabled, so
that no interaction from the user is possible.
2018-01-17 11:46:20 +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
Thibault Delavallée 175671c59c [FIX] website: correctly propapate field renaming
At commit faf6165e03 some configuration fields have been
renamed as config field naming has been hardened. However renaming
has not been properly propagated through the code. This commit
fixes that.
2018-01-17 10:14:39 +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