Commit Graph
157837 Commits
Author SHA1 Message Date
Antoine Guenet f261efa1d7 [FIX] web_editor: properly convert backticks in split text nodes
Wrong syntax made it so that having a text node after the text node in
which we're inserting a closing backtick character, converted all the
text after the backtick to the word "NaN". This fixes that syntax error
and ensures such cases are properly handled.

X-original-commit: 2833b42c09582dbcfed334d9fe6628a8eaf476b8
Part-of: odoo/odoo#110784
2023-01-24 10:20:44 +01:00
Adrien Widart (awt) 05b8b0a7d6 [FIX] sale_stock,stock_account: reset and post invoice with cogs
To reproduce the issue:
(Need account_accountant,purchase)
1. Setup a product P
   - Storable
   - Invoicing Policy: Delivered
   - Category:
     - FIFO + Auto
2. Process a PO with 1 x P at $10
3. Process a PO with 1 x P at $15
4. Create and confirm a SO with 2 x P
5. Process the delivery one by one (backorder)
6. Create one invoice for each delivery
   - The COGS of the first one are equal to $10
   - The COGS of the first one are equal to $15
7. Reset and repost the first invoice

Error: The COGS are equal to $15 instead of $10

Steps 5: it creates 2 out-SVL (1x$10 and 1x$15). Step 7, we try to get
the anglo saxo price unit. It leads to `_compute_average_price` with
the invoiced qty (1) and the qty to invoice (also 1). In this method,
we iterate on each out-SVL, we first skip the invoiced quantity and
then consume the quantity to invoice. Here is the issue: we will
skip the SVL we should use and keep the one already used. As there
isn't any link between an AML and the SVL it used, we need a new
approach.

OPW-3062069

closes odoo/odoo#110783

X-original-commit: 17438d5befcd6e9f1fc2ec2a54dfcebbc846d251
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-01-24 10:20:41 +01:00
Wolfgang Taferner ed8b0cb1dc [FIX] delivery: update_prices does ignore shipping rate
As sale does not know about special lines it will always update
the price based on product and price list instead of applying the correct
shipping rate, so we do skip those lines by using a newly introduced hook method

closes odoo/odoo#110782

X-original-commit: f1265b7fdce6bbe3fea97fc4b275dc2dca18103d
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-01-24 10:20:38 +01:00
Arnold Moyaux 6877473e22 [FIX] purchase_stock: wrong deadline
Usecase to reproduce:
- Product A with Vendor supplier lead time=1day
- Product B with same Vendor supplier lead time=4days
- Launch the replenishment report for both products at the same time

Current Behavior:
The expected arrival is correct but the order date deadline is today - 3
days

Wanted Behavior:
Same but the order date dead line is today

It happens because it does the minimum of expected arrivals - max of
supplier delays. However the supplier delays are already correctly
apply on each procurement (correct expected arrival). To know the
correct order deadline we should instead take the minimum date planned
with the related supplier delay.

opw-2822588

closes odoo/odoo#110779

X-original-commit: 9364f4fbc3966373a33c32b1325b3b22cc6c5f2e
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-01-24 10:20:36 +01:00
Martin Trigaux 776689b0f4 [I18N] *: export saas-16.1 source terms
closes odoo/odoo#110752

X-original-commit: 56b2b52287a8f2192d80ea417c7efac80a87c0a9
Related: odoo/enterprise#36173
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-24 10:20:30 +01:00
Christophe Monniez 6890a0928d [FIX] web: replace invalid font for sign
closes #109361

closes odoo/odoo#110616

X-original-commit: 7be74d8232dd93789760893cecf9a8a74a9aad75
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-01-24 10:20:24 +01:00
Christophe Monniez c33bb655e6 [REM] web, project: remove mnmlicons font
The mnmliconsv21 is not used anymore for 7 years (see 660b13b)

Closes #6382

X-original-commit: 0f59b958fb9013bfd47ba16b36204bcbee731b72
Part-of: odoo/odoo#110616
2023-01-24 10:20:24 +01:00
Adrien Widart (awt) 4ceb57fa64 [REF] mrp{,_account}: extract computation of WO cost
Extract that part so it can be overridden

closes odoo/odoo#109340

