Commit Graph
114588 Commits
Author SHA1 Message Date
Nicolas Martinelli baaee5bf6b [FIX] website_sale_delivery: total on eCommerce
Make sure to reflect the order information.

opw-804374
2018-01-23 11:43:15 +01:00
Nicolas Lempereur 070babf7e2 [FIX] web: css long word breaking out kanban tile
When words are too long this may break out of a kanban tile and getting
everywhere.

This is not wanted and the content should be:

- hidden if overflown or
- long words should be wrapped or
- too long content should be ellipsed

The ellipsis is probably the best but this would affect the current
behavior (we would have to specify a max-height which unexpectedly
may be bothersome to currently existing data).

So breaking long words has been choosen in this change.

opw-806278
closes #22435
2018-01-23 11:04:40 +01:00
Nicolas Martinelli eaa73beaaa [FIX] project: add project_time_mode_id
When creating a new company, it was not possible to set the 'Project
Time Unit'.

Add the field in the settings and add a default value.

opw-805533
2018-01-23 11:03:18 +01:00
Aaron Bohy f68ad51520 [FIX] web: honor action's groupBy on reload
Let's assume an action with a 'group_by' specified in its context.
Unless another groupby is specified in the search view, the action
groupby must be used. For list views, it was only working for the
first rendering of the view. As soon as it was reloaded, the action
groupby was lost.

For instance, go to Project, click on a project in the dashboard
[the action has 'group_by': 'stage_id' in its context], switch to
list view [the list is correctly grouped by 'stage_id'], reload by
clicking on the view switcher -> the view isn't grouped anymore.

It was actually working by chance on other views because they have
specific handling of the groupby (e.g. the kanban view allows the
attribute 'default_group_by' on its arch), but by default, the
action groupby must always be used at each load/reload if there is
no other groupby specified.

This rev. restores the behavior of saas-15, before the new views.
2018-01-22 19:59:23 +01:00
Swapnesh Shah 16c6b520fb [FIX] sms: context is a dict not a callable
Closes #22433
2018-01-22 18:48:38 +01:00
Nicolas Lempereur bb833825f2 [FIX] web: set default you/all option flipped
In 60d9f6fe the ir.default replaced uses of ir.values.

But the [ir.default].set user_id has opposite meaning to
[ir.values].set_default for_all_users.

This was not taken into account when adapting javascript in 791152a87
and this commit fixes that.

opw-805871
closes #22437
2018-01-22 17:40:56 +01:00
Christophe Simonis 950d9b2369 [MERGE] forward port branch saas-16 up to dfe7f00e78 2018-01-22 16:38:01 +01:00
tbe-odoo dfe7f00e78 [FIX] stripe: Fix when no access token set
- When no access token is set, the stripe implementation uses a the access token the string 'undefined'.
2018-01-22 15:03:19 +01:00
Christophe Simonis a3d3e5e7fe [MERGE] forward port branch saas-15 up to 50d87ae81b 2018-01-22 14:42:09 +01:00
Christophe Simonis 50d87ae81b [MERGE] forward port branch saas-14 up to 3d673b5900 2018-01-22 13:33:58 +01:00
Martin Geubelle 8b5440c2b4 [FIX] mass_mailing: open duplicate in edit mode
Since the new views, the flag `initial_view` on an action has been removed.

There were in fact multiple ways to do the same thing (open a form view in edit
mode directly with an action) (the supported option is `form_view_initial_mode`
in the context) ; the options have been cleaned up a little bit.

This was the only remaining recurrence.

Closes #22353
2018-01-22 13:14:44 +01:00
Christophe Simonis 3d673b5900 [MERGE] forward port branch 10.0 up to aac9cd4ca8 2018-01-22 12:32:40 +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
Aaron Bohy ca323c51b2 [FIX] web: Kanban: quick create in folded column
With attribute 'on_create="quick_create"' on the arch's root node,
kanban views open the quick create widget in the first column when
the user clicks on 'Create' (in the control panel), if the view
is grouped and if there is at least one column. However, this
column may be folded.

Before this rev., the quick create was inserted into the folded
column, which didn't look amazing. This rev. first toggles the
column before inserting the quick create.
2018-01-22 08:32:57 +01:00
Nicolas Martinelli c4b9c51abf [FIX] account: configuration bar
- Create a new company
- Connect your user to this company
- Do not choose a chart of accounts
- Go in accounting
- Select a step in the config bar (Fiscal Year, Chart of Accounts,
  Initial balances)

A warning message is raised : "No miscellaneous journal could be found.
Please create one before proceeding."

However, we should be able to enter fiscal year step. Moreover, the
error message is unclear.

opw-804760
2018-01-22 08:21:24 +01:00
Nicolas Martinelli 8c3fb9316f [FIX] website_sale_delivery: update total
Changing the delivery method doesn't update the total of the order.

opw-804374
2018-01-22 08:20:51 +01:00
Nicolas Martinelli e014ee9a96 [FIX] payment: missing support
The `website_payment` route has not been implmented following the
payment refactoring. Deactive it for now.

opw-787897
2018-01-22 08:20:51 +01:00
Odoo Translation Bot c5749ef2e3 [I18N] Update translation terms from Transifex 2018-01-21 04:24:31 +01:00
Odoo Translation Bot ae6037e17a [I18N] Update translation terms from Transifex 2018-01-21 00:42:13 +01:00
Christophe Simonis f98470e6cf [IMP] project: read project.task related fields using current user
This avoid copying the cache during computatio
2018-01-19 17:26:25 +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
Yannick Tivisse 628406156b [FIX] l10n_be_hr_payroll: Add missing field dependency on compute method 2018-01-19 15:20:01 +01:00
Nicolas Lempereur f3449fa0db [FIX] account: nbsp entity wish for bad translation
` ` was translated erroneously several times in arabic,
turkish and chinese (in module account, account_reports, ...).

This is solved on transifex and will be available on next translation
updates.

This commit disable the translation of it in the location it was most an
issue.

opw-803248
closes #22373
2018-01-19 14:13:35 +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
Christophe Simonis bd3869bd3a [FIX] core,google_drive: python3 compatibility 2018-01-19 13:42:26 +01:00
jem-odoo 088b6c3857 [FIX] project_timesheet_holidays: correctly remove timesheet
When validating a leaves from a leaves type "generate timesheet", some
timesheets are generated by the system. When refusing the holidays, we
want the timesheet to be deleted. It does not seem to be the case before
this commit.
Also, generated timesheet has a label containing 'False' if the holiday
description is not set.

Closes #22140
2018-01-19 13:14:59 +01:00
Simon Lejeune b95cabef0b [FIX] stock: cancel moves before creating the extra ones
- enable the sublocations
- create an immediate transfer
- add a move of product 1
- save
- add a move line on the move
- create a new move of product 1 without adding any move line to it
- validate
- traceback (record has been deleted)

This is caused by the fact that we loop on `moves` and the
`_create_extra_move` can trigger a merge of move contained by `moves` ;
according to the order of the record in the recordset, we can try to
access a field on a now unlinked move.

Fixes #22356
2018-01-19 13:00:55 +01:00
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
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
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