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
Description of the issue/feature this PR addresses:
In the sales module, when creating a new product, it is important to ensure that
the product type is set to Service and that the invoicing policy is based on
milestones. Additionally, selecting the project field is necessary to ensure
that the product is linked to a specific project. Once the product is linked
to a project, it is important to make sure that there is at least one milestone
available within the project.
Once the above steps are completed, creating a sales order (SO) and adding the
newly created product will allow for the milestone stat button to be available
in the draft state.
Current behavior before PR:
The inclusion of the milestone product triggers the visibility of the stat
button.
Desired behavior after PR is merged:
If the state is draft, the milestone stat button ought not to be visible.
Fix:
Adding a condition prevents the stat button from being displayed when the
the current state is draft
task-3374861
closesodoo/odoo#133025
X-original-commit: 2b046e2c6c1e473f71c638c17c588b5b7fed7173
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
A check was added to prevent importing records with prefixes of existing
modules: https://github.com/odoo/odoo/pull/130825 . This queries the
known modules, but non-admin users don't have access to that by default,
causing the import to fail for them. Allow the module query regardless
of access rights.
closesodoo/odoo#133405
X-original-commit: e1dcf886129f47fdc121f121df15a2c4724bb0e2
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Merel Geens <mege@odoo.com>
The account tour was failing in case some entries were hashed or
were linked to deferral entries because these kind of entries cannot
be deleted but only reverted.
task-id 3437130
closesodoo/odoo#133330
X-original-commit: 4a3ce2701179c481e7506ccbde06663759f03e53
Related: odoo/enterprise#46404
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
Since commit cf844e34, we have a new group `group_sanitize_override`
that allow to prevent users from adding code that will be evaluated.
To know if a user can edit a field if they are restricted editor and
without this group, we do the diff between the normalized version and
the sanitized.
It is difficult to debug in production why a user cannot edit a html
field because we don't have the log of this diff.
Now we add the unified diff into the log. It should not occur too often
and if necessary we will reduce the occurrences in the log later.
(if debug mode, if loaded into the iframe [in edit mode with @], ...)
closesodoo/odoo#133395
X-original-commit: d60759d637a85d2220cee7566483bf3cff93b810
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Scenario:
- edit the current document layout and use is_html_empty method in it
- it works in Preview Document, when printing any report, ...
=> it breaks when opening document layout wizard by clicking on
"Configure Document Layout"
Reason: is_html_empty was added to _get_rendering_context, but the
preview instead the document layout wizard doesn't use this method.
Fix: add is_html_empty in the context
opw-3433583
closesodoo/odoo#133122
X-original-commit: 5f1ad0c1e4c1e8ed41337ccd4c12e70c9c760c85
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In this commit, I have made the changes to align the IRN no.
and its related QR code image properly in the invoice
report. before this commit,it overlapped with the tax details.
Steps To Reproduce:
- Install the `l10n_in_edi`
- Switch to `IN Company`
- Go to Configuration->Journals
- Under the `Advance Settings` tab, tick the `Electronic Invoicing`.
- Create an invoice
- Click on `process now` to process an e-invoice.
- Now, print the invoice report.
- You will find the E-invoice code overlaps with the Tax Details.
task:- 3347517
closesodoo/odoo#133007
X-original-commit: 0693552dbb6cf4d160c88da90b8b08d28213d9b6
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Main
-
[IMP] stock_account: Allow to keep track of the COGS Journal Items origin
Explain
-
So far It is quite cumbersome to try to figure out which lines are
coming from where for the COGS journal items. It becomes more difficult
to find them out when there are several lines from the same product with
the same quantities and similar characteristics.
By having what invoice line originated which COGS Journal Items you can
auditing and analysis in a more thorough way.
- You can figure out which Sale Line o Invoice Line was more profitable.
Based on the actual revenue and the actual COGS.
- What COGS line was mistakenly created. For instance, when the invoice
is created prior delivery, you can figure out how to surgically fix
the of COGS journal items that that were wrong.
- To try to reconcile properly the lines in a Sale Order Line when there
is drift and reconciliation is not properly made because there were
differences and they cannot be easily spotted because you get lost in
middle of several COGS lines but you do not know where they are really
coming from.
closesodoo/odoo#125134
Signed-off-by: William André (wan) <wan@odoo.com>
In this commit, we have implemented the functionality to show the color
of the project in the left side panel of the calendar and calendar entries.
task-3251766
closesodoo/odoo#130700
Related: odoo/enterprise#41569
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Issue:
Two services which difference is that one is expensable with an
expense policy different of none, the expensable service is not
included in the project profitability as revenue from a service,
even it's not actually an expense, just a service that "could be"
expensed. The other service which is not marked as "can be expensed"
is correctly computed in the project profitability.
Steps to reproduce:
- Install Project, Accounting, Sales, Expenses
- Settings > activate analytic accounting
- Create a service, invoiced on milestones, creates a project on SO
confirmation, can be expensed with an expense policy of Sales price.
- Create an SO, confirm the SO
- Set the milestone to 50% reached, invoice the SO, post it
- Go to the project profitability of the project, notice there is no
revenue section for the service.
- If you follow these same steps for a service which is not set "can
be expensed", the service is correctly included as revenue from
service billable milestone.
Cause:
When computing the profitability items from services, we first get
the `sale_line_ids` (whose domain excludes the expenses), then we get
the product that are linked to those sale_line_ids, but we exclude
products that have an expense_policy different than 'no'. This
domain may not be necessary, because `sale_line_ids` already exclude
expenses.
Fix:
Remove the particular domain leaf.
Affected versions:
16 up to master
Reference:
opw-3430020
closesodoo/odoo#133307
X-original-commit: ac02616c4d54120defa53e9ef463cdcbab69063b
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce:
-------------------
- create an event in the calendar;
- click on "Everybody's calendars" filter;
- delete the event.
Issue:
------
The event name is crossed out (declined)
instead of being deleted,
even if we are the organizer.
Cause:
------
The value of `event.attendee_id` inside the
`_onDeleteRecord` is `undefined`.
The condition will therefore never be `true`.
Solution:
---------
Add the organizer's id to the event
so that he can delete it in the case
of "Everybody's calendars" filter.
Note:
-----
Correct decline event from calendar view.
opw-3230254
closesodoo/odoo#133298
X-original-commit: 4ef44f403f1c93b62230307f5fa909b8a83f4eb8
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Steps to reproduce
==================
- Login as a user with no rights
- Use a mobile viewport
- Create a new Maintenance Request
- Edit the Created By field
-> A traceback occurs because the user has no rights
Solution
========
We extend the Many2OneField to accept a relation option and Depending on
whether the user has the rights, use the correct one.
This is similar to 41eaff0f4c17
opw-3430105
closesodoo/odoo#133261
X-original-commit: e78998c2951ec906fbccbe24e3fa454711a37c2b
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Previous PR: odoo/odoo#113973 assumed that if stock_accounting_automatic
setting was disabled, then the user deactivated the setting and it was
previously on => we should change all of the property_valuations to
'manual_periodic'. Unfortunately this missed the case where the
property_valuations were set to `real_time` without the setting being
active (i.e. upgraded db and the setting isn't activated or the
value is set directly via ssh or community module)
Additionally, it was causing an unnecessary search on product.category
every time a setting is changed. Therefore we now only change the
`property_valuation` if the setting was active and was changed to not
active.
OPW-3474598 for context
closesodoo/odoo#133254
X-original-commit: 96b17f9a19855a78a7b879299ea51eb5bde0acf8
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
They existed solely for typedoc and wrapping `useState()`.
- Typedoc is managed by `useService()` and `services.d.ts`.
- `useState()` is a minimal code in component, and is actually
more useful as explicitly visible in component.
closesodoo/odoo#133202
Related: odoo/enterprise#46327
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>