In website forms, for both html/text type of fields,
we provide simple textarea to users for entering the data.
And, we store the data as it is for both of them.
But with this change, we're trying to convert plain text
(entered by user in the online form for html type of fields)
into to html, so for example it can replace \n with <br> and
properly formatted data can be saved.
Task id: 2499504
X-original-commit: b8d5b61333b0e8570ea2eb0535e37a0025514812
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) crm.lead -> description
2) event.event -> note
Task Id: 2499504
X-original-commit: 524e2f089a611d897b98d86001bda5d17263db66
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> fields
1) maintenance.request -> description
2) maintenance.equipment -> note
3) maintenance.equipment.category -> note
4) mrp.workcenter -> note
5) mrp.workorder -> operation_notes
6) mrp.routing.workcenter -> note
7) repair.order -> internal_notes
8) repair.order -> quotation_notes
Task Id: 2499504
X-original-commit: 0cca26b5358cd9d69a65c6b93cfecb33d7e659c5
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) account.move -> narration
2) account.payment.term -> note
3) account.fiscal.position -> note
4) res.company -> invoice_terms
5) res.config.settings -> invoice_terms
Task Id: 2499504
X-original-commit: 0f3c7f153e8bd20f83b7d1df031634996d36935b
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) purchase.order -> notes
2) purchase.requisition -> description
Task Id: 2499504
X-original-commit: 43958eff2b9346420104002d628d5ca9225f8090
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) slide.channel -> description
2) slide.channel -> description_short
3) slide.slide -> description
Task Id: 2499504
X-original-commit: 6d914c005183aa5ae69650e3002a5a85ca83b4a6
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Adding a new method convert_online_event_desc_to_text
Because online events have fixed format for the description,
this method removes some specific html tags, and converts it into
readable plaintext (to be used in external calendars).
Models -> Fields
1) calendar.event -> description
Task Id: 2499504
X-original-commit: 0d5ca6a6fe8821b4ec19dd603bde116518721792
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fieldss
1) stock.location -> comment
2) stock.picking -> note
Task Id: 2499504
X-original-commit: 96f5316a219568add44bee528245c2c8e49c3bbc
It replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
Models -> Fields
1) sale.order -> note
2) sale.order.template -> note
Task Id: 2499504
X-original-commit: 6a345c2695129a5cd907e5e23e057871ebf9ebfa
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).
In this commit we replace report_footer and report_header field of
"base.document.layout, res.config.settings" model as
they are related fields of res.company models field
report_footer, report_header.
Task Id: 2499504
X-original-commit: 4c474d0d2055efe81fdc21502aa5957fe80af7ef
In this commit we have added new method name isHtmlEmpty in
kanban view. As we are convertting text field to html field,
we will need to check html field in if conditions.
As Html field will contain tags we cannot check it every time
perfectly. So, we need this method to make sure html field is
empty or not.
Task id: 2499504
X-original-commit: 2968dcea7fb58795eeb34949f4bbfc1029938cd1
Before this commit there were few cases in which
is_html_empty method was not working as our expectation.
In cases such as "<p class=""><br/></p>", "<p id=""><br/></p>"
and many other cases.
In this commit we improves regex of is_html_empty method.
Mow from this commit all kind of attributes will be consider
in this method.
In this commit we also have added is_html_empty in mail template, portal
values and in report values also for rendering templates.
Task id: 2499504
X-original-commit: fd0a05f2955b9f7e9ae7233afebfd6240c9244dd
Since the computation of employees work intervals is done in batch,
i.e. 1 call to _work_intervals for each (tz, resource_calendar_id) pairs,
removing tz duplicates from mapped results improves
the perf of hr_presence_state/hr_icon_display computations.
This is especially true for grouped hr.employee kanban view as each column
search_read triggers a recompute for these fields.
closesodoo/odoo#71772
X-original-commit: be6d4a2523bb1a292908d09dfc5393bc0aa88a2d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, when the start datetime of base_event_id in recurrences was not set, a traceback would occurs when trying to notify the user.
closesodoo/odoo#71724
X-original-commit: d5b9403c0023d8df49487293b217c59265189a7a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
When the user searches a phone number, the search function will generate
a pattern by removing the "+" sign as well as well as the prefix "00" from
the input string.
Problem:
If the input string starts with "+", it means that the phone number will
be prefixed by something different than "00". As the function will
systematically remove the first occurrence of "00" from the input string,
the function can remove part of the input string that does not correspond
to a prefix. The search results can hence be incorrect.
Example:
If the user types "+32485001122", the function will remove the "+" sign
and the first occurrence of "00" from the input string. In the provided
example, the function will search phone numbers matching with the pattern
"324851122" which is incorrect.
Solution:
The function should remove the first occurrence of "00" iff the phone
starts with "00".
Task id: 2479277
COM PR: odoo/odoo#69729closesodoo/odoo#70954
X-original-commit: 53b4a7cf045df8828716e31e6d2a56cf93123bba
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Make link tracker handle other types than many2one for tracking fields.
Currently, when a field of type char is returned, an error occurs.
odoo/addons/utm/models/utm_mixin.py already handles other types than
many2one for tracking_fields(). This aligns to that behaviour in the
link tracker.
opw-2494686
closesodoo/odoo#71780
X-original-commit: a2068f9696917d7fa4848bc09d05eced84d0cc2f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Move the lead mining section to the top right as we now have a lot more empty
space after the removal of the outlook plugin settings
Task-2531032
closesodoo/odoo#71544
X-original-commit: 1cb0c743c4c15d6817773d66a7ac27321b8bbada
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Rating mail template, from the 'project' module, has been improved,
by adding more margin to the top of the icons, which increase its
visibility.
--
task-2531541
closes odoo/odoo#71094
Closes: #71094
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Previous rating icons had readability issues, especially when used in
small containers. For this reason, this commit includes the following
improvements:
- New rating icons have been designed and included in PNG and SVG, in
order to increase readability.
- 'Thank you for rating our services!' template, in the 'rating'
module, has been revamped, by removing the old '.card' template and by
improving the shadow effect cast on focus plus a better user
interaction.
--
task-2531541
Closes: #71094
rounding_line_vals is invoked directly with a .create(), so the "currency_id" key's value should be an integer. See line 810.
This is hard to catch, i use Sentry on my servers and i found this bug. I cannot provide steps to reproduce, as i just see this bug report in Sentry.
closesodoo/odoo#71771
X-original-commit: 38de8fc52b4d6f6bdab4dd5e28eb9e3e5315145c
Signed-off-by: William André (wan) <wan@odoo.com>
This is computed automatically since
04522f01e6closesodoo/odoo#71777
X-original-commit: f6a2c5f1ebfefc16a91d7a6103704fbace955620
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
This commit updates owl to the latest release. It contains an
improvement: the support for the t-tag directive, which allow us
to have dynamic tagname in templates
Release on github: https://github.com/odoo/owl/releases/tag/v1.3.0closesodoo/odoo#71775
X-original-commit: a1c173ef6d3808a7c70b7e758e7e65fc6a40b2c7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When you are opening a POS session, a number corresponding to count of
connection to this session is incremented, to be sure to have a unique
identifier on receipts.
In recent browsers, when you are reopening a recent tab (Ctrl+Shift+t)
the browser will load the response of last request and won't perform the
request. So the count of login won't be incremented, and this will
result of duplication of receipt number.
To avoid this behavior, we are explicitly say to the browser (through
the response header) that we don't want to cache the request result.
closesodoo/odoo#71770
X-original-commit: 21c92bf4d1a469f5ec1d0edcf2b2e08102df5b20
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Adds two new columns to the vehicle model tree view.
Changes the name of the vehicle model action.
Modifies the order by which vehicle manufacturers are ordered.
Adds filter and modify goupby on vehicle, vehicle model/brand.
Task ID: 2487706
Steps:
- Go to Point of Sale
- Open a new session
- Add an item to the cart
- Click [+/-], [1] to get a negative price
- Reload the page
- Click Payment
- Click Cash
- Validate
- Close the UI and go back to the backend
- Click the three dots on the POS
- Click View / Orders
- Open the last order
Bug:
The order is still in "New" state and two payments of the same amount
have been registered. This results in the order not being fully paid.
Explanation:
`get_change()` returns the amount to be given back to the customer. It's
usually set back to 0 when the payment lines are created (e.g. when
clicking "Cash"). `amount_return` is then sent to the backend with the
order.
However, when reloading the page before clicking "Cash", no payment
lines are made and `amount_return` has been saved in LocalStorage with
the result of `get_change()`. `amount_return`, which is usually
undefined is now set back to its old value when reloading from the saved
JSON.
Because `amount_return` is not undefined in this case, it doesn't change
the result sent in the JSON when clicking "Cash"; it's not updated with
0 from `get_change()`. This results in two payments being recorded in
the order after validating and sending it to the backend.
This commit always uses the result of `get_change()` when sending the
order to the backend.
opw:2446563
closesodoo/odoo#71757
X-original-commit: 5d1640d05442613963426adc1d83fe066480c1a4
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Steps to reproduce the bug:
- Go to elearning app > Courses > content
- Create new slide > Upload a PDF file with faulty content
Problem :
Pypdf2 throws errors because it does not support some content or syntax.
In our case we are just trying to get the number of pages in the PDF, so if we put `strict = false`
we just determine that the user should not be informed of all the errors that pypdf2 encounters,
the flag `strict` is not a security indicator.
FYI: https://pythonhosted.org/PyPDF2/PdfFileReader.html
``` strict (bool) - Determines whether user should be warned of all problems and also causes some correctable problems to be fatal. Defaults to True.```
opw-2530829
closesodoo/odoo#71756
X-original-commit: 3acd0d666af56c39e34fc551e182468cc7bedc42
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
- added test case for click on author name and on author avatar.
task-2391179
closesodoo/odoo#71746
X-original-commit: df2f110df0fb7cbfee55e611cb0ceee4aceefdcf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Currently, when go to project > settings > enable 'sub-tasks'
create a task >> add a sub-task and archive the sub-task
then the archived sub-task is still displayed in the sub-tasks list
so in this commit, removed the active_test context from the field to
hide the archived sub-task. also include the timesheet of archived
task while calculating the subtask_effective_hours and on click
of sub task hour open the timesheet of archived tasks.
PS: revert of the commit: https://github.com/odoo/odoo/commit/7a2cba3c8934064b311da4312ef2fbd07c6329ec
As we would deduct archived tasks from the count and the number of planning hours,
and keep them included in the timesheets.
closesodoo/odoo#71719
Taskid: 2534898
X-original-commit: e527ed80e25f638390fd8c56296e690b1630ec49
Related: odoo/enterprise#18744
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Signed-off-by: Mahendra Barad <mba-odoo@users.noreply.github.com>
When the selected payment line is updated but is in state 'paid', it
adds a new line with the first payment method. Since we load more
payment methods than the ones in the pos config, we should only take the
ones that are on the pos config
closesodoo/odoo#71736
X-original-commit: 8e7739fd2299246e963e8da3f4c53b699b84c1eb
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
- Create a Product Category: (i.e. Category X)
* Costing Method: Average Cost (AVCO)
* Inventory Valuation: Automated
- Create a Consumable Product with Category X (i.e. Product X)
- Create PO with Product X and receive products
- On Product X form, update Cost
- In debug mode, go to Accounting > Accounting > Journal Items
Account move lines have been created for stock valuation on cost change,
but it shouldn't for a consumable product.
opw-2510315
closesodoo/odoo#71723
X-original-commit: b8e6f77101d28d05dd3d79c5b6de56da4dd5d2e6
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
This commit allows not to display the popover where we don't need it.
Like on the next or prev buttons of the carousel for example.
task-2537840
closesodoo/odoo#71721
X-original-commit: 60853837a234f9fbfee5816f8a4766cc5a0b7d19
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
If a payment request is made from a cron (e.g., Subscriptions' cron for
recurring payments), the worker is not bound to an HTTP request and
therefore the value of `request.httprequest.remote_addr` is an instance
of the 'LocalProxy' object, which is not serializable.
If we're in this scenario, don't send the customer IP address.
task-2494916
closesodoo/odoo#71717
X-original-commit: e85464ad2281f25cbaf7ded0c1e5d7659a322696
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Co-authored-by: Toufik Ben Jaa <tbe@odoo.com>
The timestamp color should be gray instead of primary green even when the thread is unread or needs action.
Task id: 2383054
closesodoo/odoo#71034
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
PURPOSE
- A helper should be aligned vertically in the systray menu.
- A sentence should also be changed by
"Congratulations, you're done with your activities."
SPECIFICATION
A helper changed and also it will be appeared in the
middle of the dropdown.
Task- 2525928
closesodoo/odoo#70832
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Owl 1 has some issues handling comments. So when people were in odoo
debug mode, inheriting in extension mode a t template, the comment
added from the server would throw a frontend error.
For now, we comment it, waiting for better comment handling in owl.
closesodoo/odoo#70227
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
When l10n_latam_invoice_document is installed and the current company
does not have a custom header (in stable, only Chile and Argentina with
their localization installed use custom header), printing multiple
invoice at once, one out of two had no header or footer.
This is because `<div class="header"/>` and `<div class="footer"/>`
should be unique per record being printed, and when a custom header was
not used they were duplicated with the duplicate empty.
As an example, if we had 3 documents:
- record 1 : good header
- record 1 : empty header
- record 1 : body
- record 1 : good footer
- record 1 : empty footer
- record 2 : good header
- record 2 : empty header
- record 2 : body
- record 2 : good footer
- record 2 : empty footer
- record 3 : good header
- record 3 : empty header
- record 3 : body
- record 3 : good footer
- record 3 : empty footer
When we give them to wkhtmltopdf, it would be mismatched:
- headers:
- record 1 : good header
- record 1 : empty header
- record 2 : good header
- bodies:
- record 1 : body
- record 2 : body
- record 3 : body
- footers:
- record 1 : good footer
- record 1 : empty footer
- record 2 : good footer
so record 2 will have empty header/footer, and record 3 will get those
of record 2.
opw-2507137
note: the master forward-port also remove t-if that are no longer
necessary since the same t-if is on an ancestor tag now.
closesodoo/odoo#69718
X-original-commit: 90bdb5c7b7aa6a9b98e9acb1774d449ae65a3918
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
987fc1190a had added a rule that made
empty fields non-editable so that a snippetless website would not be
editable. This makes empty t-fields non-editable as well which is - to
say the least - not welcome.
This commit fixes that problem by making the rule more restrictive: what
we don't want to be able to edit are empty _arch_ field specifically.
closesodoo/odoo#71718
X-original-commit: 6886c2a2a2ad47d1150dd072888c39ccfb59b163
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Currently, traceback occurs when same attachments are sync with
form view and bottom chatter and removed from chatter.
So in this commit, on click of remove attachment dialog wait
till the attachment id is removed from list of attachments.
closesodoo/odoo#65093
Taskid: 2431478
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, it's possible to add supporting documents on the chatter of
the time off. But it's not easy to use and doesn't make really sense.
So we will add the possibility to add it more easily.
So in this commit,
- Added 'Supporting Document' on Time Off type to support the
attachment based on types.
- On new Time Off, if the Time Off type has a support document then allow
uploading the supporting document in form view.
- The File is recorded on the chatter of the Time Off request.
- There will be synchronization between chatter and form attahcments.
PS: added non-stored m2m field to display the attachment view(m2m_binary)
in the form view as o2m does not support it.
TaskID: 2431478
Entry count can be useful to estimate the size on disk of a profile
file.
The entry count would be quite expensive to compute and thus should be
stored. It is impossible to use a compute stored in this case, since
ir.profile shouldn't have any "business" logic upon insert.
closesodoo/odoo#71673
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Even if only accessible when writing some custom code, the path option
of Profiler looked a little dangerous from a security point of view,
since this option allows to write the result of the collector anywhere.
This shouldn't be a problem, since Profiler shoudn't be accessible
inside a safe_eval() and the path param cannot be user defined, but this
is still a risk.
An alternative option would have been to give a file descriptor instead,
so that the user must have access to `open()`, which is unlikely inside
a server action. This alternative has some disadvantages, though,
because the file descriptor should be given when creating the profiler,
or at least before `__exit__()`, removing the possibility to add the
number of entries in the filename.
This commit proposes another solution: add a generic way to output the
profiler as a json text. The result can thus be saved the way the
developer chooses. A utility method format_path() will help to format
path the same way the profiler did before this change.
The usage of an additional optional context manager leads to the usage
of ExitStack. Unfortunately, this changes the initial format quite a
lot, decreasing readability and adding a loop on context managers, even
if there should be only one most of the time (request).
This commit proposes to a nesting utility for the profiler, allowing to
nest another context manager inside a profiler.
This solution allows an easier integration into http.py, avoids to
manage the "enter_context" case when recovering the init stack and can
be useful in other cases.
Improvement of get_dispatch_context_managers conditions and styling:
- Check profile expiration very first.
- Add an additional check for odoo.evented. Profiling will crash on an
evented server. Only longpolling should use evented servers, it but
this is more future proof.
Apparently libsass has never actually supported compound
selectors (or at least never the way people interpreted it should
work).
Therefore since libsass 3.5 (July 2017) that is deprecated and emits a
warning. Which is problematic because libsass is also hard-coded to
emit its deprecation warning to stderr[^1], resulting in a
few issues:
* because it's not decorated (let alone as a warning) it's not really
noticeable on the runbot or in most dev logs
* but because it's not associated with a logger it's basically the
only thing which shows up when running in `--log-level=warn` (as
it's printed at least once per tour)
* and it's pretty gnarly to get the information back in Python as,
again, hard-coded to stdout
odoo/odoo#70927 explored messing around with fds to intercept the
writes and re-emit them to the proper location, but that was
considered a bit too iffy.
And of course the intent was always to eventually fix the warning
itself, which qsm provided for in [a comment][fix-extend], the
important bit was the extension of `:disabled` so that's what's left
here to fix the warning. The logic of the fix is that the loader is
always used with the `form-control` class (internally) and the
`:disabled` part of the `form-control` styling is what we really want
to copy over. It's possible that third-party lose the styling if they
use `o_wysiwyg_loader` alone (without an explicit `form-control` next
to it) but that seems like an unlikely situation.
[^1] libsass 4 (sass/libsass#3135) surfaces warnings at the API level,
and removes the hardcoded / direct stream writing
[fix-extend]: https://github.com/odoo/odoo/pull/70927#issuecomment-847964413closesodoo/odoo#71667
X-original-commit: 5c2c6b881152630ffbf68d55c7c77fa2234f3ac1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>