Commit Graph
117975 Commits
Author SHA1 Message Date
Aaron Bohy 973205f21d [IMP] crm,hr_recruitement,project: kanban quick create
This rev. defines form views to use as quick create views in the
kanban view of models 'crm.lead', 'hr.applicant' and 'project.task'.

It uses a newly created mechanism allowing to specify a form view
xmlid in the Kanban arch, such that the referenced view is rendered
inside the QuickCreate widget (see parent commit).

Task #27475.
2018-01-26 19:26:03 +01:00
Aaron Bohy d18d08f01a [IMP] web: Kanban: quick create record with more fields
This rev. improves the QuickCreate widget for grouped Kanban views.
It allows specifying in the Kanban arch a form view xmlid, e.g.:

    <kanban quick_create_view="some_form_view_xmlid">
	...
    </kanban>

When this attribute is set, the referenced form view is loaded and
rendered inside the QuickCreate widget. A real FormView widget is
instantiated, meaning that all form view mechanisms are available
in the QuickCreate (modifiers, default_get, onchanges, widgets...).

Task #27475.
2018-01-26 19:26:03 +01:00
Aaron Bohy af2686fee5 [IMP] web: Kanban: cancel column quick create on ESC
Record quick create can be cancelled by pressing ESC, so this rev.
ensures that the same behavior applies for the column quick create,
for the sake of consistency.
2018-01-26 19:26:03 +01:00
Aaron Bohy cf178a2f06 [IMP] web,*: config: add XXS size to config.device
In Less, the size_class XXS is defined and used in media queries.
This rev. adds it in JS for sake of consistency.

Code in addons comparing the size_class needed to be adapted due
to the new XXS size_class.

Moreover, we now use the helper 'config.device.isMobile' everywhere
we should, instead of manually comparing the size_class.

Finally, we changed the way the config.device has to be specified
in the test environment. From now on, only the size_class should be
set, and the isMobile flag is computed automatically.
2018-01-26 19:26:03 +01:00
Simon Lejeune 5f17f0184a [REF] delivery: remove unused field
This is a preliminary commit to more cleaning in the UOM used for the
weight of products.
2018-01-26 17:38:13 +01:00
Sanjay Jamod 7642754122 [IMP] account: Added feature to create recurrent vendor bills,
- One need to first enable this from Accounting Settings to use this feature
- This feature works for Vendor Bills which are validated/paid
- Once activated, user can see one option in Vendor Bills to set particular record to be recurrent document and can define the recurrency period. This will automatically create draft documents(by mean of Scheduled Actions) as per recurrency configuration.