X-original-commit: 39ff78b1dd2d4ae7017fde0282f78ead34637696
Related: odoo/enterprise#35533
Related: odoo/upgrade#4220
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-24 10:20:12 +01:00
Gert Pellin d395d1f4de [FIX] website_event: fix dynamic event snippet sorting
Before this commit the dynamic event snippet sorts the events from further
in the future to current, making it so that events in the near future are
not in the spotlight.

After this commit the events are sorted as expected, with the earliest events
first.

Task-3105126

closes odoo/odoo#110791

X-original-commit: de1dc9e888f3ffc59589f1fdd4e518638c35bca6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-24 09:12:03 +01:00
William Braeckman a35dd0d43f [FIX] sale_loyalty: reset taxes on payment program lines
Since we reuse sale order lines as much as possible, having reward lines
with no tax means that we need to explicitely reset the taxes on those
lines. However this was not done before.

TaskId-3138483

closes odoo/odoo#110785

X-original-commit: e945526f3a69d0adaa283c9a5aa4f5dde6027e4e
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-24 09:12:01 +01:00
William Braeckman d941333582 [FIX] sale_loyalty: fix mixing payment rewards and discounts
Fix two issues:
 - Payment rewards have to be applied after any other reward, the logic
   to do so was already implemented but the condition got inverted
   somehow.
 - Allow discounts to be applied on orders if the total is zero in case
   a payment reward is being used.

TaskId-3138483

X-original-commit: 7104527ffc5606c054e2b8d596b869cd4ccfce64
Part-of: odoo/odoo#110785
2023-01-24 09:12:01 +01:00
Joseph Caburnay 89b369d096 [FIX] web: discarding create dialog should clear the value in m2o field
**Steps to reproduce:**

- helpdesk.ticket form view
- set a user on the ticket
- create & edit a new user on the fly
- discard the user creation modal
- [BUG] the avatar of the user that was initially assigned to the ticket is still displayed

**Solution:**

This is because when closing the dialog, we only clear the input. This fix
proposes to also clear the value of the field -- which unlinks the previously
selected record for the field. Note that it only makes sense to do it in m2o
fields so another test is added for extra assertion.

closes odoo/odoo#110781

X-original-commit: df783ada3281e33038253deffd75d35f44b9d579
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-24 09:11:57 +01:00
FrancoisGe 5b43a81571 [FIX] web: edit textField causes scroll
Before this commit, in a form view, editing a textField so that it was
outside the screen page caused scrolls up the page.

Why did this happen?
On each edition of the <textarea> contained in the textField, the rezise
function is called in order to always keep the correct height.
To do this, for a moment, we need to modify the textarea style to know
the scroll height. So we set the height to "auto". This results
in the textarea taking its minimum height for a moment. It will then
cause a scroll upwards because the size of the page will reduce during
this moment.

Solution:
We will add a <div> around the <textarea> which will keep the height
of the textarea. The scroll will not take place because the size of
the page will not change during the moment when the height is set to "auto"

How to reproduce:
- Go to a form view with a textField
- Edit the textField to exit the page (you need a scroll bar)

Before this commit:
When editing the textField, the scroll bar will go to the beginning of
the page

After this commit,
When editing the textField, the scroll does not move.

closes odoo/odoo#110777

X-original-commit: 339d9bf0144bcab9d3fa1674fb9f3faaad3a883d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-24 09:11:52 +01:00
Audric Onockx (auon) 92c61718b9 [FIX] project: search is_favorite excluding similar fields
In a previous commit https://github.com/odoo/odoo/pull/98660,
we implemented `_search` method to search by `is_favorite`.
Unfortunately, this method looks for any order item starting with
'is_favorite' and so it could include 'is_favorite_gnagnagna'.

closes odoo/odoo#110745

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-24 08:09:45 +01:00
Florian Vranckx 618c9f360e [FIX] calendar: fix prefetch of fields
Overriding the _compute_field_value in order to only prefetch the currently requested field

opw-3141262

closes odoo/odoo#110489

Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-01-24 08:09:42 +01:00
niyasraphy dabf98a196 [IMP] l10n_it_stock_ddt: update module name
before this commit, the name given for the module is same as its technical name.

after this commit, clean module name will be added to l10n_it_stock_ddt.

