This allow the browser/device to handle the experience of handling number in a more native way.
FieldInteger and FieldFloat now inherits from NumericField because we want
to format it or not dependent of the view (readonly or edit) and the
NumericField will manage it.
We do that because input type number can't take a value with comma on Chrome
(FireFox is more permissive but not perfect because comma is the separator
for decimal in this case).
Task #1880376
-removed force_ext from ir.http.
-added signature arg to web/image to differentiate cache entries by URL.
-added an embed youtube viewer for youtube URL's
-added a PDF splitter to the PDF viewer UI
-added tests for mail's Document Viewer
-added a "signature" param to web/image to go around the browser cache
-thumbnail field of ir.attachment is now stored in the filestore
as a distinct attachment.
task 1853490
Co-authored-by: Pierre Paridans <app@odoo.com>
Main specifications
* set mail as dependency on contacts as activity view is used in contact
that does not depend on mail -> crash;
* update icon on the reminders: use calendar instead of clock;
* add an icon to Contact in the systray;
* add the Activity icon in the upper right corner of the Contact;
* sort Activities by date: from more urgent to less urgent;
* on the contact name in the activity view, the name is clickable but the
cursor is wrong: use the little hand as a cursor;
Please see sub-commits for more details. Thanks to @alexkuhn for
reviewing and @est-odoo for testing.
This merge is linked to task ID 1882545 and closes PR #26797.
Purpose of this commit is to have first activities to perform displayed
first in the activities summary view.
This commit is linked to task ID 1882545 and PR #26797.
Purpose of this commit is to allow having an icon redirecting to the
activity summary view in the partner activities section of systray.
This is done by supporting an additional 'actions' list in the activity
data given to the systray. It displays small icons that redirect to an
Odoo action given its xml ID.
This commit is linked to task ID 1882545 and PR #26797.
As res.partner model is defined in base systray takes the base icon as icon
used in the systray when classifying activities by model. As base module has
no icon it leads to a blank icon being displayed in the systray. Purpose of
this commit is to use the icon from Contact application instead.
As contacts application now depends on mail we do it simply through
inheriting the systray_get_activities method that return the data to display
the systray elements.
This commit is linked to task ID 1882545 and PR #26797.
Specifications :
* clock icon is generally used for datetime;
* calendar icon is generally used for date;
* as we set the reminder date in the systray let us use the calendar
icon in the systray in the reminder section;
* please also remove the extra margin bottom of note when entering a
new reminder, it makes @est-odoo very sad;
This commit is linked to task ID 1882545 and PR #26797.
Contact application allows notably to see the activity summary view on
customers activities. It require mail to be installed. As there is no
real use of contacts application without mail let us set mail as a
dependency of contacts. It seems a better solution than having a bridge
module between contacts and mail.
This commit is linked to task ID 1882545 and PR #26797.
-Improve no content helper on activity view
-Update chatter after editing an activity un form view
-Avoid context to appear as feedback
When using call_button the context is set as an arg and will be catched by
the kwargs of the called action.
As for action_feedback, we can create a wrapper without kwargs
used when calling this method from a button to avoid this problem.
Another solution would be to change the call_button in order to give
the context as a kwargs. Maybe a possible improvement for master.
-Remove groupby from activity view
group by has no effect on activity
-Change cursor to pointer on record name in activity view
Task: #1878184
PR: #26668
Purpose of this commit is to improve settings by improving labels and
section titles. Purpose is to ease use of settings by users and make
it easier to understand.
This commit is linked to task ID 47221 and PR #26483.
Before this commit, the search input was focused everytime the settings
view was rendered after a timeout of 0. This is not considered as correct.
It is fragile as asynchronous code could break in many situations.
This commit fixes that behavior by using a hook 'on_attach_callback' which
is called when the widget is put in the DOM.
This commit is linked to task ID 47221 and PR #26483.
When cancelling SO, then reconfirm it, a new task will be created. This is
no the willing bahavior. This commit fixes this, so reconfirmating does
not create a second task.
This commit also provides a test case and so, mixes 2 test cases into
one for a better coverage.
This button requires the rights to handle SO (create and update), so we now
only display this button if current user can do such action. Otherwise, when
submitting the wizard, the user gets an access error.
During the super of write, a check constraint is done
in python. So, if writing allow_timesheet=True the constraint
will raise is no AA is set on the project.
This commit restore the exepected behavior.
* website
```
$map: (
test: 1,
black: 2,
);
@debug map-get($map, 'test');
@debug map-get($map, test);
@debug map-get($map, 'black');
@debug map-get($map, black);
```
The above code leads to a:
1
1
null
2
This is because maps' keys can be *anything* in sass (even other maps).
In the example, the map is defined with unquoted `test` and `black` as
keys which are understood as the string 'test' and the *color* black.
When asking for the value for the 'black' string key... there isn't any.
This commit forces the use of quoted string as color maps' keys.
When there is a performance issue, it's sometimes difficult to discover
which request increased the query count or its duration.
With this commit, the query count, the query time and "python and io" time are displayed
in the logs at the end of each werkzeug request line.
Co-authored-by: Christophe Monniez <moc@odoo.com>
Up until now, the execution of a report action could not be followed by
any action which prevented, for example, to automaticcaly close a modal
after printing a report from it. This has become an issue when working
on customer's invoices using the new modal introduced in 4cb9194275
This commit allows to close a modal after the download of a report.
Removing the code that allows to generate multiple reports with a single
action introduced in 410d6a703b as it was
only used for l10n_ch and that this was abandoned in
5169b50efe.
(Needed for themes migration)
The #wrapwrap element always featured a hack to make the inner <footer/>
stick to the bottom of small-height pages (typically, empty pages). As
advertised, this was a *hack*: forcing the element to "table" display
and its children to "table-row" display. This prevented some themes
to do some stuff.
With the migration to BS4, we now use flex at various places and so
only support the browsers which support flex (every last version of
major ones). The footer feature can be solved using flex, so there is
no point in keeping the hack.
This also allows to make the #wrapwrap element scroll instead of the
<body/> and to always have a screen-shaped #wrapwrap element, making the
element the user's <body/> it was always meant to be.
Usecase to reproduce:
- Create a PO or SO with 10 lines
- Process the DO/Receipt to done
PO or SO count on lot is equal to 10 instead of 1
It happens because multiple stock_move could be linked to 1 order.
Before this commit, the `dom.autoresize` function may apply the
padding and border width twice when computing the height of the
textarea. This issue occurs when the fixed textarea had the same
CSS style as the textarea.
This commit fixes the issue by enforcing zero padding and border
width in the fixed textarea.
Task-ID 1882736
- the image.crop_image method doesn't defaults the format to PNG anymore.
Instead it uses the format of the original image
and defaults to jpeg as a last resort as the save method requires
a type if it is called with an image object.
When computing coverage, the tests are slowed down and the timeout is
often exceeded.
With this commit, HttpCase headless Chrome tests timeout is increased if
coverage is detected.
When Odoo receive a SIGXCPU (CPU time limit reached), it shuts down
immediately. If a headless Chrome is running, it stays alive after the
Odoo shutdown.
With this commit, the signal is intercepeted and the Chrome browser is
properly closed before shutting down the Odoo server.
When Odoo intercept the SIGXCPU signal, an error message is written to
the stderr. Unfortunately, if stderr is redirected to a buffered file, the
message will not appear.
In some situations, Chrome remote debugging is sending an empty list of
opened tabs. In that case, an orphan Chrome process stays alive.
With this commit, Chrome is stopped properly in those situations.
Since rev. 960360af, Date (resp. Datetime) fields return
datetime.date (resp. datetime.datetime) objects. This caused an
issue in the read_progress_bar method which returns a dict, whose
keys are values of the group_by. Indeed, when grouped on a Date or
Datetime field, the key was no longer a string but a datetime.date
or datetime.datetime object, and it crashed when that dict was
turned into a JSON string.
This method isn't tested at all for now, but tests will come
shortly.
Task 1878254.
- calendar.event.start and stop are expecting datetime and not date.
Now, if 'All Day' event, start time = 00h00 and stop time = 23h59m59s
- when switching from all day event to not all day event, due to
stop time = 23h59m59s, the rounding for duration leads to make the stop
pass to the next day (00h00). each time you switch between all day and
not all day, the duiration is incremented by 24h.
We remove 1 sec to event stop time to avoid this.
The icon for .o_user_online (e.g. fa-heart for bot) was not displayed as it was
the same color as the one defined in .o_thread_window_header
Use $o-enterprise-primary-color (aka green) to indicate the user is online
Closes#26350
The field SOL on the timesheet list on task should
be visible when the project is billed at employee
rate. This help the user to see which timesheet is
included in which SOL.
The access rights of project.sale.line.employee.map were not
created. This commit provides record rules and accesses for
a project manager to fill the map of a project, and configure
correctly the way of invoicing the timesheet.
With PO's agreements, a such manager should be able to read
services SO and SOL to do that action, without leaking
informations.
Note: reading SO is required as the name_get of SOL fetch
the name of the SO.
Sometimes, we want to give access to sale lines only for some users. But to
allow them to read a SOL, they need the read access of the sale order (as
the name is part of the name_get of SOL), which might break the saleperson
rights. This commit makes the name_get of sOL as to allow fetching
the name of SOL without having the access right on the order.
Now that Date/Datetime fields use python naive datetime, we want
to prevent developper to call or assign aware datetime to
fields. Moreover, if so, the timezone will be stored in the
database, but when reading Datetime fields, we expect naive datetime.
Comparing naive and aware datetime objects leads to errors.
This commit forces developpers to use naive datetime when saving
data in database.
As example, we have to erase the timezone of dates in calendar
modules. We also regroup the 2 assignations in one call to
`write` for performance reason.
Thanks to @dbeguin and @RomainLibert for spending some time
on this bug.
Before this commit it was attached to the form, in case your banner was
customized to have the font-color white, the text modal become white on white.
Now we attach to body, to don't have custom design from parent div.
This commit closes opw-1881280
group= should have been groups= so it had no effect.
At the same time the view is already accessible only through a debug menu, so we are fine to always show the list.
Purchase agreements create request for quotation with prefilled field.
The issue is:
date_planned (on RfQ) is filled from schedule_date (on PA). The first
one is a datetime object. The second one is a date object.
This commit makes a right conversion between datetime and date at the
RfQ creation. This issue was introduced by the datetime refactoring
(#24717)
Task id: 1878136
Let's assume a quick create form view with an onchange. Before
this rev., if the user set a value for the char field with
onchange, then clicked on 'Add', the record was created before
the onchange was applied, and thus with incorrect/incomplete data.
The reason is that, when clicking on 'Add', the user triggers a
'change' event on the char field, which notifies the model of its
new value. Then, as 'Add' is clicked, the quick create widgets asks
all widgets to commit their potential (uncommitted yet) changes.
But there is nothing left to commit as the changes have just been
notified. The quick create only waits for this to make the create
RPC, and thus totally ignores the changes that were committed at
the first place.
Task 1878254.