Was PR #21411. was task 34884.
2018-01-26 16:56:57 +01:00
qsm-odoo 7c959e3fd5 [FIX] web_editor: properly show link alignment in toolbar
When clicking on a link in the editor, the "center" alignment button
was always marked as active whatever the real alignment of the link.
This was because it considered the alignment of the text inside the
link instead of the link's one inside its parent.
2018-01-26 16:17:19 +01:00
Christophe Simonis bcf6529755 [MERGE] forward port branch 10.0 up to 8e38a3d069 2018-01-26 16:06:51 +01:00
Adrian Torres a094095ef3 [IMP] mail: check if template can be rendered on write (#20834)
* [IMP] mail: check if template can be rendered on write

Before this commit, whenever a user would send an email from a template
containing mako python expressions and those expressions contained
syntax errors, the mail would still be sent but the body would be empty,
this was intended behavior but due to an increase in complaints of empty
mails being sent, the behavior was reviewed.

This commit improves on this behavior by:

    1. Rendering the template on write (save)
    2. Checking if the template rendered successfully
    3. Raising a UserError if the rendering failed

The end result is a modal box showing an error to the user whenever he
either saves an mail.template with python syntax error in mako snippers
or when a mail with mako snippets is rendered on-the-fly (wizard).
2018-01-26 16:02:24 +01:00
Martin Trigaux 843115ed8c [IMP] doc: rename page, add link 2018-01-26 15:58:28 +01:00
Pierre Rousseau 86adba1599 [FIX] sms: send sms in list view 2018-01-26 15:33:54 +01:00
Nicolas Lempereur 94ed561830 [FIX] website_sale: css ... alternative products
In the alternative products with 66994856 the thumbnail blocks were
restricted in size.

This is not very nice in the basic theme (the text of a product is cut
unexpectedly by the block border) but seems outright wrong on other
theme without border.

This commit forces the alternative product name to be on only one line
and be ellipsed. There was a lot of possible solution but for supported
browser compatibility and not breaking possible existing customization,
this one was choosen.

A better solution would probably use "flex" but we can't use it
currently (because of internet explorer support).

opw-806285
closes #22547
2018-01-26 14:37:54 +01:00
qsm-odoo 94c954121e [FIX] mass_mailing: lower the risk of messing with the mail wrapper
Mail content is wrapped in a table to properly allow centering the
layout in all mail clients. The problem was that this table was able
to be customized by the editor while it should not.
2018-01-26 13:31:36 +01:00
Christophe Simonis 8e38a3d069 [MERGE] forward port branch 9.0 up to ea879956b1 2018-01-26 13:17:23 +01:00
Martin Geubelle 4a409fb4bf [FIX] web: pass additional_context in load_action
The `additional_context` key was missing from the mock function of `load_action`.

This was causing an issue when testing a use case (the context was correctly
passed in Studio).
2018-01-26 13:13:27 +01:00
Christophe Simonis ea879956b1 [FIX] pad: allow to create records with unknown fields 2018-01-26 12:44:18 +01:00
Alexandre Kühn 1a7a0ec4b3 [FIX] mail: livechat: send message with chat_window
Revision on c778de44c7
The changes on chat_window are wrong, because the
composer uses an 'input', instead of a 'div'.

As a result, it was not possible to send messages
over im_livechat from the website.

This was not the case on the webclient: chat_window
is enhanced with extended_chat_window, which replaces
the composer with 'div', hence the changes are correct.
2018-01-26 11:14:01 +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
Nicolas Martinelli 927e13436a [FIX] account: duplicated field
`currency_exchange_journal_id` was duplicated due to forward port.

opw-807839
2018-01-26 09:11:49 +01:00
Nicolas Martinelli 8531af9c8b [IMP] stock: unnecessary inventory line fields
Several fields are not necessary on inventory lines: they are not used
anywhere, or can be replaced with their Many2one.

opw-805439
2018-01-26 08:27:04 +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 Lempereur 3afe5b6508 [FIX] hr_timesheet: allow duplication of project
When duplicating a project, a command [(6, _, ids)] may be generated.

This fail with the commit aa8a39fc4f because all comodels records with
id not in `ids` will have their inverse field unset.

But eg. in the case of copy, this would trigger an error because this
would be done to an empty recordset and unexpectedly trigger an error.

opw-807655
closes #22525
2018-01-25 17:57:37 +01:00
Christophe Simonis 88a87240a6 [MERGE] forward port branch saas-11.1 up to 8613724bfc 2018-01-25 17:38:41 +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
fda-odoo ccdbc16efc [MERGE] hr_expense: onboarding 2018-01-25 17:03:12 +01:00
Christophe Simonis 8613724bfc [FIX] stock_dropshipping: adapt test.
Field `schedule_date` is now readonly for new records. Simply set the
correct `expected_date` on the move line.
2018-01-25 16:44:37 +01:00
Géry Debongnie 21c1b1acd3 [FIX] web: add target=_blank to url field widgets
Url in the web client are supposed to open in a new tab.  This was the
way it worked in v10.0 and was lost with the refactoring of the new
views.

We just reintroduce that behaviour with this commit.

Closes github issue #22389
2018-01-25 16:31:06 +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
fda-odoo 8cf946a838 [IMP] hr_expense: rename responsible_id to user_id
As user_id is a magical field, we rename responsible_id to user_id to notify him when he is assigned to an expense sheet.
The other option is to rewrite the mail template "message_user_assigned" and to adapt mail_thread.py to accept other field than user_id, but this task is let for later.
2018-01-25 15:51:57 +01:00
fda-odoo 2df2afc405 [IMP] hr_expense: improve useability of hr_expense
- Change the differents states of hr.expense to have
ToSubmit, submitted, approved, refused and paid.
- Add a responsible field on employee model. The responsible is a res.user that belong to the group "hr_expense.group_hr_expense_manager"
The commit change too a "vals" variable that changed in a git rebase operation.
- Make the other_info tab invisible if the user doesn't belong to account.group_account_user.
- Make expense wizard (for expense lines) editable if expense is in reported mode, so when the sheet is in To submit state.
- Move a tour from expense form to expense_sheet form
- rename two fields (attachments and manager)
- The buttons "approve" and "expense" must be hidden if the user isn't the expense responsible.
- The description field of expense line must be editable in draft, reported and refused state
- Add a subtype to follow responsible changes on expenses sheets
2018-01-25 15:51:57 +01:00
fda-odoo ab8f5ec95d [IMP] hr_expense: change tours text, labels, search field
- subscribe responsibles of an expense to followers of that expense
- hr_expense requires sale_expense instead of sale_management
- remove one tour step and change texts of some others
- remove header from expense line wizard
- add tax field in form view for expense
- change the display name of some fields and other titles.
- remove the expense report and improve search bar for expenses in report.
2018-01-25 15:51:57 +01:00
Christophe Simonis cb50970f3f [MERGE] forward port branch 11.0 up to eefe879a37 2018-01-25 15:41:45 +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
qsm-odoo f79b00c3b7 [FIX] portal, web_editor: responsive images but with inline display
Commit https://github.com/odoo/odoo/commit/abde8bddf8ec45cf12aab59e95c330321158cfba
made a small change to make all images responsive when they are added
with the editor. This had however the side effect of making them go to
a new line which may not be what we want.
2018-01-25 13:56:29 +01:00
qsm-odoo 461bf2331d [IMP] portal: default floating media' spacing
When an image/video is floating, the text around was hitting the image
as no spacing was defined. Now, a left margin is added on right-floating
images and a right margin is added on left-floating images.
2018-01-25 13:56:29 +01:00
Martin Trigaux 7ee7262ccb [FIX] point_of_sale: include untaxed amounts in tax lines
If some orders have no taxes (e.g. manual reimbursement with a negative amount)
the sum of taxes lines gave a different result than the total amount sold.

e.g.:
order 1: price 10€, including 2€ for taxes
order 2: price -5€, no taxes

report:
  taxes:
   20%, 2€ taxes, 8€ base amount

  total sold:
   5€

2+8 != 5

Also change line.price_subtotal as it was computed twice if there was two taxes
on a line (although it will probably never happen in the pos)

opw-805415
2018-01-25 13:53:56 +01:00
Prakash Prajapati eb2cf11904 [IMP] web: hide group by option in search view for calendar view 2018-01-25 13:14:00 +01:00
fda-odoo eefe879a37 [MERGE] fix payment flow with acquirers in e-commerce, invoices and quotations
As some flows were broken, this set of fixs improve the different routes for all acquirers
See commit messages for more information

Thanks to @jpr-odoo for his first implementation and to @tde and @fgi
2018-01-25 13:12:25 +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
Ravi Gohil 1a6b32ff58 [IMP] sales, crm: improve sales reporting UX
- 'Customer' is more appropriate than 'Partner' for sales
- makes some confusing menu easier to understand
- remove favorites search duplicates of groupby
2018-01-25 13:01:51 +01:00
Ivan Yelizariev decc668f76 [FIX] base_import: typo 2018-01-25 12:59:19 +01:00
Gustavo Valverde d62a26a429 [FIX] account_asset: Import UserError to show real error to user
The UserError was not being imported, causing the crash of this warning

Closes #22460
2018-01-25 12:46:58 +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
Christophe Simonis c6b2fa47ed Revert "[FIX] base: bad back-port"
This reverts commit 0ac6043ec7.
2018-01-25 12:43:02 +01:00
Nikunj Ladava c778de44c7 [IMP] mail : display mentions in green color in edit mode
When someone mentions another person in discuss/chat window, the
mentioned name was displayed just as a text, which may be unclear.  With
this commit, we display mentions with the same style as mentions in a
message.

To do that, the main idea is to change the input by a div with
contenteditable set to true.  This allows us to add <a>...</a> inside.
2018-01-25 12:18:10 +01:00
Raphael Collet f50c6b1f6c [FIX] tools: align API of groupby on the one of itertools.groupby
The function `stripped_sys_argv` was broken because of `itertools.groupby`
being hidden by the local `groupby`.  Aligning APIs makes the local one a valid
substitution for `itertools.groupby`.
2018-01-25 11:28:13 +01:00
Christophe Simonis da9baf2331 [MERGE] forward port branch saas-15 up to 0c97be858c 2018-01-25 11:14:56 +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