closes odoo/odoo#110743

Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-23 22:37:28 +01:00
niyasraphy 4b9b389202 [FIX] product_images: clearing wrong key from icp in uninstall_hook
before this commit, in the uninstall hook, the key which is trying to remove from the ir.config.parameter is not existing one.

after this commit, the google.pse.id key will get removed from the icp.

closes odoo/odoo#110724

X-original-commit: f7e44f21b99cc363b0ff572ff9a96d6d3569b1cc
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-23 20:27:19 +01:00
Victor Piryns (pivi) 464c5626aa [FIX] web: fix width of 1st column on bold layout timesheet report
Current behaviour:
When having the `external_layout_bold` as Document layout,
when printing timesheets, the date column takes too much width
of the table.

Expected behaviour:
Have the columns be proportional, similar to the
`external_layout_standard` layout.

Steps to reproduce:
- Install Timesheet
- Activate Dev Mode
- Change the Document layout to `external_layout_bold`
- Timesheets > List View > Select an item > Print
- Observe that the first columns (with Date) is taking 1/2 of the width

Reason for the problem:
I presume some leftover legacy styling with a `width:48%` for the
first column of a bold_layout table.

Fix:
Remove that legacy styling.

Affected versions:
- 15.0
- saas-15.2
- saas-15.3
- 16.0
- master

opw-3114053

closes odoo/odoo#110723

X-original-commit: 01c0eb16b5c3d418e5a494a825cc60f76a743377
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 20:27:16 +01:00
oco-odoo 0801ec1a35 [IMP] account: add SQL constraint to prevent having a 'domain' expression without subformula
This constraint was already implicit (the reports failed to open when this was not respected, and the view ensured it wasn't possible not to respect it). We just enforce it more.

closes odoo/odoo#110718

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-01-23 20:27:14 +01:00
mafo-odoo eac433de8b [FIX] stock_account, purchase_stock: no stock account in manual valuation
Issues:
1) When the inventory valuation is Manual the stock accounts field of the
product category should be empty and they should be set when the
inventory valuation is Automated.
2) For the moment at installation all the categories have the Manual default
value and the comapy account default values for the stock accounts (not
respecting condition 1)

Solutions:
For issue 1 we add checks on the write and create functions of the product
category model so that after creation/modification the instance respect the
condition
For issue 2 we add at the end of the post_hook script some code to set an
empty stock account property for every product category.

opw-2746384

closes odoo/odoo#110715

X-original-commit: aa744f1172012d3d74c12bb73e06265d6e64c6e1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-23 20:27:11 +01:00
Antoine Dupuis (andu) 1e3c1726e8 [IMP] l10n_bo: Bolivian loc (bring up-to-date)
closes odoo/odoo#110696

X-original-commit: c6984459dc50e08037d9ef514f7fc5d9aea30640
Related: odoo/enterprise#36152
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-01-23 20:27:05 +01:00
niyasraphy 4857c0e28b [IMP] mail: make email required on mail.gateway.allowed model
before this commit, the email field is not required in the model level as well as in the view level, and this is the only normal(other than compute) field in the model. as it is not required now, user can create as many record without inputing any values.

Settings -> Technical -> Emails -> Mail Gateway Allowed

after this commit, the email field will be required and record can be created only by adding the email.

closes odoo/odoo#110026

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-23 20:27:01 +01:00
Hugo Carlier (Huca) 911a47f9aa [IMP] project, sale_timesheet: improve UX
- Display 'project title' label and add placeholder on the quickcreate
in project.project kanban view

- Project.task calendar view popover : The literal value of the status
is replaced by a colored dot representing it.

- project.task portal form view : The SOL field is displayed in the list
of timesheets entries if some of those entries have a different SOL as
the one set for the task. The SOL name is made clickable and redirect
to the sale order portal view if the user has access to it.

closes odoo/odoo#103434

Task: 3024151
Related: odoo/enterprise#32860
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-23 20:26:53 +01:00
pedrambiria c80036552f [FIX] point_of_sale: add one default cash payment method
Before this commit: if more than one cash payment methods exist, it
would add all of them by default when you create a point of sale.

