HTML fields used to have a toggle button for a "code view" (which came
from the Summernote library), in debug mode. This allowed the advanced
user to edit content with jinja conditions. This was lost with the new
editor but reintroduced for Mass Mailing. As it turns out it was needed
elsewhere so this makes the code view available as a node option, and
already activates it for mail templates.
To activate the code view in an html field:
```xml
<field type="html" options="'codeview': True"/>
```
Task: 2561300
closes#71860closesodoo/odoo#71891
X-original-commit: 0f9684677676b563a0ff2712e42cea24a2ef27bb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The user_type_id field seems a bit out of place at the moment
in the header of the form view.
We will move it to the accounting tab with other fields in order to
improve that.
Task id #2563472closesodoo/odoo#71879
X-original-commit: a542f24980982c6d4ec4d5281d79b20589cadafd
Signed-off-by: William André (wan) <wan@odoo.com>
On safari in saas-14.2, opening the full mail editor cause an error:
Traceback: Error: The string did not match the expected pattern.
matches@[native code]
getMatchedCSSRules
This is happening because this cause an error in safari:
document.body.matches(".custom-range::-webkit-slider-thumb");
and we get selector with :: that we should ignore because in d50c3b07f1
we use a global regex with `test` and multiple call of the regex on the
same string iterates over the string, for example:
var x = /a/g;
[x.test('a'), x.test('a'), x.test('a')]
gives [true, false, true]
opw-2489730
opw-2489515
opw-2502066
opw-2504051
opw-2518635
opw-2532695
closesodoo/odoo#71834
X-original-commit: ad0160de12d362baf56181478ee509ad223147fe
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
We should not assume that the default date of the message is "now". A message
should only have a date when it's coming from the database that supply it.
closesodoo/odoo#70069
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
- before this commit,
it was raising an error when trying to install the l10n_in module, due
to unavailability of report element
- after this commit,
l10n_in module can be installed successfully
closesodoo/odoo#71854
X-original-commit: b090da2e512c943dc554296faa7bbb7dfbc51cbb
Signed-off-by: Josse Colpaert <jco@openerp.com>
Currently there is an action_assign_serial_show_details button within
the detailed operations form of a serial tracked product move.
Unfortunately there is no way to undo the assigning/creating of move
lines from this action (including via clicking the "Discard" button).
This can lead to a lot of manual work (e.g. 500 SNs produced instead of
50) to remove unwanted move lines. To remedy this, we add in a button
to unlink all of the move's move lines whenever the Assign Serial
Numbers button is visible.
closesodoo/odoo#71831
Task: 2426281
X-original-commit: a6191c43001f961c20b5b4d32e1fcb218df69d17
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
We check if the mimetype is supported when uploading an image.
task-2523574
closesodoo/odoo#71839
X-original-commit: 3765ac1f1f1644c919456246f1a3791c47c45a83
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit will fix a bug related to the position
of the shapes Blocks/01 and Blocks/02.
- Now, they can be connected when using together.
- Avoid a bug of position when the snippet is too tall.
Fix related to the PR #70843closesodoo/odoo#71809
X-original-commit: b5f135f83e576f6b552392249913dacca45a7650
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
1. Add product category in inventory report.
2. Default quantity when creating a transfer switched to 1 instead of 0.
3. Remove the reorganize lines step in purchase tour (there is only 1
line).
closesodoo/odoo#69483
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Steps to reproduce the bug:
- Go to inventory > create a new product
-Create a new product category:
* Select "Manual" inventory Valuation
* Choose "First In First Out (FIFO)" costing Method
* Be sure that in "Automated" inventory valuation, stock journal is not settled
- Save
- Update quantity of the product
- Go to Inventory > Inventory Valuation> Choose the product newly created
- Click on the "+" button to make manual valuation
Problem:
An error is triggered because we try to access stock_journal when it is false.
Solution:
Use “account_journal_id” only if the valuation is real_time and relax the required constraint of `account_journal_id` in case of manual inventory Valuation (which is not used in that case).
Opw-2541497
closesodoo/odoo#71660
X-original-commit: 421271934c3eed43d2edcb410d3d75757c1fb81b
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Previously the number of hired people in the reporting was based on
if they were in a folded stage or not. Adding this boolean allows the user
to decide which stage should be used for the computation of the number
of hired people.
Task-2462536
closesodoo/odoo#66761
Related: odoo/upgrade#2205
Related: odoo/enterprise#16644
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, products relying on values of template fields (i.e.
image) were not considered updated when their fallback template field
was updated.
After this commit, upon update of a template image, all products that
would fallback on that template are "touched".
This avoids side-effects such as displaying an outdated template image
in the e-commerce for a given product.
task-2477438
closesodoo/odoo#71139
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit adds some tests on mailing.activity to ensure read grouping is only
possible when the user has access to the underlying document.
Task-2272475
This commit adds some tests on mailing.activity to ensure _searching is only
possible when the user has access to the underlying document.
Query count for 'test_adv_activity_mixin' had to be slightly adapted (+1) since
calling 'action_close' in turn calls 'activity_search' that calls 'search' on
mail.activity that now runs an additional query (see '_search' override
docstring).
Task-2272475
Currently, In TimeOff module If we schedule activity for leave to defer
in the subject of email we see some extra non-ascii characters.
because emails subject lines contains non ASCII characters so they can
not encoded.
So in this commit, replace the arrow sign by slash(/) between two dates
in name_get.
closesodoo/odoo#70416
Taskid: 2501374
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Currently, in My Profile all the users have access to language settings
even when the user does not have the rights to activate/deactivate
languages. Also, the language setting list is not user friendly which
needs to be imporved.
so in this commit hide "More Languages" button in My Profile for users
that does not have the rights and the language settings list is
improved by adding seperate buttons to "activate", "disable" and "update" a
language.
PS: groups does not work on My profile so added the compute field based
on group.
closesodoo/odoo#69292
Taskid: 2466771
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The problem arises when a user creates a backorder for a MO after
registering overconsumption of some components through the simplified view.
The quantities of the components of the new backordered MO are then wrong.
Components that were over consumed in the first MO will have smaller
quantities in the new MO, the difference being the amount over consumed.
This problem does not appear in the case of the Tablet View where a proper
recalculation of quantities is done.
closesodoo/odoo#64911
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit, when you create a lead from livechat with the command /lead, the public user is used inside the lead.
Because the public user is archived, and self.env.ref('base.public_partner').user_ids return an empty recordset.
closesodoo/odoo#71792
X-original-commit: 04ff97e40e3869b1350dca325251747629443e69
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
The shape is a particular one which connects at the top and bottom with
two sub-shapes. Those two parts used the same color which made it
impossible for an user to control them individually. This is now the
case.
This allows for a theme override in themes which used them at the top
of their homepage to have the first part with the same color as the
header, and the second part with the same color as the next snippet.
Part of https://github.com/odoo/odoo/pull/68336
task-2491890
closesodoo/odoo#71768
X-original-commit: e00bdd7bfd36a1205055a829807f5b8ab2d83221
Related: odoo/design-themes#14
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
A shape is made of different colors which are mapped to user color
combination colors (e.g. if a shape use the #3AADAA color, it is by
default mapped to color combination background color n°4). We allow
to add other arbitrary mappings for each shape should a theme want it,
thanks to another created class. This is especially useful for header
and footer connections in default generated pages where the combination
of classes "o_web_editor_Airy_12 o_footer_extra_shape_mapping" will
use a color mapping using the footer color if the theme configured the
Airy 12 shape to do so.
This commit also modifies the generation of pages made by the website
configurator to automatically add the header and footer respective
classes on first and last shape if one is found (if one is found but
should not have a specific color mapping, this is not a problem as the
class has only an effect if the theme declares it).
Part of https://github.com/odoo/odoo/pull/68336
task-2491890
X-original-commit: 232224ff8c54c5027ec20dd9ddd5c0afc121a092
A shape is made of different colors which are mapped to user color
combination colors (e.g. if a shape use the #3AADAA color, it is by
default mapped to color combination background color n°4). We allow
to change that arbitrary mapping for each shape should a theme want it
(for example so that its built default page can use that shape with
a different color without having to hardcode it).
Part of https://github.com/odoo/odoo/pull/68336
task-2491890
X-original-commit: 2be9718e686e97e30a043a687be725c9a986ea7a
Previously, the default colors of background shapes was based on the
base palette colors o-color-1 to o-color-5. We generated classes for
those shapes that used the default colors, so that shapes would adapt
with the palette, so that if the user switched palettes their shapes
would still use the palette colors. While this works, shapes are meant
to connect together (no problem here) as well as with the previous or
following section's background color, but since shapes were using the
palette colors directly instead of using the *background* colors defined
by the palette, if the palette (or the user) customized any background
color, switching palette would break some shape-section connection.
Part of https://github.com/odoo/odoo/pull/68336
task-2491890
X-original-commit: 527af189eac381844280c9dbd716aa2465172f59
*: website_mass_mailing
Useful for debugging: launching the homepage/theme tours automatically
allow to build the pages if you cr.commit() after running the test. This
will also allow to make those official test tours if we ever want it at
some point.
Part of https://github.com/odoo/odoo/pull/68336
task-2491890
X-original-commit: 71f30a4dcc59d4c7f4b5a2ab4c8be44218edf4b0
Useful when debugging: launching the themes tours automatically will
build the page with the snippets in the right order.
Part of https://github.com/odoo/odoo/pull/68336
task-2491890
X-original-commit: 6f97125ee48928f1665ed4c8a99ab53ebcfd20af
Steps to reproduce the bug:
- Let's consider that Reservation = manual (Inventory>Configuration)
- Let's consider two interna users I1 and I2 with the following access rights:
-Sales: own document only
-Inventory: user
- Login as I1 : Create sale order SO1 to sell a storable product P
- Confirm SO1 to create delivery order DO1
- SO1's Sales Person should be assigned to I1 and DO1's status should be "waiting"
- Login as I2 : Create sale order SO2 to sell P
- Confirm SO2 to create delivery order DO2
- SO2's Sales Person should be assigned to I2 and DO2's status should be "waiting"
Bug:
When I1 or I2 tried to access DO1 or DO2, an access error was raised due to personal order line record rule
opw:2530101
closesodoo/odoo#71725
X-original-commit: ab2663ae0e6f29540b8b8e8ef8b6178ecbd9d7b8
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Purpose of this task is to improve the refuse reason action to sent
the email using the automatic template.
Currently, when using the refuse action,there is no mail template sent
to the applicant.
In this commit, we improved Refuse Reasons wizard by adding the
send mail inside the wizard with email template so user can select the
send mail option and rpvide the template or default template while
refusing th application.
- On selection of the refuse reason:
- If in the settings, the refusal reason have an email template,
the send mail checkbox is true, and template is displayed (can be changed)
- If the refusal don't have email template, send mail checkbox is
unchecked by default.
closesodoo/odoo#57722
Taskid: 2313402
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Mahendra Barad <mba@odoo.com>
PURPOSE
Replace text fields by html ones now that our own html editor has been
merged. Indeed it gives more options to users in the way they format their
content without weighting too much on the UI as tools appear on demand
and not by default.
SPECIFICATIONS
Convert a lot of text fields to Html fields as we have our own OdooEditor.
In some modules code adaptation will be necessary to handle html /
plaintext conversion when required.
See individual commits per main application scope for more details.
LINKS
Task ID-2499504
closesodoo/odoo#71776
Forward-port-of: odoo/odoo#70663
Related: odoo/enterprise#18778
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This is a temporary fix, it needs to be fix properly in future.
It was working properly with HTML reports but when it is render with
wkhtmltopdf it does not apply padding on left. Due to which issue is occuring.
Task id: 2499504
X-original-commit: 2958c8d08f4bdab94ba55fc944db6d314fb3fa43
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) fleet.vehicle -> description
2) fleet.vehicle.log.contract -> notes
3) hr.job -> description
4) hr.contract -> note
5) hr.leave.allocation -> notes
6) hr.applicant -> description
7) lunch.product -> description
8) lunch.order -> product_description
9) lunch.product.report -> description
Task Id: 2499504
X-original-commit: afe52b050a7667f3f20696cd48cd922f635a941c
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