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.
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.
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.
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.
- 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.
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.
* [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).
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
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.
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).
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.
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
- 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
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
$('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
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.
- 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
- 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.
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.
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.
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
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
- 'Customer' is more appropriate than 'Partner' for sales
- makes some confusing menu easier to understand
- remove favorites search duplicates of groupby
... 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.
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.
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`.
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.