This commit prevents adding more than one cash payment method:
https://github.com/odoo/odoo/commit/f9da3590261b304f9c12f01f5800cec50faebc1a
So it's impossible to create a new point of sale when there are more than
one cash payment methods.

The solution is to limit the default cash payment methods to one.

opw-3134418

closes odoo/odoo#110717

X-original-commit: 5c839e684261e60328c7e06ae09685734507bf4f
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-23 19:28:49 +01:00
Hugo Carlier (Huca) 07f6362268 [FIX] Project: Tour tips displayed in other apps
- Description: before this fix, some tips of the project tour poped up
in other apps when the tour was not finished. With this fix, those
particular tips are only displayed in the project app.

- Implementation: Some triggers used in the project tour are generic
class that are also used in other modules (in this case, classes
related to the chatter). When leaving the tour at those steps, the
tip in question will pops up every time this class appears in other
apps (i.e. often for classes related to the chatter). To fix this, the
parameter extra-trigger is used for tour steps related to a generic
class.

closes odoo/odoo#110716

Task: 3024151
X-original-commit: c8f86844a427e0f9665b6f9c5e9e182795fb809e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-23 19:28:46 +01:00
Rahul PrajapatiandSamuel Degueldre b119cca37b [REF] point_of_sale, *: remove class and component registries
*: l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos,
l10n_sa_pos, pos_adyen, pos_discount, pos_epson_printer,
pos_epson_printer_restaurant, pos_hr, pos_hr_restaurant, pos_loyalty,
pos_mercury, pos_restaurant, pos_sale, pos_sale, pos_sale, pos_sale,
pos_sale, pos_sale, pos_sale_loyalty, pos_sale_product_configurator,
pos_six, pos_six, pos_six, pos_six, pos_stripe, pos_stripe

Previously, the point of sale module used a custom inheritance system
for models and components. This system being non-standard, it makes it
hard for newcomers to understand how to use it or for people with
experience in the pos code base to understand how things are done
elsewhere. This commit removes the "registries" system from the pos
modules and adapts existing code to use standard inheritance mechanisms,
ie extending classes directly, and using patch to modify behaviour in
place.

task-3119628

closes odoo/odoo#109928

Related: odoo/enterprise#35795
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
2023-01-23 16:01:27 +01:00
Samuel Degueldre ae1cd3d5bb [FIX] web: update jQuery to 3.6.3
This version of jQuery fixes a number of bugs in jQuery compared to
3.3.1

Some legacy list tests related to the handle widget have been skipped,
we consider this acceptable because:
- there are no remaining uses of the handle widget in a legacy list view
in the code base. The only remaining usage of the legacy list view is in
the SelectCreateDialog legacy, which is only used in our code base by
the very few legacy client actions that will be converted before v17
- the tests are only broken in enterprise, and the widget appears to
work fine in practice, suggesting a problem with the way tests drag and
drop rather than an actual problem with the code
- spending time to debug tests that will be obsolete within the next few
months and also appear to not correlate to an actual breakage of the
functionality is not worth it.

task-2291793

closes odoo/odoo#106960

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 16:01:21 +01:00
Rohitkumar (roku) bf1c60847b [IMP] rating,project,sale_timesheet: improve the UX for project
Purpose of this commit to improve generic usage of project app.
So in this commit done the following changes:
 - Project tags should be vertically centered
 - Rename share readonly for project.project form view
 - add demo data while add tasks in a folded stage to the sub-tasks and blocked
   by notebooks
 - add demo data for archived tasks to the archived project
 - change the name of the 'rating page done' webpage to 'Thanks for your Feedback'
 - use the avatar widget for the employee

task-2976074

closes odoo/odoo#105904

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-23 16:01:18 +01:00
Adrien Widart (awt) 02b0264f9e [FIX] product: set barcode on archived product
It is currently not possible to write the barcode of an archived
product template. The inverse method does not consider case where
the variant of the template is archived

OPW-3109967

closes odoo/odoo#110697

X-original-commit: 968d0dff823f8e5d0871feaf8b09233fbb91b4de
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-01-23 14:25:23 +01:00
Rémy Voet (ryv) f6cf94d4bd [FIX] *: ormcache works with annotation
The `ormcache` decorator fails to create the key method
(`determine_key`) when the method signature contains any annotation.
Fix it by removing annotation of the signature.

