*: web, website_sale_stock
Since [1], the widgets allowing to edit the different colors of a color
combinations are gone, except the first one. This is because the qweb
rendering calls have been modified to use the new `renderToElement` util
which silently ignores root nodes if there are multiple ones in the
rendered template. In the same way, a specific dynamic snippet and a
stock feature were also broken.
After this commit, those three features will be restored. A crash will
now also occurs in case `renderToElement` is called to render a template
with multiple root nodes (that is actually how the two last broken
features were found, breaking during existing tests). For the first
feature, a specific test has been made too.
[1]: https://github.com/odoo/odoo/commit/6303a3eacdca012649a2ffda627b65c17a7217f1closesodoo/odoo#133068
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This PR adds a panel to consult all attachments of a discuss channel
easily.
task-3476444
closesodoo/odoo#132784
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
before this commit, in the generate payment link wizard,
the copy button is always disabled and user cannot copy
the generated payment link.
after this commit, when there is no warning user can
copy the generated payment link from wizard
closesodoo/odoo#133542
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This component was necessary during the transition phase, when all
actions weren't converted to owl yet. Now, they are, so we can get
rid of this small compatibility layer.
Part of task~3439226
closesodoo/odoo#133489
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commits make a new standalone test for Markup()
The idea is to only flag the usage of Markup inside of runbot if
it is called on the non-constant string.
Markup('<span> %s </span>') % text #should not raise a flag,
Markup('<span> %s </span>' % 'text') #should raise a flag
closesodoo/odoo#131206
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Co-authored-by: Alex Roscav <roal@odoo.com>
*: attendance, expense, holidays
In commit d832fcf, the
`many2one_avatar_user` widget has been added in various places,
sometimes repeating the avatar where it isn't needed.
Some occurrences come next to the avatar's name which is called via a
`t-esc`, but the option `display_avatar_name` is available and has been
used instead.
task-3470340
part of task-3326263
closesodoo/odoo#133150
X-original-commit: 0b268a9e3c31d5b57bb9f60ea93153289d02ddf9
Related: odoo/enterprise#46286
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Allow developers to format integers/float
using "human_readable" options for integer
field (e.G. 500G instead of 500,000,000,000)
Use decimals options to choose how many float
number are displayed.
Let's see in unit test for examples.
task-3418678
closesodoo/odoo#130402
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Before this commit, the PoS unnecessarily loaded all product packaging,
even if their corresponding products were not loaded in the PoS due to
the limited product loading option. Adding to this inefficiency, the
`add_packagings` function would only include those packagings whose
associated products were available in the PoS, making the loading of
all packagings pointless. The optimal approach should focus on loading
only those packaging whose products are already loaded into the PoS.
Also, if you scan a product packaging that was not loaded in the PoS,
it won't fetch it from the server.
opw-3436019
closesodoo/odoo#133559
X-original-commit: f2eb06c2089da27a0dfdc5e569fe50e65103ee8a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Related to previous commit c07181b20b,
this commit fixed missed remplacments of this.env._t by _t, also
replace one occurence of _lt (not exist anymore) and replace remainings
core._t.
closesodoo/odoo#133503
Related: odoo/enterprise#46496
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Current behavior:
When you settle an order in the PoS and completely validate it, the
remaining moves from the original sales should be cancelled.
However, it was not the case because we were not adding all the picking
in the `waiting_picking_ids` list. And so when we were checking this
list we were not cancelling all the moves.
Steps to reproduce:
- Setup multi-step routes (Inventory > Settings > Multi-Step Routes)
- Change the configuration of the warehouse to use the multi-step routes
- Create a sale order for any product and confirm it
- Open the PoS, and settle the order you just created
- Validate the order
- Go back to the sale order, and check the state of the delivery
- Only one picking has been cancelled
opw-3390529
closesodoo/odoo#133547
X-original-commit: c57b8286e3dedb75db68f27fc514224f6ba8d1c1
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
For loyalty programs of type 'coupons' with no rules defined,
the points were not being calculated correctly in the PoS.
The pointsForPrograms function was returning an empty list [] when
no rules exist. This caused _getRealCouponPoints to skip calculation.
This commit checks the program type and returns the points
if it is 'coupons'.
opw-3457550
closesodoo/odoo#133445
X-original-commit: 25ff280dfbec7e6d6f1c0a345e1902a2ab5c0774
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Before this commit, in an editable list view grouped by a many2many
field, it crashed when the user tried to add a new record, because
the default value set in the context was wrong (it was an id, but
it must be a list of ids, containing a single id, the one of the
group where we want to create a record).
As this is a master fix, this commit takes the shot to refactor a
bit the way we extract information from groups returned by
webReadGroup, s.t. everything is now computed directly (before,
the serverValue was computed in the datapoint, which didn't allow
us to use it in the context). We can also get rid of the context
handling in kanban (where the bug wasn't present), as it is now
correctly generated in the model for everyone.
closesodoo/odoo#133420
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In the ORM computation for account_account's root_id field, the root_id
will be set to NULL in the db if the code doesn't evaluate to True in
Python. This means that if the code is the empty string '', the
corresponding root_id will be False and the account will not be shown
under any root subsections in the chart of accounts, only the All
section (which makes sense). In normal use empty codes can't happen
because the UI doesn't allow it. The database does, which means it can
occur in certain corner cases.
The account root view computation is inconsistent with the ORM
computation and it will generate an empty account root with id 0 for an
account with an empty code ''. This account root can't be referenced by
an account because if the root_id is False, there is no reference and if
the root_id is 0, you'll get a traceback when loading the chart of
accounts. A read_group call will be done that filters on non-NULL root
id's (like 0) in account_account, but the ORM will then interpret that 0
value as False. This means the read_group call ends up returning a
boolean instead of a tuple for that line, which causes a traceback when
the tuple is expected.
So to summarize, this change prevents an account root that can't be
referenced from being generated in the obscure corner case where the
code is ''. It aligns the logic of the account root view computation
with that of the ORM computation.
I didn't keep the check on NULL from the original query, because the
code is a required field.
closesodoo/odoo#114279
Signed-off-by: William André (wan) <wan@odoo.com>
Don't do it only at install.
closesodoo/odoo#133505
X-original-commit: 359f3ac3075f4b79e830ebe33fded49f3e8febcb
Signed-off-by: Nicolas Seinlet (nse) <nse@odoo.com>
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
Since the relational model JS refactor in
d4fe919db5, we are unable to create new
branches of companies.
The required field `partner_id` (which is created in the model's
`create` method), was set as `required="0"` on the form view, but not on
the list view. After the relational model refactor, when merging the
modifiers of the field in both views, it is considered required. When
trying to save a new branch, it thus complains that the `partner_id`
field is empty.
Setting the `required="0"` modifier on the list view solves the issue,
making the `partner_id` not required anymore for the JS form dialog.
task-3461421
closesodoo/odoo#133488
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
A customer has a gift card product linked to a specific income account.
When sold, the income account associated with the gift card product is
credited correctly. The issue arises when the gift card is consumed
within a sales order. An order line is added using a "dummy product" to
indicate the gift card's usage (one dummy product is created for each
loyalty program). Due to this, when an account move is created from the
sale order, the income account defined on the dummy product is used
instead of the one on the gift card product. This leads to the wrong
income account being debited, causing unbalanced accounting entries.
There's currently no way to link back to the original gift card product
from a `loyalty.card` record. Because of this, the system cannot
identify the correct income account to debit. Fixing this would require
adding a new field, which we can't do in stable.
A potential workaround is to find the dummy product and set the income
account to the same as the gift card product. However, with one dummy
product for each `loyalty.program`, all named "Gift Card", finding the
right dummy product is difficult.
This commit aims to simplify the workaround by adding a link to the
associated dummy product on the `loyalty.program` form view. This change
should ease the process of finding and modifying the correct dummy
product, thus mitigating the issue in the current stable version.
opw-3239720
opw-3373287
closesodoo/odoo#133461
X-original-commit: 767eccb122055cd9a474ce5110cb7296eb9ef4c2
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
Minor cleanup after odoo/odoo#104741 thanks to edge-cases and the fun
complexity of logistics code. Fixes include:
- removing some readonly=False that were added on computed/stored fields
that already have an inverse func or were already not readonly (i.e.
redundant => cleanup)
- fixed visibility of qty to prod in subcontractor portal view of a MO
(i.e. yay they know how much they're supposed to make again)
- remove unused imports
- adding back in readonly functionality of default dest of repair
operation type (and removing the now useless field override that used
to add in the readonly functionality)
- adding back in the `_set_product_qty` inverse function since it was
probably removed by mistake (and is still important to have)
unrelated to viewpocolypse change, also fixed:
- mobile view of PO was for some reason allowing products to be changed
in already confirmed/done POs, which could lead to some inconsistent
data => made this consistent with existing desktop view behavior
closesodoo/odoo#133502
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
1. When the width of a message is greater than the width
of the chatter, a horizontal scroll bar should be activated
on that message, and not on the whole chatter.
2. margin on the seperator to make it more consistent
task-3478057
closesodoo/odoo#133482
X-original-commit: 56a7278edfc717e9e856feccc7514d99d1bf0b2c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Bug
===
The labels of the properties and their names are always required,
the check was wrongly done and still used the historical name "id"
instead of "name".
If a property value is missing, the color of the label is marked in red.
But the datepicker and dropdown are also in read which we don't want
(only the label).
Task-3188915
closesodoo/odoo#133479
X-original-commit: 5c0720743d299eec305a025d20201103f9f45dc5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce
==================
- Remove the Accounting/Billing permission from Marc Demo
- Login as Marc Demo
- Start a POS session
- Click on "Cash In/Out"
An error occurs because the user doesn't have the appropriate
permission
Solution
========
Add a key `has_cash_move_permission` in the pos config.
Set it to the presence/absence of the group `account.group_account_invoice`.
If the permission is missing, hide the "Cash In/Out" button.
opw-3333622
closesodoo/odoo#133444
X-original-commit: 62ea247953e5d8e81b3af7d4bbde3ec2ffb49f19
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Before this commit, avatar url of author of message always had
style `.o_object_fit_cover`, which makes a nice crop when
ratio of image does not match ratio of the `img`.
When the author of message is a company, it shows the logo of the
company, and it doesn't look nice to crop it.
This commit fixes the issue by using `.o_object_fit_contain` for
avatar of company, so that the logo is fully visible.
When displaying the avatar of a partner whose `is_company` is
undefined, the data is group-fetched, in order for models to
eventually know the value of `is_company` and use the correct
desirable showing.
Task-3381748
closesodoo/odoo#133311
X-original-commit: 48194366f2364e2eb9d99dc4fb71e2de83d8f7a2
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Instead of having a count field for meetings linked to
a crm.lead, show a (start) date instead:
- If there is a next meeting, show its date + "Next Meeting"
- Otherwise, show last meeting date + "Last Meeting"
- If no meeting, show no date and display "No Meeting"
- hide button for new records
This commit removes the field "calendar_event_count" that
has no use anymore. A test using the count field is adapted.
Another is added to assert new fields behavior.
UPG PR odoo/upgrade#4935
Task-3418397
closesodoo/odoo#128366
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before chrome 116, programmatic clicks on disabled buttons weren't
actually fired. With chrome 116, they are. As a consequence, some
tests fails on chrome 116 because they click (on purpose) on
disabled button to highlight the fact that nothing happens.
This commit improves the click helper to make it throw an error
when the target is disabled. It also adapts the tests that were
clicking on disabled button, in general to simply assert that the
button is disabled instead.
closesodoo/odoo#133196
Related: odoo/enterprise#46398
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
This commit removes the legacy session and adapts the modules where it
was used.
task 3439226
closesodoo/odoo#133153
Related: odoo/enterprise#46290
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit removes almost all exports of the module services/core.js
(only the bus is left) and adapts the module that imported it.
task 3439226
Part-of: odoo/odoo#133153
This commit adds an option to save the record after an update. When the
save option is set to true, the record will be saved and reload after
the update. Note that, the onChange is not done in this case.
Part-of task-id~3179751
closesodoo/odoo#130328
Related: odoo/enterprise#44905
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
With this revision, it's now possible to display a button to switch from
an editable list view to a form view. It's possible by adding the
attribute open_form_view to the tree element in the list definition. It
works both with base and embedded list views.
Task-id 3063425
Part-of: odoo/odoo#116989
Before this commit, the "style-inline" option was misspelled as
"styleInline", resulting in setting the Wysiwyg "inlineStyle" option as
undefined. This broke functionality that depended on such option, such
as disabling the convertion of pasted/dropped base64-encoded images to
attachment for mail compose.
OPW-3448851
closesodoo/odoo#133406
X-original-commit: 4ec687366eca1e05716fe93dad77eef5a9981153
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) <rcdl@odoo.com>
Needed a new view just to be able to change the default display text in the calendar
Task-3251698
closesodoo/odoo#126358
Related: odoo/enterprise#41304
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
- For the Planning app calendar we now need to be able to fetch specific fields from the filters record
we don't want to inherit the whole loadDynamicFilterSection method so we created an addFilterFields method
used to fetch specific fields from the record accroding to the filterInfo ()
- we also need to display specific text when creating a new record from the calendar view, for exemple in calendar 'New Shift'
rather than 'New event' but we don't need to override the whole editRecord() method so we created a getter: editRecordDefaultDisplayText()
- For the css files, we lowered a bit the checkmark icon in the filters, and we added a new class that prevents the icons background
to become invisible when the filter checkmark isn't changed
Task-3251698
Part-of: odoo/odoo#126358
Purpose
=======
Allow to drag and drop properties to re-arrange them. Also allow to drag
and drop an entire group of properties by drag and dropping the
separator of the group.
Specification
=============
If we have no groups, and we move properties, we want to create
automatically new groups in order to keep the column separation.
So if we have
```
AC
BD
```
and you move B in the second column, we will create 2 groups to keep
the separation, so it will become
```
12
--
AC
D
B
```
so `C` stay in the second column.
Task-3188915
closesodoo/odoo#113974
Related: odoo/enterprise#37668
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose
=======
Add the "separator" properties type, to be able to group properties.
Specification
=============
The separator creates a group until the next separator, we can fold and
unfold the properties in a group.
Technical
=========
The separator is only stored on the definition record, so it does not
take more space than needed.
The "fold" information is stored in the local storage, and is therefore
per user, but shared for all records of the same parent.
We use a properties type for it, to be able to use the exact same code
as other properties (so we can easily move the separator, etc). So
the order of the properties in the definition, and the position of the
separators will create the groups.
Task-3188915
Part-of: odoo/odoo#113974
Since [1] the line height is specified as an absolute height instead of
a ratio of the font size. This leads to multiline text with big font
sizes to overlap.
This commit removes the `rem` unit from the `body-line-height` primary
SCSS variable.
Steps to reproduce:
- Drop a text snippet.
- Select a paragraph.
- Change font size to 62.
=> Lines of paragraph did overlap.
In case the value had been edited before this fix, it will be shown
with the "rem" text within the option, which can be removed to update
the value to the correct behavior.
[1]: https://github.com/odoo/odoo/commit/388e4bb2bfcaebdd4ff30277fb49a034592d7086
task-3471117
closesodoo/odoo#133401
X-original-commit: a368dad33d128c95262053769e3f5de852d2be3a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
This commit fixes an issue introduced in #118966. For the mobile preview
feature of email marketing, styles used to be loaded by rendering an "empty"
template with the necessary styles. These styles, however, are no longer
imported in a template, but instead in mass_mailing's manifest.
The fix is to manually load the bundle and create the link tags to add the style
to the mobile phone preview.
Task-3465776
closesodoo/odoo#133400
X-original-commit: b2796d8016be83a1d08f28ef48e98db90c07da69
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
After this commit, we prevent the slideshow from appearing when clicking
on an "Images Wall" snippet image that has been set as a link.
Steps to reproduce the bug:
- Drag and drop an "Images Wall" snippet onto the page.
- Add some images in the snippet.
- Click on an image within the snippet.
- In the editor text toolbar, click on the "Link" button.
- Set the URL of the link to "/contactus".
- Click on the "Save" button in the modal.
- Save the page.
- Click on the image with the link.
- Bug: The slideshow briefly appears before redirecting to the "contact
us" page.
task-3425624
closesodoo/odoo#133396
X-original-commit: 8b29eabbd5a01ab225c93f519ea39724bdf3c0b9
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
In a kanban (or list actually) view grouped by a many2one field,
the "false" group is folded by default. Before this commit, if the
user opened it and then reloaded the view (e.g. by applying a
filter in the search view), the group was folded again. With this
commit, the group remains open if the user manually opened it.
closesodoo/odoo#133305
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Before this commit, when a list view was grouped by more than 1
field, the view was considered empty, and the no content helper
was displayed. For instance, go to Contacts and group by Company
and Country.
Part-of: odoo/odoo#133305