We can call ``_render_field`` on template model directly. In this commit
we also add the dynamic language computation through ``_compute_lang``.
It will use the field defined in template.
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#106072
When calling ``_render_fields`` asked options are now considered as more
important compared to options defined in field itself (using render_options).
Purpose is to allow to force some options when necessary.
Task-2710804 (Mail: Clean MailThread API)
Part-of: odoo/odoo#106072
Due to recent improvements (Jinja -> Qweb, safe rendering) rendering API
supports several ways of giving options to the rendering process. Those
have mainly two usage
* ``preserve_comments`` : keep comments in rendered HTML, used notably
in mass mailing or digest to keep browser-specific comments;
* ``post_process`` : perform a post processing on rendered HTML, used notably
to process local links and add tracking to shortened links;
All those are now given directly inside an optional ``options`` parameter
given to ``_render_field`` and its sub-method ``_render_template``.
They can also be defined as field level, using ``render_options`` field
parameter. Some fields are updated
* composer mixin body (which impacts all inheriting models, notably
mail composer, survey and elearning invite wizards as well as appraisal
and appraisal feedback): post processing is now always done by default.
It was already done manually in calls that can be simplified;
* mail template body_html: post processing is now always done by default. It
was already done manually in calls that can be simplified;
* mailing body_html and preview are now post processed by default. It was
already the case in testing wizard. Preview is updated to avoid post
processing of links, as it was before. Remaining use case is the sending
which uses the mail composer, therefore was already post processed;
Finally some 'compute_lang' are explicitly added in _render_field calls in
order to be explicit on what we want, instead of being unsure.
Task-2710804 (Mail: Clean MailThread API)
Prepares Task-2088884 (Mail: Use editable computed stored fields in composer)
Part-of: odoo/odoo#106072
Purpose of this commit is to add tests on translations when using templates
and composer, on both email content (body, subject) and email layouting
content (view content, groups-based buttons, ...). This better highlights
some missing part of translation support, notably
* when being in mass mode: as content is taken from the composer and rendered
dynamically, it does not take the original translation from the template
even if it matches template content exactly;
* access button title is not translated as it is added during a separate
part of the process;
We also improve tests for ``mail.composer.mixin``. The wizard used in test
(mail.test.composer.mixin) is improve to behave more like a real invite
wizard: it runs on records (mail.test.composer.source) which are records
on which dynamic content is rendered. This highlights one issue with
translations: translations are fetched on current model (aka: composer
body and subject fields). However when using templates, translations are
stored on template model (aka: mail.template). This will be improved soon
by trying to fetch template translations when composer content matches
content from template.
Task-3046371 (Mail: Improve language propagation in mail and layouting)
Part-of: odoo/odoo#106072
In this commit we support calling rendering methods on void or falsy record
sets. Currently some rendering methods prevent from having 'None', some do
nothing specific. As Qweb or inline template support rendering on void records
we can safely support rendering on [], (), [False], [None]. Returned result
will either be void, either contain the rendered on void record for the
False or None key.
In this commit we also add a protection against trying to render a non
existing field. Instead of raising a KeyError, a ValueError is raised with
a clearer error message.
Task-2710804 (Mail: Clean MailThread Posting API)
Part-of: odoo/odoo#106072
Currently, the DIN5008 layout is a bit off and some aspects can be improved:
1. some fields are useless/unused (namely country, phone number and duplicated VAT number)
2. the size of the header and footer is too big, leading to out-of-frame text depending on the amount of information to be displayed
3. footer and company details fields (from the document layout) are not used, reducing user's customization
This commit addresses both these issues by:
1. removing useless fields
2. resizing the company information text de be more concise
3. replacing 'hard coded' company details/footer by their respective editable fields, and improving their default values to match DIN5008 requirements
task id=2821303
closesodoo/odoo#100723
Signed-off-by: William André (wan) <wan@odoo.com>
Steps to reproduce:
1. Create a membership product for a period of time in the past,
and one including the current day
2. Create a member, make him non-free
3. Create an invoice for the member for the past membership, cancel
the invoice
4. Note that membership state is not updated to `cancelled` (Problem 1)
5. Change the `date_cancel` on membership.membership.line
to a date in the past
6. Add an invoice for the current membership, note that the state is
updated to `cancelled`
7. confirm the invoice and register payment, note that the state is
not update to `paid` (Problem 2)
This line in `_compute_membership_state` causes the bug to appear:
```
if partner.membership_cancel and today > partner.membership_cancel:
partner.membership_state = 'free' if partner.free_member else 'canceled'
continue
```
To solve the issue, we remove the lines of code that made the state
to be stuck and use the membership lines only to calculate the correct
state.
opw-2978902
closesodoo/odoo#106179
X-original-commit: addd3fbfebddab7572a785a3c27c9f90ddc3408b
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Khanalizadeh Ahmad (khah) <khah@odoo.com>
Current behaviour:
When we are printing a report and then the report fails to generate
(for ex. wkhtmltopdf memory limit/timeout),
the incorrect state is committed to the database.
Expected behaviour:
We should rollback when generating reports fails, since it is an error state.
Steps to reproduce:
To reproduce the behaviour, we need to force an error state.
- In odoo/addons/base/models/ir_actions_report.py:`_run_wkhtmltopdf()`,
raise an exception before spawning the subprocess (for ex. adding a 1/0).
- In addons/web/controllers/main.py:`report_download()`#L2126,
add this little code snippet:
```python
ids = [int(x) for x in docids.split(",")]
report = request.env['ir.actions.report']._get_report_from_name(reportname)
obj = request.env[report.model].browse(ids)
if getattr(obj, 'message_post'):
obj.message_post(body='This report was committed!')
```
- Install Inventory
- Pick a delivery order and try to print it, there should be an error
(whatever exception you decided to raise in `_run_wkhtmltopdf()`)
- See that in the message board we got a message that the report has been committed,
which isn't the case, it failed to generate.
Reason for the problem:
Controllers are catching the exception when generating reports,
but never reset the state of the database.
Fix:
Raise an InternalServerError with an error code of 500 to trigger
a database rollback.
Affected versions:
- 14.0
- 15.0
- saas-15.2
- saas-15.3
- 16.0
- master
opw-3001950
closesodoo/odoo#106172
X-original-commit: ec185fcf7f32da05c83733af36bebe10ac22e2ad
Related: odoo/enterprise#34193
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
In PR 102662, we added a protection to manage the call to RPC in the new
form views when the component is destroyed.
This fix did not exactly reproduce the behavior of V15 and the new
relational model. The expected behavior of an RPC call when the component
is destroyed is a promise never solved. This commit will therefore
reintroduce this behavior.
In web, it is impossible to test this behavior because no rpc is
triggered when the view is destroyed.
closesodoo/odoo#106171
X-original-commit: 207f26ace6732c33d7169102f2a5a9695f5dda99
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Prevent the kanban view progress bar
from overlapping the courses count.
Task-3069581
closesodoo/odoo#106170
X-original-commit: 9eca4d4a6df7d14cbe6cc268a393caa663dcf68e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Some cases require usage of Markup in order to correctly display HTML content
and avoid escaped or invalid statements.
Fix: in hr_recruitment, support default_job_id from context, easing display
of job's alias in empty list helper.
Task-3074357
closesodoo/odoo#106061
Related: odoo/enterprise#34139
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, the listArchParser did not offer ways to be extended.
Specifically, when extracting fields and widgets, there was no way to add information
from the outside.
After this commit, the functions that parse fields, widgets and button are methods
of the class hence offering extension points. Specifically, studio uses those to add information.
closesodoo/odoo#105970
X-original-commit: 4c1e0ba228f294c7bd5dd067431a1b660960d8b5
Related: odoo/enterprise#34074
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Steps to reproduce the error:
- Install 'Maintenance'
- Select 'Maintenance' -> 'Request Maintenance'
- Create a maintenance request:
+ TH1: Save > Change stage to Repaired > 'Close date' =
Date.Today()
+ TH2: Don't Save > Change stage to Repaired > Save > 'Close
date' = blank
closesodoo/odoo#106166
Problem: App will show 'Close Date' blank
Expected: App will display 'Close Date' as Date.Today()
Solution: When Click on Save button -> Automatically get current date as end date
X-original-commit: a73b918f9f38f36b98e5dede4216a58bd56e31fa
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Prior to this commit, the image placeholder lacked contrast and wasn't
readable in small size (eg. in the kanban view).
This commit improves this placeholder.
task-2760590
closesodoo/odoo#105296
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Since odoo/odoo#99660
the `depends` field attribute is no longer passed
from the server to the web client.
Because of this, the "Set Defaults" feature
of the debug menu is completely unusable,
as the list of fields on which to set a default is empty because of it.
The use of this `depends` field attribute has been introduced in
revision odoo/odoo@ce9bbf6c10
In the commit description, we can read that setting a default
on computed fields having depends has been disabled
because the defaults set were being overwritten by the call to onchange.
Note that only the fact the field has depends is required,
the actual list of field names is not used, just the fact the list is
not empty.
However, since revision
odoo/odoo@488e334fc8,
available since Odoo 14.0,
this is no longer the case, the defaults are no longer being overwritten
by the call to `onchange`, since the `default_get` has been integrated
into the `onchange`.
A video attached to the pull request of this revision
shows the behavior difference.
Hence, setting a default on a computed fields having depends
(with an inverse method, hence not readonly)
can be allowed again in this "Set defaults" debug feature,
therefore avoiding to have to send back the `depends` field attributes
to the web client.
opw-3031290
opw-3038711
opw-3055292
X-original-commit: 48ac799288e76a0256b9ce0712a70ed5abc0f62e
Part-of: odoo/odoo#105251
Before this commit, the auto-invoice flow did not consider `sale order`
lines with negative quantities. It led to partially paid invoices.
Now, invoices generated by the auto-invoice flow are considered final.
This will allow `sale order` lines to be invoiced, even with negative
quantities.
task-2887019
closesodoo/odoo#104277
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Prior to this commit, payment was requested on sale orders with a
negative balance. Customers could settle transactions with a negative
amount. No payment provider allows negative transactions which would
lead to crashes and errors during payment.
Now, payment is only requested if the total amount of the sale order is
strictly positive.
task-2887019
Part-of: odoo/odoo#104277
Before this commit, when the user is just a planning user without any
access to the Employees and Contracts apps. A traceback is occurred
saying the user cannot access to the `hr.contract` model.
This commit adds a `sudo` in `_get_valid_work_interval` method to get
the resource calendar of resources within a interval (the one of the
gantt view). This sudo does not give any recordset in sudo since the
`_get_calendars_validity_within_period` method return a dict with
resource_id as keys and the intervals valid according the resource
calendar for the interval.
closesodoo/odoo#106138
X-original-commit: 0bf271eb41cd1622d8ba4c1882a8ea94f1bdb463
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Move code to support only the redirect from url containing double '/' in
the middle of the path.
Keep same behavior than v15 and default Apache behavior.
domain.com//shop/product/1 -> 404
domain.com/shop//product/1 -> 301 -> /shop/product/1
opw-3063387
closesodoo/odoo#106137
X-original-commit: fdd6bf9942e2807b6d1460dba1ca5f61404c7b06
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
RPC call may fail because of error in `base.automation` handler. In this case
the response contains attribute `exception_class=base_automation` to handle
error via custom dialog `BaseAutomationErrorDialog`, which provides extra
buttons (disable/edit Automated Action).
1.
`BaseAutomationErrorDialog` was incorrectly inherited from ErrorDialog, which
cannot extract traceback from `data.debug` value of jsonrpc. Fix it by replacing
it RPCErrorDialog.
RPCErrorDialog: https://github.com/odoo/odoo/blob/a75fcbe03f31fd10a74e609672b64dad165e68d7/addons/web/static/src/core/errors/error_dialogs.js#L62-L70
2.
Button `Edit Action` didn't work, because it tries the same rpc call before
navigating to the action. For example, it would repeat rpc call to create a
record, which doesn't work because of broken automated action.
It happens because form changes are saved automatically since Odoo v15.
Fix it by adding `target: "new"`.
opw-2845893
closesodoo/odoo#106134
X-original-commit: f54eef302323f1f6406e9b2ac8e02cec5b627fac
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Since the "always edit" task in form view, the underline (border-bottom)
only appears when input is `:focus` or `:hover`.
The problem occurs because the rule for `.o_field_invalid` doesn't match,
so the transparent color is applied and the red underline only appears
when we are hover or when the field has the focus.
This commit fixes the problem by setting the border transparent only
when the field is not invalid, not hover and not focus and not in a form
`.o_field_highlight`.
So now, we better see the invalid fields without hovering it.
Steps to reproduce:
* Open Project
* Select a project
* Select a task
* Create a new task
* Try to save manually the task => BUG a notification appears but the
"task title" (name field) is not underline
Task ID: 3069662
closesodoo/odoo#106123
X-original-commit: 1666ee5515996fab8a843b36b4fd93b776172f75
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
To Reproduce
============
- create a subscription
- confirm it and create invoice for it then confirm it too
- go back to the subscription and renew it
- from *Action* generate a payment link
- a validation error will be raised
Problem
=======
we can't generate the payment link because the amount is 0, this value came from the fact that we substract
the sum of invoices amount linked to this subscription from the total amount.
Solution
========
The invoices from the old subscription are kept just as history in the new one, and must not be taken into account when
computing the amount, so a condition was added to remove theses kind of invoices from computation of amount.
opw-3052816
closesodoo/odoo#106104
X-original-commit: 62e6db19d6ec17805756f277ca6f17c50281f707
Signed-off-by: abla001 <abla@odoo.com>
The purpose of this improvement is to easily identify the module of a
test and to be able to run only the tests of a module.
closesodoo/odoo#105530
Task-id: 3062058
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
As `_get_view` is cached,
and `_get_view` has been overrided to change the label of the fields
`company_rate` and `inverse_company_rate` according to the company
currency, the company currency must be added in the `_get_view` cache
key, so it returns the view with the correct labels
when you use two companies with distinct currencies,
and not the label using the currency of the other company.
closesodoo/odoo#105301
X-original-commit: b106361d60413940622b477f73cfdf1536f2ef38
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Before this commit, creating a new leave as an officer
from the approval tab would have by default no time off type,
resulting in "Employee on False" in the display_name.
After this commit, the display_name will set "on Time Off"
instead of "on False" when there is no Time Off Type set.
task-3054318
closesodoo/odoo#104963
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Steps:
- Go to studio
- Open report editor in any report
- Use Text block
- Insert /checklist
Normal bullets without boxes are used in the report, because the checklist are styled separately in web_editor/static/lib/odoo-editor/src/checklist.css
opw-2995045
closesodoo/odoo#102072
X-original-commit: 9b4a1d3a45d294797813d653090b3a3c541210f5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
Fields `product_qty_available` and `product_virtual_available` on
stock_move are related on quantities fields of move's product_id. On
large database, those two fields will slow down every transactions that
updates stock move state (confirmation, validation, ...).
`state` on stock.move is a dependent field of computed field `qty_available` on
product.product which is dependent field of related field
`product_virtual_available` on stock move. This relation tree implies
that updating the state on one particular stock move will mark its
product (qty_available) as 'to be recomputed' and thus **every** stock
moves (product_virtual_available) of this product as to be recomputed.
On database will 100k+ stock move per product. Fetching all stock move
of some products take 90% of a manufacturing order validation time. This
is problematic knowing those two quantity fields are only used in the
stock move tree form so computed anyway at the view rendering.
This commit change the `depends` of those two related field to mark them
as to be recomputed only if the product_id change.
closesodoo/odoo#106070
Opw: 3047017
X-original-commit: 189e825e567e4c633d721ce9f0fee906535edf06
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
The preview of a mailing was displayed twice:
- after a save and when clicking on the preview button
- when double-clicking on the preview button
This solves those problems.
Technical notes: quick explanation of the fixes:
- double display after a save: the click event was registered twice (same for
the code preview button), the fix unregister the click before registering it
again.
- double display when double-clicking quickly on the button: the modal is not
displayed immediately and the button remains active a brief moment allowing a
second click. The fix disables the button when the button is clicked and
reenables it when the modal is closed.
Task-3047479
closesodoo/odoo#105974
X-original-commit: 0403938c3e0103d97ae828afdae06fcda06bd406
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce:
- go to Contacts app;
- add a reporting view (Graph, Pivot or Dashboard) (with studio for example)
- tape any character in the search bar;
- on "search related company for" field either use the arrow keys to go down to this and then click the right arrow key or click on the triangle to the left of this field.
Issue:
An error occurs.
Cause:
There is a mismatch between the parameters that are sent by the rpc call and those processed by the logic part.
Specifically, the domain must be part of the kwargs and not the args of the params key in the rpc call.
The problem occurs with a filter that looks like: `<field name="parent_id" domain="[('is_company', '=', True)]" operator="child_of"/>`
Solution:
Move domain in kwargs under key named args in the params of the rpc call.
opw-3031096
closesodoo/odoo#106074
X-original-commit: 8a9b418b27dcc9b904413f14cd0443f9a5b10d17
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Before this commit, when the database is launched on an Apple computer,
the demo data in sale_timesheet module cannot be installed because of
the emoji is not correctly managed by a OS version of Apple.
This commit removes the emoji to be able to launch an odoo database on a
Apple computer.
closesodoo/odoo#106008
X-original-commit: 7004415e641b419a9adf35738b9bbb71864d17b3
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Steps to reproduce:
- install a localization which uses the account_edi module;
- define Lock date for the fiscal period;
- choose an invoice which was sent before this date;
- click on the "REQUEST EDI CANCELLATION" button.
Issue:
We try to cancel the EDI document despite exceeding the fiscal period.
Cause:
The verification of the fiscal period is done when clicking on the "RESET TO DRAFT" button which, in the flow, is after the request for cancellation of the EDI document.
Solution:
Make a verification of the fiscal period when clicking on the "REQUEST EDI CANCELLATION" button.
opw-2990873
closesodoo/odoo#106096
X-original-commit: fda04e2153f541ddf88afc60be4662a0d78ea7ce
Signed-off-by: Josse Colpaert <jco@odoo.com>
Steps to reproduce:
- Go to Purchase -> Reporting -> Dashboard
- click on the "expand" arrows of the pivot view
- favorites - add to dashboard
Bug:
adding a view with no actionID causes the dashboard to crash on load
this [commit] prevents adding a view with no actionID
Fix:
added a default value of False to add_to_dashboard actionId
only display the option to add_to_dashboard for views that have actionId
opw-2965036
[commit]:https://github.com/odoo-dev/odoo/commit/7180d948f084d4f68d1660cb884c95aaf41288faclosesodoo/odoo#106093
X-original-commit: ff926a5b4390b38db339440c18dd2d5380df7d61
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Steps to reproduce
==================
- Use a mobile phone / mobile view in devtools
- Go to Accounting > Customer invoices
- Click on one item
-> A traceback occurs, the uom is missing
Cause of the issue
==================
The field is declared as
`<field name="product_uom" groups="uom.group_uom"/>`
The raw value is accessed with
`<t t-esc="record.product_uom.value"/>`
Solution
========
Add the missing group
opw-3070671
closesodoo/odoo#106066
X-original-commit: 6563e7b077ade8da333b710578a23ee8ac23a025
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
When a picking is a dropship type (i.e. having the vendors as source
location and the customers as destination locations), then the
warehouse_id is removed.
This will add consistency between automatically generated "Dropship"
type and the manually created ones.
Part of task-2985735
closesodoo/odoo#106039
X-original-commit: efe7cfb0b94f485908c4e8510bd0ba6ff154018b
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Avoid raising an error if `warehouse_id` isn't in the vals.
Steps to reproduce :
Inventory -> Configuration -> Operation Types -> Create a new Operation
Type.
Then, either the warehouse field is empty because it doesn't appear due
to the multi-warehouse not being activated yet, or its saved when the
field is empty.
Changes the onchange into a compute to have a better consistency between
the frontend and the backend.
Part of task-2985735
X-original-commit: 2421619ecb0c2076f1d1694a30a724c92ff94c87
Part-of: odoo/odoo#106039
The dot (period) is removed from user-facing strings in powerbox
commands, and the corresponding msgid in .pot files are updated.
task-2901665
closesodoo/odoo#106032
Related: odoo/enterprise#34116
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Steps to reproduce:
- Install `Expenses` module
- Go to Settings > Technical > Email > Aliases
- Edit the `expense` alias
- Ensure the model is `Expense`
- Set `Alias Contact Security` to `Everyone`, then save
- Send an e-mail to the expense alias, using an e-mail address not
referenced on one of the employees.
Issue:
Error in logs related to `currency` variable.
Cause:
Trying to create an expense for a non-existing user, therefore,
no currency is set.
Solution:
If no user is found, no need to create the expense and let the orm
raise the error that a required field is not set (field employee on
expense).
opw-3027350
closesodoo/odoo#106057
X-original-commit: a339caa2faf8cde0ec1c85079b9d74f31b055f24
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Sending a context when you are closing a `pos.session` will allow you to
make some validations/actions only when the closing is being done from the UI.
For example, sending values for new fields or a message that includes
something from the pos, like the Cashier ID, name, etc.
Also, it will help more when it is necessary to inherit the function in a
simpler way, to avoid having to overwrite it.
closesodoo/odoo#106044
X-original-commit: 3f7d6833b8c85a0c3469eced160bd72884c18d22
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Steps to reproduce:
- Activate debug mode
- Go to Sales and open a quotation (actually any form view from any
module will do)
- Start Studio
- Select the "Confirm" button (or any of the top buttons)
- Check the "Set approval rules" box
- Edit the domain by clicking the 'filter' icon next to the 'trash' icon
- Add a condition. You can just keep the default one.
- Click save to save the domain.
- Again, click on the 'filter' icon.
You should see that the domain in the text editor is malformed.
Furthermore, should you change the domain in the text editor (let's say,
change 1 to 2) and hit save, an error message will pop saying the domain
is not properly formatted.
opw-3001622
closesodoo/odoo#106043
X-original-commit: 9535026e00ca07453863d13d68935732cac49bfe
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Current behaviour:
When rendering a calendar view with "Year" option,
the weekday headers may be incorrect in some cases
when the timezone is set to a negative timezone GMT.
For ex. it renders "S S M T W T F" instead of "S M T W T F S",
if the first day of the week is Sunday.
Expected behaviour:
Formatting should be consistent with the first day of the week,
and be indepedent of the timezone.
Steps to reproduce:
- Change your system timezone to somewhere in Alaska
- Install TimeOff
- Open TimeOff and switch to the yearly view.
- Observe that the weekdays headers are incorrect.
Reason for the problem:
The custom calendar header formatter was trying to generate
the end result directly based on the date marker, which is
incorrectly set in that context. This patch doesn't fix the root
cause of why the `info.date.marker` starts at an incorrect date.
Fix:
A formatter shouldn't read state. Since we are using the luxon plugin,
we use the `"EEEEE"` format, which is equivalent to the `"narrow"` options
from JS's `Intl.DateTimeFormat()` available in all browsers.
Affected versions:
- 16.0
- master
opw-3033464
closesodoo/odoo#106041
X-original-commit: e212f8752047222d1d81e1e9589934e70ecacf2a
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Remove unused parameters, trying to keep a simple API. Those are not used,
probably coming from old usage of rating module. Subtype, composition mode
and email layout XMl ID are never set. Until further requirements better
fallback on default values.
We also also clean a context key usage while passing by, as it is not used
in standard codebase anymore.
Task-2710804 (Mail: Clean MailThread Posting API)
closesodoo/odoo#106024
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
When task project is changed in through the view the kanban_state remain the same
until the record is saved.
After this commit:
When changing project, kanban_state is changed to 'normal' direclty.
task-2849291
closesodoo/odoo#91174
Related: odoo/upgrade#3523
Related: odoo/enterprise#27287
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
After this commit:
- When duplicating project or task, assignment notifications and emails on stages are not sent
task-2849291
Part-of: odoo/odoo#91174
Before this commit:
- Task followers are not copied when creating subtasks
After this commit:
- Created subtasks have the same followers as their parent task with the same subtype_ids
task-2849291
Part-of: odoo/odoo#91174
Purpose is to try to have code easier to read and to update by having a
common way of sorting / writing code. Reorder some fields definitions and
dictionaries, update docstrings, ... in mail applications or when invoking
mail thread API.
Additional stuff worth noting here
* add some tagged in tests helping debugging / choosing tests to execute;
* in a test about mail generation with server action: correctly check
body_html field, not body which comes from the mail.message inheritance
(currently filled due to a side effect but actual field to check is the
html one);
* add same check on input for ``_render_template_qweb`` as done on other
rendering methods (even if rendering on [False] should be supported);
* move code translation update from specific tests into main test class
(code update due to new translations, followup of odoo/odoo@f8c2b02abe);
Some test linting done here
* reorder mail_render tests, remove some duplicated tests;
* reorder mail_template tests, remove some duplicated tests;
Task-2710804 (Mail: Clean MailThread Posting API)
closesodoo/odoo#106025
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>