closes odoo/odoo#109777

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-01-23 14:25:14 +01:00
Hubert Van de Walle (huvw) 0b335ad510 [FIX] web: settings view: call server actions with the resId
Steps to reproduce
==================

- Go to settings
- Search for IAP
- Click on View My Services

Cause of the issue
==================

In the settings view, there is a specific hack which removes the resId
from the record

https://github.com/odoo/odoo/blob/e4fe05ac07dbafb993922ff28dc3f7705c639dff/addons/web/static/src/webclient/settings_form_view/settings_form_view.js#L35-L39

This means that the records is not defined in the server action and so
nothing is done

https://github.com/odoo/odoo/blob/cd356f29abcaa1029e8a79ae76c2561f4833232a/addons/iap/views/res_config_settings.xml#L9

Solution
========

Instead of removing the res_id to mark the record as new, override
BasicModel.isNew

opw-3120995

closes odoo/odoo#110679

X-original-commit: ffb09c4ba5a4fb521a242adb0541595bd3ec1524
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 13:19:02 +01:00
Renaud Thiry fbb808301a [FIX] mass_mailing: correct 'total' value
The percentage used for A/B test was applied even when
A/B testing was disabled. As that value is 10% by default
the 'total' was innacurate by 90% for most mailings.

task - 3008627

closes odoo/odoo#110677

X-original-commit: eb2271330e7759400dad155b72208cf7677e175e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-23 13:18:59 +01:00
Tiffany Chang (tic) caf34513a6 [FIX] stock: use correct dest loc for ml in picking
Small copy/paste error during odoo/odoo#95332 made it so
`line.picking_id.location_id` was used when assigning `location_dest_id`
of a directly created `move.line` in a picking. Usually this would not
be noticeable due to `default_location_dest_id` in the views ensuring
the correct value, but move lines created directly will be incorrect.

In addition to adding this case to existing test, the test has also been
updated to use non-default locations to ensure no other default values
are causing the result to be correct when it may not be under other
circumstances.

Issue noticed during master refactoring to remove location_id /
location_dest_id fields from views when multi-location is not active.

closes odoo/odoo#110672

X-original-commit: 74bfa154dde72ce792428521aea128408965dcc1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-01-23 12:21:42 +01:00
mehjabin e7d92a2588 [IMP] hr_contract: update field label using attribute selector
before this commit, to update the string for departure_date field the entire field has been replaced

after this commit, using attribute selector(string) updated the string for this field

closes odoo/odoo#110649

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-23 11:20:26 +01:00
Alexandre Kühn b410607459 [FIX] mail: scroll to attachment box when toggling it on
Before this commit, when scrolling down in chatter and then
toggling on the attachment box, it opened the attachment box
outside of visible part of scroll view.

This commit fixes the issue by automatically scroll to
attachment box when opening it.

Task-2817838

closes odoo/odoo#110640

X-original-commit: 2d835da6b734f0d9fef05c191e93757d2d2f3b1a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-01-23 11:20:23 +01:00
Benoit Socias 364440456a [IMP] web: retry loading CSS before showing error
When starting a trial instance, skipping the configurator and picking a
theme, it can happen that some lazy loaded `web_editor` CSS is not ready
yet - which causes a traceback popup to be displayed.
Note that this problem could not be reproduced.

This commit introduces a retry mechanism when a CSS cannot be loaded in
order to try to preserve the trial's "wow" effect.
For readability, the link is now added after defining the Promise that
registers the event handlers.
The test is adapted in order to make the retry mechanism retry faster.

task-2972330

closes odoo/odoo#110590

X-original-commit: 6a9212d52114ccda827ad2784d0369ffd9d6526e
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-01-23 11:20:11 +01:00
Martin Maes 0dab2525f9 [FIX] mrp: date_planned_start is empty
This commit fixes the traceback when the user push the start button
in the Work Order list View of a work order without a date_planned_start.
To recreate the traceback, the order must be based on a manufacturing order
with multiple work orders, with at least one with a scheduled start date and
one without a scheduled start date.
When creating the manufacturing order, it is important to make sure that
only the confirm button is pressed.

closes odoo/odoo#110587

