Test that there is no conversion of debit/credit when creating a
writeoff with the method process_move_lines of the model
'account.reconciliation.widget'.
See 7b636f3342closesodoo/odoo#33588
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Today, some resources that varies very infrequentely are requested on
every page load: the menus, the translations and the qweb templates
After this commit, there will be 2 improvements that will make the
loading of the webclient faster:
1. cache almost static resources forever
when loading the /web/ page, the user session will
contain the cache key to be used to fetch these resources. As the content
of the resource itself it used to compute the hash, the request can be
put in cache by the browser forever (for a year).
The up side is that in general less requests are needed to load the web client
The down side is that the load time and number of queries of /web page
has increased to include what is needed to compute the hash of translations,
menus and qweb templates
2. trigger the loading of the menus before the download (and startup) of
the JS and CSS assets:
The menus contains the definition of the action, wich is the first thing
needed to load a page in odoo. Starting the loading of the menu much
earlier means that when they are not yet in the browser cache (see point 1),
the browser does not need to wait for the entire assets to be downloaded
and parsed before starting the 'load_menu' request, but instead start it
immediately and hold onto a promise to be used instead of the rpc 'load_menu'.
Because the request is done before anything else is loaded, including
JQuery, it is made in vanilla JS.
task-id: 1943338
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#33291
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Make `to_refund` true by default as this is ideal for most users. An
override of `default_get` won't work because the field is present in the
view only in debug mode.
Task-1962183
closesodoo/odoo#32495
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Generate a unique URL for translations and cache them forever in the
browser. This reduces the number of requests, in exchange for computing
the hash of the translations when the session object is added to the page
In the HTTP pipeline, there is a middleware called DisableCacheMiddleware
that is called on every request to check if we are in debug mode, to remove
the cache headers and replace them with a static 'no-cache' so the browser
has to contact the server and check for a new version of every ressouce.
There were 2 problems with it:
1. it was doing more work than strictly needed when not in debug, like
rebuilding a list of headers for every request
2. it was removing Etag (case sensitive) with a typo and other headers
that could have been left in place.
This commit fixes those 2 issues by only modifying the headers if we are
in debug mode, and only removing the header 'cache-control' and replacing
it with 'cache-control: no-cache'
* = tools, base, web, website_profile, website_slides
Before this commit it was impossible to pass those parameters in the URL because
they were received as string but expected as int.
The opportunity is also taken to properly use named parameters when calling
`image_process`.
closesodoo/odoo#33506
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The whole cell is now clickable, not only the first line and it opens
the calendar view.
The meeting title is now displayed on the left, and the time on the right.
Morever, the exact hour is now displayed, not "In 4 hours".
The next activity background color has also been adapted (goes to white).
Task 1948737
closesodoo/odoo#32215
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Today, some resources that varies very infrequentely are requested on
every page load: the menus, the translations and the qweb templates
After this commit, there will be 2 improvements that will make the
loading of the webclient faster:
1. cache almost static resources forever
when loading the /web/ page, the user session will
contain the cache key to be used to fetch these resources. As the content
of the resource itself it used to compute the hash, the request can be
put in cache by the browser forever (for a year).
The up side is that in general less requests are needed to load the web client
The down side is that the load time and number of queries of /web page
has increased to include what is needed to compute the hash of translations,
menus and qweb templates
2. trigger the loading of the menus before the download (and startup) of
the JS and CSS assets:
The menus contains the definition of the action, wich is the first thing
needed to load a page in odoo. Starting the loading of the menu much
earlier means that when they are not yet in the browser cache (see point 1),
the browser does not need to wait for the entire assets to be downloaded
and parsed before starting the 'load_menu' request, but instead start it
immediately and hold onto a promise to be used instead of the rpc 'load_menu'.
Because the request is done before anything else is loaded, including
JQuery, it is made in vanilla JS.
Co-authored-by: Julien Mougenot <jum@odoo.com>
* = partner_autocomplete, point_of_sale, web_editor,
website_forum, website_slides
This can be used for example to preview an image from a file input field.
It can also be used to send the base64 content of the input by RPC instead of
having to rely on form submit as POST with multipart/form-data.
Technically wrap FileReader.readAsDataURL in a Promise.
This will also be used in task-1930726
PR: #33508
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
After this commit, the order of the elements of the search panel
categories follow the original order received from the back-end.
This is achieved by getting the order from the Array received
from the backend instead of the dictionary used to store the record data.
Task: #1972698closesodoo/odoo#33358
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This feature was too greedy in term of performance to be computed and not very used.
-task: 1888408
closesodoo/odoo#33500
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This fix an issue in the mobile app in iOS.
Safari is less permissive and a blank page was shown.
closesodoo/odoo#33498
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
As other modules than survey (namely hr_skills) now need a hook to add specific
behavior when a survey answer is marked as 'done', we removed the '_send_certification'
method and replaced it with a '_mark_done' method.
It will make it easier to override this method as it has a more generic meaning.
closesodoo/odoo#32880
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The ready code warning timeout of 2 seconds can be confusing since
it is triggered just after the 2 seconds. We can log this message
at the end in order to give the real timeout.
closesodoo/odoo#33478
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Follow up of d5ec467bafe62381 which added a default value in stable
This commit targets master branch where the field can be required
closesodoo/odoo#33025
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Since ea1b3254bb, the phone widget was no more highlighted as it is not contain in a 'span'.
This commit reintroduce the correct behavior for the phone widget.
closesodoo/odoo#33460
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit improves screens usability in the Time Off app.
The following points have been changed:
1. For leaves and allocations, add buttons on the kanban
card to directly approve or refuse if it's not already
validated.
2. On the leave kanban card, only display the dates,
not the full datetime.
3. Add a description to the activity created when a
leave/allocation needs to be approved by someone.
4. Allocation are now sorted in the list view by date_from,
more recent firsts.
5. In the allocation form view, add a stat button to know
how many leaves has been allocated and how many has been taken
for the leave type.
6. In the leave form view, in , there are currently two duration
for managers. The readonly duration is an informative field for regular
employees and the editable duration is meant for managers, it the
number of days needs to be manually set for some reason.
Make sure, the manager only sees the editable duration fields.
7. From "My Dashboard", the creation form view should not be the
manager form view (default view) which has additional unecessary fields
when requesting a leave for yourself (`employee_id`, `holiday_type`, ect).
It's now showing the form view for regular employees.
8. When approving a leave, to make an informed decision, it might
be needed to check leaves already taken by the employee or leaves
of its collaborators. This commit adds a widget displaying some stats
in a leave form view. This widget is only displayed in the context of the action leading
to leaves to approve. Stats displayed are:
- the number of days taken
by the employee this year, grouped by leave type
- Leaves taken by employees in the same department in the current month.
Task 1961713
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#32409
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
When clicking on an activity on the systray, the form
view should be the "approve view" (with the stats widget).
The view loaded by the systray JS is the default view.
Hence the approve view need to become the default view.
A few action that used the default view need to be adapted
since that default view has changed.
When approving a leave, to make an informed decision, it might
be needed to check leaves already taken by the employee or leaves
of its collaborators. This commit adds a widget displaying some stats
in a leave form view. Stats displayed are:
- the number of days taken
by the employee this year, grouped by leave type
- Leaves taken by employees in the same department in the month
of the leave.
This widget is only displayed in the context of the action leading
to leaves to approve.
This commit improves screens usability in the Time Off app.
The following points have been changed:
1. For leaves and allocations, add buttons on the kanban
card to directly approve or refuse if it's not already
validated.
2. On the leave kanban card, only display the dates,
not the full datetime.
3. Add a description to the activity created when a
leave/allocation needs to be approved by someone.
4. Allocation are now sorted in the list view, more recent firsts.
5. In the allocation form view, add a stat button to know
how many leaves has been allocated and how many has been taken
for the allocation leave type. The button redirects to the employee's
leaves of the leave type. Only shown for holiday type 'emloyee'.
6. In the leave form view, there are currently two duration fields
for managers. The readonly duration is an informative field for regular
employees and the editable duration is meant for managers, it's used if
the number of days needs to be manually set for some reason.
Make sure the manager only sees the editable duration fields.
7. From "My Dashboard", the creation form view should not be the
manager form view (default view) which has additional unecessary fields
when requesting a leave for yourself (`employee_id`, `holiday_type`, ect).
It's now showing the form view for regular employees.
Task 1961713
The two fields of leaves `request_date_from` and
`request_date_to` are not set in demo data.
These fields are displayed in the form view and are
empty.
This commit add values for these fields to have
a nice and complete form view.
Purpose
=======
Currently, `resource.calendar.leaves` are ordered
by creation date. In a list view,this is counter intuitive
if leaves are not created in the order in which
they will happen.
Specification
=============
Order `resource.calendar.leaves` by `date_from`
instead of creation date.
Commit ca35f98 change the picking view but introduce an error by
calling 'self'
closesodoo/odoo#33438
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Purpose
=======
Managing people's names is hard.
The full name is stored in a single field.
But is it first name first? Last name first? How many names?
We don't want an onchange to automatically change names
for which we might have spent a lot of energy correctly
formatting in the database.
Specification
=============
Remove the automatic sync between the user's name
and the employee's name when a user is linked to
the employee.
TaskID: 1953003
closesodoo/odoo#32521
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit adds `website_sale_tour` test which is testing the whole ecommerce
flow.
This tour will test b2b and b2c flow using public user, tests website sale
flows with tax included and tax excluded price. Also test address management.
Also, the signup URL needed to be modified as PhantomJS run all tour on domain
127.0.0.1 but ignup button has absolute URL.
Runbot stores next step to be executed on `localStorage` and due to domain
name change during tour execution, it will lose track and runbot will fail.
Closes: #24179
Task-1829827
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Ravi Gadhia <rga@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
purpose of this task is do not set default purchase representative in the purchase order when the PO is created automatically.
When the purchase order is created automatically, this purchase order would be assigned to odoobot.
Odoobot is not a real user. so nobody notified any activity of that purchase order.
so keep the responsible field empty when the PO is created automatically.
Purchase manager can easily filter "unassigned" purchase order and he can assign unassigned PO to someone (real user).
Task-1940489
closesodoo/odoo#31729
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
For signature field widget, we can set 'full_name' node option, which can be
used to auto fill the sign. However, current implementation for getting data
for field provided in 'full_name' (mainly, a string) has some flaws.
For example :
-In case of m2o fields, the string is not properly fetched due to different
structure than regular 'input' fields
- In case of x2m views inside a form view, field with same name can exist in
both parent record and child records. This is already the case with form view
of res.partner, where 'phone' field is there in both parent's form as well as
children's kanban view (for field 'child_ids'). With current implementation,
if we add signature on the form view, and set 'phone' as 'full_name' node
option, instead of form view, we will get phone number from 'child_ids'.
This commit improves the behavior by getting data from the 'recordData' instead
of searching them from the DOM. To have recordData in it's latest state, we've
set 'resetOnAnyFieldChange' flag to true.
task-1948364
closesodoo/odoo#33105
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Currently, an editable list view (`editable` set) makes its cells editable. However, if
the attribute `edit=false` is set (from context key or from access right restriction.
See _postprocess_access_rights method of `ir.ui.view` for more details), the list view
should not be editable, but is still.
This commit makes the 'editable' property of the listview checking the `edit` attribute
and provides some tests.
Task-32612
closesodoo/odoo#21613
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
- SDD: was put out of circulation in 2007, SDG is now used
- SRG: was replaced by SRD in 2004
- TMM: was replaced by TMT in 2009
- ZMK: was replaced by ZMW in 2012
- ZWD: ZML is now used
Closesodoo/odoo#24521
Task-id: 1823998
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
The purpose of this commit is to clean the user interface of local incoming
mail server and also update the script field default value
and configuration as per new script (from openerp_mailgate to odoo-mailgate).
task-1891157
closesodoo/odoo#33072
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Since c456228fa466982806355475079121f0b45c0166, the compute method was not the good one.
closesodoo/odoo#33414
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
When clicking on 'In Progress', 'To Launch' will open a list view instead it
is needed that, clicking on those links will open tablet view in enterprise and
list view in community.
And also, to remove xpath (from enterprise) because they are not generic
and can only be applied at one element at a time. Instead, a method is defined
by this commit which is overridden in enterprise to open kanban view.
task - 1967745
closesodoo/odoo#32815
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
'batch' and 'batch_size' fields are community fields and their
features are also in community so we moved the form view inherit
that add both fields in form from enterprise to community.
Task 1967745
removed move_id from view to prevent traceback.
added readonly and no_create attribute on account_id to be consistent with
form view.
Task-1974059
closesodoo/odoo#33269
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
After deep comparison between majors versions, it seems that
there is no breaking changes and this fix a lot of issues in
mobile.
e.g.:
Before this update, the validity date wasn't correctly formated
and the end user had to enter the right format himself.
Some users were blocked at the payment process.
The root cause for this issue is the inconsistent list of native
events triggered by mobile devices.
Note that this library is only used for acquirer forms (S2S Form
Template) when "Redirection to the acquirer website" is checked
(payment_flow == 's2s') in the acquirer configuration.
We are aware that this library is deprecated and should be replaced
in the future.
See https://github.com/stripe/jquery.payment
opw-1986545
closes#33356closesodoo/odoo#33376
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit improves the performance of product expiry activities generation.
It also removes direct refs to activity types to ensure code stability in case of user deletion of system data.
The xml refs to activity types should only be used through mail methods to ensure fallback strategies can be managed in the mail module only.
closesodoo/odoo#33300
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>