BS4 blue-ish grayscale is ok for text, borders and shadows but it's too saturate for main components with solid background (eg. control panel and body bg).
This commit will use a desaturate version of the same colors.
Since uom management has been extract in a separated module, we
can now add the possibility to use it without product.
This commit brings the ability to record the timesheets in
an different UoM than 'Hours'. The user can now set an encoding
UoM for its timesheet on the company. This will display the
timesheet field `unit_amount` with a different widget.
For instance, timesheeting in hours will still use
the traditionnal float_time widget, when timesheeting in 'Days'
will displayed a toggle button with a range of defined possible
values.
The widget used by UoM is customizable on the UoM. The `unit_amount`
field should now be decorated with the 'timesheet_uom' widget.
This one will bind the correct widget (float_time, float_toggle, ...).
If the encoding UoM has no widget associated, the fallback will
be 'float_factor', using the uoM converstion factor.
Everything will still be stored in the database in 'Hours' (the
UoM set on the `project_mode_time_id` field on the company).
For more details, please have a look at the subcommits.
Task #39079Closes#24893
Purpose
=======
Be able to speficy analytic accounts and tags on the account_assets module
that should be set on the generated account move lines.
TaskID: 1868221
Purpose
=======
There's no generic way to display a warning message if the user tries to set
a date in the future.
Specification
=============
Add this new feature on the datepicker (in web module), and use it account. For
example for the invoice date on the invoice/vendor bills form view.
TaskID: 1868221
Purpose
=======
Since the account apocalypse in 9.0, there are no way to filter the accounts
based on their 'internal group'.
Specification
=============
Add a Selection field 'internal_group' on the account.account.type to allow
filtering the accounts. The possible internal groups are the following:
- Equity
- Asset
- Liability
- Income
- Expense
Also, set the value to the account types defined in data.
TaskID: 1868221
Purpose
=======
Instead of adding 'copy' on the code, we could try to increment the code by 10
if possible.
Specification
=============
On an account duplication, if the code represents an Integer and if there are
no other account with the code 'code + 10', then increment the account code
by 10. Otherwise, use the default behavior (adding a 'copy' on the code label).
TaskID: 1868221
Purpose
=======
The current limit is 40, this is a little short to have a clean overview
on the bank statement lines when loading the report.
Specification
=============
Set it to 500 instead.
TaskID: 1868221
We want the UoM name (encoding timesheet) to be
displayed in the label of unit_amount field.
To do so, the field_view_get is extended to change
the label on the field decorated with the `timesheet_uom`
widget, in the view arch
If a string attribute is set on the field, it is prior;
so we only add label if no one is set to avoid breaking
view inheritance.
Task #39079
This commit provides a mecanism to allow user
to log their timesheets using any time UoM
they want. Everything will still be stored
in hours in the database (in the UoM selected
with project_mode_time_id field of the company).
The chosen encoding UoM will provide a widget to
help the encoding (float_toggle for Days,
float_time for Hours, ...). The widget will use
the UoM rate conversion.
Task #39079
Time UoM are almost Master Data for timesheet modules.
Some user remove those before installing timesheet modules, making
it impossible and crashing (as some field required a time UoM to be
set at installation).
Since we don't want to hardcode xmlids of 'Hours' and 'Days' time
UoM, we rather prevent the deletion of such UoM in the system.
The UoM can be desactivate to avoid having plenty of them in system
in use.
Task #39079
As timesheet duration (unit_amount) is already
stored in hours in database, the pivot reporting
view should use the float_time widget, even when
encoding in days.
Task #39079
This commit provides new js widgets for list, kanban and form
views on float field.
1/ 'float_factor' displays the normal float field, but takes a
conversion factor as option. The displays value is the normal
one multiplied by the factor.
You can use the widget like
<field name="my_float_field" widget="float_factor"
option="{'factor': 2}"/>
2/ 'float_toggle' displays a button (in edit mode) looping on a
range of given value at each click. A conversion factor is optional
(default will be 1) to display a converted value, but sent to
non converted one to the server.
You can use the widget like
<field name="my_float" widget="float_toggle"
option="{'range': [0, 0.5, 1], 'factor': 2}"/>
'range' and 'factor' are put in the options.
In simple read mode, the widget display the value as a traditionnal
text (like a normal char field).
This commit provides tests and documentation for those 2 widgets.
Task #39079
For historical reason, project depended on product. Probably to use
UoM. Now, UoM is extracted in 'uom' module, and project does not
use UoM anymore (only with timesheet). Removing the 'product'
dependency requires to make hr_timesheet depending of uom, since
this one really use UoM mecanism.
Task #39079
'project_time_mode_id' is the field used to determined the UoM to
use when logging timesheets. It is not used in project alone, but
in timesheet. Moving it make sense, and does not cause any problems.
For now, no UI allow the end user to change it: it is set with the
Hours UoM (hardcoded).
This is a technical move to prepare the feature that will allow
people timesheeting in Days or Hours.
Task #39079
With this commit, most threads show an indicator when a member is typing
something. e.g.
"Mitchell Stephens is typing..."
Supported threads:
- DM
- (public & private) channels
- Livechat (Website & Backend)
Unsupported threads:
- mailboxes (e.g. 'Inbox')
- document thread (= 'Chatter')
- support channel (with `im_support` module)
Some technical details:
- This is a mix between 'start'/'stop' and 'regular notify' strategies.
- On typing text in composer: notify 'start typing' to all members of
thread.
- On clearing text in composer: notify 'stop typing' to all members of
thread.
- A member can only notify once every 2.5 seconds to the server when he
starts or stops typing something (throttled, buffered notify call).
- On receiving a message from someone that is typing: determine that he is
no longer typing.
- On non-empty and unchanged composer text for 5.0 seconds: automatically
notifies all members of thread that he is no longer typing anything.
(This is like a 'soft / cooperative sender' timeout).
- On non-receiving a typing notification of someone after 60 seconds:
determine that he is not longer typing something (This is like a
'hard / receiver assumption' timeout).
- When some types for more than 50 seconds straight: notify that he is
still typing something (again and again every 50 seconds).
- When two or more people are typing something (Multi-User channels), it
displays at most 2 typing users (ordering rule: longer typers first):
"Mitchell Stephens, Marc Brown and more are typing..."
- Timing summary:
- Usually 2.5 seconds uncertainty.
- Up to 5.0 seconds uncertainty on typer inactivity.
- Up to 60 seconds uncertainty on typer page reload / browser tab
closed / etc.
Future Improvements:
- Detect page reload or browser tab close with loose of longpolling
connection
Task-ID 28188
A document thread is a JS-only entity, which is built from data on
'mail.message' received from the server, or from data of a document.
When we detect a change on the message IDs related to a document thread,
we should update this list on the document thread, so that it knows which
messages haven't be fetched from the server yet.
However, the list of message IDs was not updated on a document thread when
no name could be provided to the document thread, which occurs when there
is no no `display_name` data to determine on the record's name.
In this case, it should update the list of message IDs on this document thread
without altering document name. However, it was neither changing the document
name nor updating the message IDs.
This commit fixes this issue by independently update message IDs and the
document name of a document thread.
Before this commit, this test was failing due to phantomjs assuming that
there could be more messages to display on the screen.
The issues comes from the bad support of flexbox with PhantomJS, and this
test broke when we changed a DIV display with 'flex' instead of 'block'.
For instance, this is the expected values:
thread clientHeight: 960
thread scrollHeight: 1629
message clientHeight: 50
With 30 messages, 50 x 30 = 1500 < 1629 and 960 < 1629, so there are
enough messages loaded with this screen and we are not at the top of
the thread (this is the case when clientHeight = scrollHeight).
However, with phantomJS we have the following values:
thread clientHeight: 944
thread scrollHeight: 944
message clientHeight: 259
As a result, with 30 messages, 50 x 30 = 1500 > 944 (looks like
messages do not vertically collide ?) and 944 = 944 so it assumes
we are at the top of the thread, so it fetches for more messages.
This commit fixes this test by enforcing a special rendering of the
thread for phantomJS.
Unfortunately, we can't simply make the hack on the test only. We
have to make discuss and thread aware of this because they should
adapt their rendering right away
- no more bootstrap `o-flex` mixin
- no `$gray-light` (replaced with `gray('600')`)
- replace event `click` with `show.bs.dropdown` for dropdown
- use `!important` on previous `hidden-xs` (because `d-*` use `!important`)
Before this commit, when we received a new message, the counter was correctly
updated, but not the last message in the messaging menu preview.
This is due to making changes to the counter before adding the message in the
thread. When there is a change in the unread counter of a thread, it warns its
views. The messaging menu renders the previews of each threads in the preview
items, using in particular the last message in the thread.
This commit fixes the issue by making changes on the unread counter of a thread
after the message has been added to the thread.
This commit makes a lot of small improvements of the JS of mail and
related modules.
A. Mail Manager
---------------
im_support:
- [REF] Slightly more robust way to determine a support
message, so that it more reliably falls back on
default kind of message (i.e. support channel UUID
should be clearly set).
mail:
- [REF] Improved method names for readability purposes.
Some examples:
- `fetchFromServer` becomes `fetchMailStateFromServer`
- `_initialize{*}` becomes `_update{*}FromServer`
- `_isModerator` becomes `_isMyselfModerator`
- [REF] Use 'template' pattern design to make Include on
Mail Manager much more robust. In particular,
the flow is always as follow:
1. Initialize internal state.
2. Listen on buses.
3. Fetch mail data from server.
- [REF] Improved workflow for thread window workflow
(Shorter & more readable).
B. Mail Tests
-------------
- [REF] Thread Window Tests crashes with clean message when
there are some thread windows open before running the
tests.
C. (Model) Message
------------------
- [REF] Improved method names for readability purposes
(e.g. `isAuthor` becomes `isMyselfAuthor`).
D. (Model) Thread
-----------------
- [REF] Improved `init` parameters on each kind of thread.
- [REF] 'Thread With Cache' has been renamed to 'Searchable
Thread': it embraces all kinds of threads that can
be used with the search view.
- [REF] 'DM' has been renamed to 'DM Chat' (for clarity).
- [IMP] New Livechat model in the backend.
- [REF] No more direct instances of the Channel class: public
and private channels are now 'Multi-User' channels,
while DM Chat and Livechat are 'Two-User' channels:
This change has been made so that instances of classes
always have direct classes as "leaf" in the Class
modeling. It eases making changes to a certain model
without being too constrained by another model.
- [REF] As a consequence of above changed, the method `isChat`
has been renamed to `isTwoUserThread`.
This is to avoid confusion with the terminology
'chat', which is more like a shortcut for 'quick real-
time conversation'. In other words, the property of
'chat' depends of the way to interact on a thread, not
of the intrinsic type of the thread.
Still, some parts have kept the terminology 'chat',
such as in the systray messagin menu.
- [IMP] Added `message_added` and `message_posted` hooks,
which may be useful to easily hook on those events.
E. Thread Widget
----------------
- [REF] Now uses a `mail.model.AbstractThread` for the
rendering of a thread, instead of a list of
`{mail.model.AbstractMessage}`.
- [FIX] Stick thread scroll height to bottom on new rendering,
if it was previously at the bottom of the thread.
- [REF] Option ORDER has its meaning changed: it now refers
to the chronological order of messages in the thread,
in which DESC means 'from top to bottom', while ASC
means 'from bottom to top'.
- [REF] Improved doc on templates, in particular with the
option `ORDER`.
F. Thread Window
----------------
- [REF] Moved more logic to thread windows, which were
previously in Mail Window Manager.
- [REF] Now hides the thread widget attribute. So instead of
`threadWindow.threadWidget.isAtBottom()`, it uses
`threadWindow.isAtBottom()`.
- [FIX] New received messages when not having focus on Odoo
tab should always make the corresponding thread
windows "passive" (i.e. windows that keep threads
unread until click on them).
- [FIX] Blank thread window (i.e. 'New message' TW) correctly
opens Discuss with 'Inbox' when clicking on 'Expand'
Button in the title
- [FIX] Do not display the composer for channels with property
'mass-mailing' set in thread windows.
G. (Website) Livechat
---------------------
- [REF] Some `trigger` have been turned into `trigger_up`.
- [REF] Some logic has been moved to models (e.g.
`{im_livechat.model.WebsiteLivechat}`), from
`{im_livechat.im_livechat.LivechatButton}`.
- [FIX] New messages should be received in real-time. The
longpolling was broken with a recent refactoring on
bus service (6448420c5d).
Attempt to clarify/improve error message (and avoid traceback) when
import fails due to some intermediate system e.g. memory error or
gateway timeout.
Task 38254
Closes#20627
This change is loosely related to
35d452cffb and PR #24854 in the sense
that that was an attempt to better handle transport/gateway issues
during file download.
Make plain text mode more user-friendly and behave like gmail
* No snippet bar for plain text template
* once the plain text template selected, the cursor should be in the mail or
add a placeholder
* Default Unsubscribe link in the plain text template
* Don't force the font type; Let each email client use its own default font.
opw-1852811
Purpose behind this commit is to disable snippets in plaintext theme. So here we
hide it with css.
And we hide plaintext theme option form style selector. So once user select
another theme then user can only switch back theme except plaintext theme.
Purpose behind this commit is to remove font-family from all elements in
plaintext theme. So mail receiver will see this mail in default system font.
This is inspired by new Gmail and suggested by FP
As we want to show system's default font in the mail sent with the basic theme.
And so we remove font-family from basic theme while saving. But by doing so in
readonly mode is not getting proper font in odoo as we don't having any assets in
readonly mail editor. So we added stylesheet just for display purpose.
As we are hiding snippet bar in plaintext theme, there is no way to add snippet
with unsubscribe link. So we are adding it by default in plaintext theme
The amounts sent by the point of sale should be trusted instead of recomputing
it server side.
The previous compution could introduce differences in amounts.
The pos.orders should only be created from the pos interface.
Turn the compute methods into onchange to still be possible to do refund but
disable edition from the backend.
Change amount_paid computation with the one server side
The way amount_paid is computed was not coherant
Remove pos.discount model as never used from the server interface
Adapt tests to use a computed amount_total and amount_paid
Adapt tests to be closer to real use flows (no more manual creation of account
move lines or pickings, it should be automatic)
Remove tests that no longer make sense (create + payment from backend is only
relevant for refund, rest should be with create_from_ui)
Add force_create in the view to make sure the onchange values are used
This commit is the counter-part of an enteprise commit introducing
the Documents app.
Here is a summary of what has been done:
- tweak unlink of ir_attachment to prevent unlink recursivity
(when attachments are attached to ir_attachments)
- improve ir_attachment kanban view
- add several arguments to binary_content controller:
- 'force_ext': to force the extension in the filename, base on
mimetype
- 'share_token' and 'share_id': to autorize download from a
share link
- add 'thumbnail' field on ir_attachment to optimize Kanban view
- add 'upper_limit' argument to image to allow to bypass the
500*500 size limit
- DocumentViewer now handles text files
More information available on task 1853490
Co-authored-by: Pierre Paridans <app@odoo.com>
Co-authored-by: sri-odoo <sri@odoo.com>
Co-authored-by: ThanhDodeurOdoo <tso@odoo.com>
Overwrite bts4 custom-checkbox design (un-checked state only).
Use outline rule to avoid conflics with :focus and :hover states.
The change has been added in ui.scss to affect both backend and frontend.
In a test, we might want to check the domains given to RPCs with
assert.step/verifySteps. Before this rev., if there were an
'active' field on the model, ['active', '=', true] was
automatically added to the domain by the MockServer in place, thus
altering the expected domain in the test.
This rev. allows to instantiate a FieldMany2one Widget with option
'noOpen' (which hides the external button allowing to open the
related record in a dialog).
This option already existed, but it had to be specified in the
nodeOptions (i.e. in the view arch), which is not convenient for
standalone fields for which there is no view.
Part of task 1853490
This rev. allows to instantiate a Chatter Widget with option
'display_log_button' (which shows the 'Log note' button).
This option already existed, but it had to be specified in the
nodeOptions (i.e. in the view arch), which is not convenient when
a Chatter is instantiated outside the context of a FormView.
Part of task 1853490
- Custom color can now be applied to elements
- Find used custom colors in the page and add them as colorpicker
suggestions
- Current color is selected in the picker when you open the custom
color wizard
task-37974
Closes#26274
- Split editor button: one for font color and one for background color
- Remove recent color button feature
- Add only theme colors and remove other color sections like
graypalette/standard colors
- Button's icon for font color and background color buttons have the
same color of currently selected element
task-37974
Closes#26274
Moved from the themes repository.
Now, users can use a snippet which showcases the latest blog posts as
soon as they install the blog app.
Note: in the future we may want to develop a snippet which can showcase
any model records (products, projects, ...).
task-1874216