X-original-commit: c4d16a57e03d2a9183b232344579978b839a9fb9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-23 11:20:08 +01:00
FrancoisGe 8d41ccf119 [REF] *: relative width of a field is no longer supported in list views
Since the conversion of the list view to owl, the relative field size
has not been reimplemented. We have decided not to support it anymore.
So we will remove all its uses.

The relative width consists in adding a width attribute with a
value. This value corresponds to the weight of the field, the higher
it is, the more space the field will take. This size is only used when
the list is empty.

Example of this:
<tree>
    <field ... width="2">
    <field ... width="1">
</tree>

The first field will take 2x more space than the first one when the list
is empty.

closes odoo/odoo#110382

Related: odoo/documentation#3375
Related: odoo/enterprise#36020
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 11:19:59 +01:00
std-odoo 73ba81a8d1 [IMP] base: allow loading the SMTP CLI configuration in a mail server
Purpose
=======
On our saas, when users configure a mail server, they can't use anymore
the "odoo.com" configuration (which is stored in the odoo-bin argument).

To allow them to continue using the SMTP CLI configuration, we add a
new "smtp_authentication". When this authentication method is chosen,
all the "connection" fields of the mail server are ignored, and the
connection information are taken from the odoo-bin arguments. So they
can choose the from filter of this SMTP configuration, the priority...

Task-3061882

closes odoo/odoo#106297

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-23 11:19:50 +01:00
Audric Onockx (auon) 4d081e38a2 [IMP] project: view improvements and project stage deletion wizard
\- https://nimb.ws/NMRdKb project.project list view:
display favorite projects first

\- https://nimb.ws/I8nTwK project.task list view:
partners should be displayed in the same order as in the form view

\- https://watch.screencastify.com/v/ebhfsyP7GtMKSbrVwHlq
project.project kanban view: raise the same error when deleting
a project stage as when deleting a task stage: https://nimb.ws/NQaU3W

\- https://nimb.ws/3h7WGu 'my tasks' kanban view:
hide the 'see examples' button

task-2957863

closes odoo/odoo#98660

Related: odoo/enterprise#30662
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-23 11:19:48 +01:00
Aaron Bohy 00bdf0b2e3 [FIX] web: mobile form view: statusbar button is primary
Since the conversion of the form view to owl, the statusbar field
in mobile wasn't displayed as before: it used to be a btn-primary
button (dropdown), and it wasn't anymore. This commit re-introduces
the previous design. Moreover, we adapt the style of the statusbar
button (on the left) to make it more consistent with the field on
the right (no padding + caret as it is a dropdown).

closes odoo/odoo#110629

X-original-commit: 1ba4bc2d001667fc6c2e7f7a1482b5c79bb4c3a5
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 10:16:50 +01:00
Aaron Bohy 5d45465758 [FIX] web: error service: no crash on prom rejected w/o error
Before this commit, the error service crashed when it had to handle
a rejected promise error with a reason that was a truthy value but
not an error.

This happens for instance in the wysiwyg editor which may reject
promises with `Request took too long (more than 10 seconds).` as
reason. We sometimes get this error on odoo.com after migrating
to 16.0, typically on a tab running in the background.

closes odoo/odoo#110613

X-original-commit: 3021f7e64382e648d15671a2a1d16847b3d72cb0
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 10:16:48 +01:00
Aaron Bohy e93dbe9909 [FIX] web: list: fix style of translatable fields
Before this commit, there was a flicker when clicking inside a
translatable field in an editable list view: the font-size was
reduced to 12px. This rule looks unnecessary, we thus remove it.

Bug reported after the migration of odoo.com to 16.0.

closes odoo/odoo#110612

X-original-commit: ab76b1e93513bf06b78ca97b8fdce491f498726c
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-23 09:11:45 +01:00
nda-odoo 493b4c5a40 [FIX] sale: avoid ensure_one error during import
tax_id on sale.order.line is a many2many field.

Using ".id" means you cannot import sales orders/quotations because
it raises an expected singleton error.

However, the initial bug fixed by 54c828b does not exist anymore on
13.0. So it has been decided to remove this code instead.

opw-3091663

closes odoo/odoo#110639

X-original-commit: 58deebcfdf797f7dd3ab767e7c7db68b4c00b0f9
Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-21 20:01:49 +01:00
aliya 413c49e478 [FIX] l10n_lu: fix tax report formulas
Some formulas in the LU tax report are incorrect. This commit fixes them according to the official rules.

task-3142146

closes odoo/odoo#110630

X-original-commit: d3315570db2ca929d7fc31832a53e22799c1bed2
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-01-21 18:34:50 +01:00
Brice bib Bartoletti 43076cdd26 [FIX] account: adapt AccountMoveFormCompiler hack
The aim of this commit is to get rid of a traceback preventing the user
to switch tabs in Invoice and Bill

Context:
AccountMoveFormCompiler is a hack that allows to save the record
automatically when the user switch between tabs.
With commit 264f313012aa99449d1576ae1110252c13755142 the way to call the
compiler changed a bit but the hack wasn't.

Before the commit:
The `this` was leading nowhere in the compiler frame leading to a
traceback in OWL.

After the commit:
`this` is defined and the traceback is gone

closes odoo/odoo#110635

Community-pr: https://github.com/odoo/odoo/pull/110506
Task-id: no task
X-original-commit: a926071fc6944d5cd720a8849b2f31a5dd8ff4dc
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-21 00:57:25 +01:00
Walid HANNICHE (waha) 765f653af3 [FIX] purchase_stock: stock valuation foreign currency Journal Entry
Steps to reproduce:
- Setup product (
    cost 10$
    Storeable Product
    Standard Price Accounting
    automated valuation
    add account for price difference
)

- Purchase product in foreign currency (set a different price)
- Receive the product
- Create and validate Bill

Bug:
The reception JE is for the cost amount set on the product ($10)
debit and credit value are correct but the amount in currency
is wrong (purchase cost)

After creating the bill the Journal items are not correctly matched
since reconciliation is done on currency amount in the case fo foreign
currency transaction

Fix:
Set the correct amount (cost configured on product page)
in currency amount if costing method is standard

opw-2822366

closes odoo/odoo#110628

X-original-commit: 9f5025d99ec490eb2a45b9dbf1a8a43e8fc3162b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-01-20 21:57:26 +01:00
Akim Juillerat 94236326c4 [FIX] stock: Close remaining transaction on CacheMiss error
To reproduce the issue:
1. Ensure you have an orderpoint in automatic that will be processed by the scheduler
2. Allow a worker to run the scheduler with use_new_cursor=True
3. After orderpoints are searched in procurement.group._run_scheduler_tasks
   and before the orderpoint is processed in stock.warehouse.orderpoint._procure_orderpoint_confirm,
   delete the orderpoint through another worker

Error: A CacheMiss error will be raised due to the access to orderpoint.qty_to_order
in _procure_orderpoint_confirm, what will leave open the transaction from the new cursor
declared in the same function.

After a while HTTP workers will become unavailable as their own transactions will wait for the lock
of the open transaction to be lifted, what won't happen before said transaction is closed.

OPW-3121598

closes odoo/odoo#110627

X-original-commit: 38eade327b9f381d9abebd61d563a1caf634576d
Signed-off-by: Christophe Simonis <chs@odoo.com>
2023-01-20 21:57:23 +01:00
niyasraphy 7ba15dc1b6 [FIX] account: replace style with bootstrap 5 class
replacing text-right with text-end in bs5

closes odoo/odoo#110615

X-original-commit: 6ed24e9b870c63e0a159164d383983c4c0f3c56c
Related: odoo/enterprise#36123
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-20 21:57:15 +01:00
Jorge Pinna Puissant 5f5b0404f7 [FIX] web: align text to the end in RTL languages
Bootstrap forces some input types ("tel", "url", "email", "number") to
be LTR even if in an RTL languages, before the last update of bootstrap
this was done in [1] and [2].

The issue of forcing some input types to LTR, is that the alignment was
wrong. Now, the for the same types when using an RTL language we force
the align to the end.

[1] : 90ab752c5f
[2] : 0d650c3b19c847181fa50c88eb945792528f01cc

closes odoo/odoo#110610

X-original-commit: 05b48129999978fbe8092e6007999aeae60a3699
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-01-20 21:57:12 +01:00