Commit Graph
140506 Commits
Author SHA1 Message Date
Xavier BOL (xbo) 8d8e054a22 [IMP] sale_timesheet: convert timesheet_product_id in related for task
Before this commit, this field is stored and contains by default the
value of the same field in project.project. Moreover, we cannot choose
another timesheet_product_id in task views. It means that field is most
of the time the timesheet_product_id of linked project.

This commit converts this stored field into related field to the same
field in project.project and remove an inherit view which adds only this
field without displaying in the view.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 1475138e68 [IMP] sale_timesheet: change _get_not_billed to _is_not_billed method
Before this commit, we use the _get_not_billed method to get all
timesheets not billed. But in each using, we call the method after a
filtered method.

This commit changes the method to use this method wiht only one
recordset in the self and rename the method to _is_not_billed. This
change allows to avoid the succesive filtered to get the timesheets that
we want. Now, we can use the _is_not_billed method in the first
filtered rathan than realize another filter.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 82a0422df5 [IMP] sale_timesheet: move View Timesheets button in portal invoice
Before this commit, we show the button in the invoice page.

This commit moves this button in the sidebar (left panel).

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 5589154c3a [IMP] sale_timesheet: add SO name and invoice name to search timesheets
Before this commit, in portal timesheeets (/my/timesheets), we need to
give the id of the SOL or invoice to have only timesheets linked to the
SOL or the invoice that we want. The problem is the portal user does not
know the id of both.

This commit changes these both searchs to search with the name of SO or
invoice. The name of SO and invoice are the reference about these both
and should be unique. This changes are more clearly than the previous
search.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) f4779930d5 [IMP] sale_timesheet: move sql contraint for timesheet_product_id
Before this commit, we want the timesheet_product_id field be set if the
project is billable and allow timesheets.
But, now the timesheet_product_timesheet field is only required for fsm
project which is billable and allows timesheets.

This commit moves the sql constraint in industry_fsm_sale.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 855a1dcf16 [IMP] sale_timesheet: hide timesheet_product_id if not fsm project
This field is only useful for fsm projects. That's why this commit
hides this field for projects whose are not fsm projects.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 7e1b66fe19 [IMP] sale_timesheet: changes SOL in mapping if customer changes
Before this commit, when the user changes the customer of the project,
the SOL of each mapping remains for the old customer of the project. To
avoid the user forget to change the SOL of each SOL.

This commit add a compute method on sale_line_id field in
project.sale.line.employee.map to automatically remove the SOLs when the
SO in project is removed because of a customer change in the
project. Then, it also adds a require in this field to display a
validation error as long as the SOL of each mapping is not set.

task-2424382
2021-01-15 15:59:59 +01:00
Xavier BOL (xbo) 59477b8aee [FIX] sale_project: remove SO and SOL in project if customer different
When the user changes the project customer we need to check if the SO
and SOL are always for the customer defined in the project. If not we
remove the SO and SOL in project.

task-2424382
2021-01-15 15:59:58 +01:00
Xavier BOL (xbo) c4a0c301ae [IMP] project: move partner_id in project form view
Before this commit, when the project is billable, we need to define a
customer to have the list of SOL. The problem is the customer field is
in "Settings" tab and not "Invoicing", it can be confused for the user
to directly understand why he does not have the list of SO.

This commit moves the customer field (that is partner_id) to the main
sheet of the form view. Thus, the user can see directly if the customer
is set or not in the project.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo)andLaurent Stukkens 3378ca8252 [IMP] hr_timesheet: use access rights if user is internal
Before this commit, when the user can only see his own timesheets, this
user can see more than his own timesheets in timesheets portal
(/my/timesheets). It is because we use the domain defined for portal and
we don't use the access rights defined for this intenal user.

This commit uses the access right if the user has the lowest group for
Timesheet App. Otherwise, we use the domain for portal as before.

Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) bc50f70c44 [FIX] sale_timesheet: move the import to respect guidelines
task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) c824d7416e [IMP] sale_{project,timesheet}: merge bill_type and pricing_type
Before this commit, the user need to select in these both fields to
configure the pricing type of a project. Three choices are possible :
    1. Task Rate
    2. Project Rate
    3. Employee Rate

This commit merges the both fields to have single field called
pricing_type and the user selects the one of three options cited above.
The goal of this changes is to facilitate the configuration of a
project.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) 7672d0b91b [IMP] sale_timesheet: remove _onchange_task_id_employee_id method
This method was triggered when the employee_id field changes to change
the so_line field of the timesheet. However, the _compute_so_line
method does the same processing. Thus, this onchange method is useless
and replaces by this compute.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) 43da5484d4 [IMP] sale_timesheet: store remaining_hours field in SOL model
When the remaining_hours field is stored, we can search the last
SOL and the remaining hours on SO is greater than 0 for a customer with
only a search in SOL model. With this changes, we increase the
performance because before this commit, we search and retrieve a list of
SOLs and then we filter this list to find the last SOL with remaining
hours on SO is greater than 0.

This commit stores this field in sale.order.line model and we update the
_get_last_sol_of_customer method in project.task.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) 4d41aecfb8 [IMP] sale_timesheet: remove deprecated code in task
In 14.0, we removed the warning displayed in onchange methods. These
onchange methods were only used for this use case. Then, this commit
removes these onchange methods.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) e0b070eb0c [IMP] sale_timesheet: remove override of project kanban controller
From 14.0, this file contains only deprecated code.
That's why, this file has been removed in this commit.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) 2d565e859a [IMP] sale_timesheet: remove timesheets table in portal
In 14.0, we try to add a timesheets table in Invoice portal and Sales
Order portal. Unfortunately, this table is not suitable for the use
case. Because this table can be too long for the customer, it is better
to redirect the user to the timesheets portal and filter these
timesheets to have the ones that the user want to see.

task-2424382
2021-01-14 09:02:39 +01:00
Xavier BOL (xbo) da17177e0e [IMP] sale_timesheet: merge sale_timesheet_edit with this module
The sale_timesheet_edit is a new module created in 14.0 to allow to the
user to manually edit the SOL in timesheets from task form view.

This commit adds this feature in the sale_timesheet module and removes
the sale_timesheet_edit module.

task-2424382
2021-01-14 09:02:39 +01:00
Laurent Stukkens (LTU) 6c041c8d1f [IMP] sale_timesheet: remove create sale order from task form view
task-2424382
2021-01-13 14:53:52 +01:00
Laurent Stukkens (LTU) de426654a9 [IMP] sale_timesheet: remove timesheet_product_id from task form view
task-2424382
2021-01-13 14:53:52 +01:00
Laurent Stukkens (LTU) fa13d6b1b5 [IMP] project: remove partner_email from task form view
task-2424382
2021-01-13 14:53:52 +01:00
Laurent Stukkens (LTU) d1953139fa [IMP] sale_timesheet: remove non_allow_billable
This commit removes all reference to project.task non_allow_billable.
This also implies:

    * account.analytic.line non_allow_billable
    * account.analytic.line timesheet_invoice_type selection value
      'non_billable_timesheet'

task-2424382
2021-01-13 14:53:52 +01:00
Xavier BOL (xbo) f83237d3c6 [IMP] sale_timesheet: remove the context key added
This context key has been added in the 14.0 for a fix in helpdesk to
create a sale order form a ticket.
But, now we remove the 'create sale order' button in the ticket to add
sale order line field in the ticket, this field allows to link the
timesheet in this sale order line selected in this field.

Thus, this commit removes the context key used 'ticket_timesheet_ids'
since this key will never be given again in this wizard.

task-2424382
2021-01-13 14:53:52 +01:00
Thibault Delavallée b30648198a [IMP] mail: improve channel tests about moderation
Purpose of this commit is to rewrite channel tests, notably moderation
tests. In this commit we

  * use standard users instead of admin/root: this allows to test ACLs and
    more real life oriented use cases;
  * remove unnecessary tests or merge tests belonging to the same category;
  * add some coverage for corner cases;
  * make tests more readable;

We also improve some notification code and error messages that are not
really helpful for users.

Followup of odoo/odoo@e9571a403e
Task ID-2421795

closes odoo/odoo#64459

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-13 10:10:10 +00:00
Jorge Pinna Puissant eb5f69af00 [FIX] purchase: avoid updating data_planned on section/note
Do not update the date_planned of section/note purchase lines when the
date is changed on the order.

Based on f3ebab6eb52e3dc8be1f030aecfff348a22f7e09

opw-2429853

closes odoo/odoo#64458

X-original-commit: c1d5a077f26d5cb5f42888f21dafd78e3432853f
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-01-13 09:58:12 +00:00
Benjamin Frantzen (bfr) bed5c12305 [IMP] l10n_it_edi: added customer reference to FatturaPA
This is mandatory for PA customers, and required by several enterprise customers as well.

Related Ticket: 2425845

closes odoo/odoo#64443

X-original-commit: bb898e663019942a6fd99ce96ce5742a8ff7ea56
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-01-12 16:58:14 +00:00
Prakash Prajapati 5faf9883ca [FIX] sale_timesheet: fix the add to cart traceback on portal
Reproduction step:
   - Create Sale Oder(Add optional product)
   - Customer Preview(portal)
   - Add to cart

closes odoo/odoo#64442

Taskid: 2431351
X-original-commit: b7a98151694cd7e65d168cdc52dbf803c792b52d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-01-12 16:45:47 +00:00
Raphael ColletandThibault Delavallée 65fd4373c5 [FIX] core: invoke constraint methods once per write
Consider a constraint method with two fields: a normal field, and a
field with an inverse method.  When calling write() with both fields,
the constraint method should be invoked once.

closes odoo/odoo#64433

X-original-commit: 25760348859f594abb796b5bc7b28f63e298cd53
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2021-01-12 15:59:10 +00:00
Goffin Simon e8fea60bb8 [FIX] purchase_requisition: Purchase Order Approval
Steps to reproduce the bug:

- Create a user with only access rights, Inventory = Administrator, Purchase = user
- Enable feature Purchase order approval in Purchase > Settings
- Agreement Type = Exclusive, lines of Agreement, Quantity of Agreement
- Login as a new created user and navigate to a menu Purchase > Purchase agreement and
create a new Purchase agreement, confirm it
- From the button create two PO (having a total > 5000)
- Cancel one of the PO first and try to approve another one

Bug:

A UserError was riased: You have to cancel or validate every RFQ before closing the purchase requisition.

opw:2368999

closes odoo/odoo#64431

X-original-commit: dfee34b0b9c83beca9aca0b21e7f130ae86c0ee6
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-01-12 15:42:15 +00:00
Ivan Yelizariev 8e6d1d7d24 [FIX] base_automation: reset active_id(s) in onchange handler
If we change ``active_model`` in context, we have to reset active_id(s),
otherwise we read a random records which may not exist.

STEPS:
1. Activate Developer mode
2. Go to Settings > Technical > Automation > Automated Actions
3. Define a new Automated Action with the following settings:
- Model: Lead/Opportunity
- Action To Do: Execute Python Code
- Trigger: Based on Form Modification
- Trigger Fields: Customer (crm.lead)
- Python Code:
```
raise Warning(records)
```
4. Go to Contacts, create a new contact and save it.
5. Click on the "Opportunities" Smart Button on the top left of the contact record.
6. Click "Create".

BEFORE: ``records`` in context read crm.lead, while id is for res.partner
record

AFTER: ``records`` is None

---

opw-2424392

closes odoo/odoo#64421

X-original-commit: 6fd6d68ee6eee6460ffda8b7dd691c0ef93b7a30
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-01-12 15:06:03 +00:00
Benjamin Frantzen (bfr) 302c5d8596 [FIX] l10n_it_edi: the xml is now correctly attached when sending to PEC mail
Related ticket : 2425845

closes odoo/odoo#64432

X-original-commit: ddd10ad9bbef0005c2c518884c4b753c9042382e
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-01-12 15:55:38 +00:00
Adrien Widart c8515a53b0 [FIX] pos_cache: add pos to product
When adding a product to the order, the total will be updated but the
orderline will not be displayed

To reproduce the error:
1. Go to Point Of Sale
2. New Session
3. Click on a product so it will be added to the order

Err: The order's total is correctly updated but the line is not
displayed.

When displaying an orderline, the system wants to use the product's unit
name (`t-esc="props.line.get_unit().name"`). To do so, it uses one
specific variable of the current product, `pos`:
https://github.com/odoo/odoo/blob/abff1ca94bcc829250b63fd9677890988b796819/addons/point_of_sale/static/src/js/models.js#L1518-L1528
When using the standard Point of Sale, this variable is added on products
loading (L446) :
https://github.com/odoo/odoo/blob/abff1ca94bcc829250b63fd9677890988b796819/addons/point_of_sale/static/src/js/models.js#L438-L448
However, this variable is not set when using the pos_cache module.

OPW-2431221

closes odoo/odoo#64413

X-original-commit: cc2bd6717df379e87c9dfc485aa51f8dd33f6b76
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-01-12 14:14:11 +00:00
Samuel Degueldre e68a37f379 [FIX] web_editor: fix steps snippet line removed when change icon bg-col
Previously, when changing the background-color of an icon in the
s_process_steps snippet, the line that goes through the snippet would
disappear from that block. This was caused by our font-application code
attempting to remove extraneous DOM nodes when changing a font color or
backrgound-color, but not considering elements with a ::before or
::after pseudoelement has having content, and subsequently removing
them.

opw-2423785

closes odoo/odoo#64412

X-original-commit: 6b363d202d9c35e8249f7bb2b0730b995fdf4a7d
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2021-01-12 13:50:20 +00:00
Florent de Labarre f239cd546e [FIX] sale_coupon : wrong decorator
closes odoo/odoo#64316

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-01-11 10:31:25 +00:00
William Henrotin 7fa9ec2638 [IMP] stock_account: create account moves in batch
This commit groups creation and posting of account moves related to
stock valuation in case of automatic valuation product.

Previously, the account move were created one by one and posted right at
the creation. Which can really slow (for instance running
_run_fifo_vaccum with a large amount of remaining quantity layer)

closes odoo/odoo#62700

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-12-08 13:40:54 +00:00
Ibrahima Gueye e95b9c068f [CLA] update optesis CCLA
Remove Abdel Rahaman TOUKOUROU

closes odoo/odoo#64407

X-original-commit: 802ee59a8d458ffb85455c547ceb89c185a5fb64
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-12 13:16:18 +00:00
Christophe Monniez 2949138a7d [IMP] various: use the barcode qweb widget whenever possible
When using the route `/report/barcode/...` in a report, wkhtmltopdf
makes htpps requests on the server to retrieve the barcode image.
If a lot of barcodes have to be printed, this can overload the server
with too much requests and makes wkhtml crashes.

With this commit, the qweb barcode widget is used to include the barcode
as an img tag with inline barcode image as base64 data.

closes odoo/odoo#64211

Related: odoo/enterprise#15619
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-01-12 12:50:23 +00:00
Christophe Monniez db8b3f1dbf [IMP] base: improve qweb barcode widget
When printing barcodes for a large amount of records, wkhtmltopdf will
make the same amount of http requests to the server in order to retrieve
barcodes. This can lead to performance issues or wkhtml to crash.

Fortunately, an already existsing qweb widget exists that include
barcodes images as inline base64.

With this commit, the web widget is a bit improved to accept attributes
for the generated image tag. Each option dictionary key starting with
`img_` will be converted into a tag attribute with the corresponding
value.

e.g.: `'img_alt': 'Barcode'` will result in `<img alt="Barcode"...`

The `alt` img attribute now defaults to `'Barcode %s' % value` with the
barcode value.

Also, the `quiet` reportlab option is also avalaible in the widget
options, as well as the `mask` option.

Finally, if the `symbology` option is not given, the widget defaults to
`Code128`. If `symbology` is set to `auto`, the action report will try
to guess the barcode type, based on the len of the value.
2021-01-12 12:50:23 +00:00
qsm-odoo 5ab2771d30 [FIX] website_form: adapt editor list widget design
The design was not properly adapted to the last changes before the 14.0
release and still contained some invalid properties. Now the list inputs
match the design of the normal inputs.

closes odoo/odoo#64400

X-original-commit: fe102c04c0526cb7aa547f146974cdfb80629723
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-12 12:03:30 +00:00
Martin Trigaux ade40f9028 [I18n] *: export saas-14.1 source terms
closes odoo/odoo#64393

X-original-commit: eaf7ec38b2f13b044768ccb457c5523cd24753f6
Related: odoo/enterprise#15693
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-12 10:38:54 +00:00
Samuel Degueldre 2f2ea71301 [FIX] web: fix colorpicker "unknown CORS error" on safari
Previously, when opening a colorpicker in safari, the crash manager
would open with the message "An unknown CORS error occured [...]". This
is actually odoo's default message when an error has no file, line or
column, which is usually the case for security reasons on CORS error.
This is however not a true CORS error, but a "ResizeObserver loop
completed with undelivered notifications" error, which also does not
report file, line and col for the error.

This error is caused by the fact that in webkit, the baseline of an
empty input is considered to be at the bottom of the input element,
rather than at the baseline of the text of the input once it has some
content. (see https://bugs.webkit.org/show_bug.cgi?id=142968 )

In the case of the colorpicker, it uses a ResizeObserver to update its
UI, including updating the content of its inputs. This will cause the
first _updateUI to fill the empty inputs, which changes the layout of
the widget content and changes its size. Changing the size of an element
inside of a handler of a ResizeObserver on that same element will cause
an error and not call the callback again, so as to prevent infinite
loop.

This commit fixes that by filling the inputs before attaching the
ResizeObserver, so that it has its final size from the get-go, and
_updateUI will no longer change the layout/size, causing this error.

opw-2419296

closes odoo/odoo#64389

X-original-commit: 5e9e35ef0d7b0cdecc5c25dc4db04925ed0408a6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-12 10:09:31 +00:00
Goffin Simon a767c5155b [FIX] payment_stripe: Bancontact with mobile
Steps to reproduce the bug:

- Let's make a bancontact payment with Stripe on mobile from the web shop
- Stripe redirects you to Odoo
- Your phone asks on which browser you wanted to redirected to Odoo
- Choose one

Bug:

An internal error was raised.

When you clicked on a browser (the same you were using or a new one, whatever)
Odoo will resend a request to Stripe. But this request will have wrong data in it.

Stripe will answer with:

Stripe: entering form_feedback with post data {'error': {'code': 'resource_missing',
'doc_url': 'https://stripe.com/docs/error-codes/resource-missing',
'message': "No such payment_intent: 'py_1I6c4UKhH8RhRq18TJs2CP0z'",
'param': 'intent',
'type': 'invalid_request_error'},
'reference': 'S00002-1'}

opw:2422031

closes odoo/odoo#64385

X-original-commit: a42075c9f913f4a20b28f97f0f6786f5a7b2968a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-01-12 09:52:08 +00:00
Goffin Simon 14a1c6b21c [FIX] hr_fleet: mobility card on employee not repercuted on vehicle
Steps to reproduce the bug:

- Let's consider a partner P linked to an employee E and a vehicle V
- Let's change the mobility card of E with 12345

Bug:

The mobility card on V was not changed.

opw:2431316

closes odoo/odoo#64343

X-original-commit: 81e574aae3059844179dd9f54a241cd51a2474fd
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-01-11 14:54:51 +00:00
erik-bzcl 90e721d9af [CLA] Corporate signature for Bizi Software SRL
closes odoo/odoo#64374

X-original-commit: f29c6b1ffcbcfdf12d848df8ee427cc11d2df123
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-12 08:28:51 +00:00
Samuel Degueldre 3bb892cfab [FIX] web_editor: fix icons losing classes when modifying them
Previously, when double clicking and image, video, icon, or document in
the web-editor and replacing it with a different media type, it would
lose its custom classes. This means among other things, that it would
lose margins and paddings from bootstrap classes, or in the case of the
three columns snippet, that the new media would not be properly rounded
in its top corner, or not show up at all in the case of the video. The
only exception was when changing any media type to an icon, but in that
case it would also keep some of the media-specific classes that are
supposed to be removed (eg img-fluid or media_iframe_video).

This commit fixes that as well as some _clear behaviour that didn't
remove all classes that had to be removed, eg some fa-classes would
linger depending on their order, and the o_image class from documents
would always remain

Part of https://github.com/odoo/odoo/pull/64234
task-2282542

closes odoo/odoo#64234

X-original-commit: 99531f5dd8966fc4ad89d1e9c2886ad701527f3a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-01-12 06:52:14 +00:00
Samuel Degueldre 398259c93f [FIX] web_editor: fix replacing media leaving unexpected elements
Previously, changing a media from a video/icon/document to a different
type would leave empty elements in the DOM, this is because summernote's
range API `range.insertNode` function deletes the content but not the
structure (HTML elements).

This commit fixes that by using jQuery's replaceWith method instead of
summernote's insertNode when a media was found, and only using
summernote in case no media was found (eg. a text range).

Part of https://github.com/odoo/odoo/pull/64234

X-original-commit: 63f80995a05eeab1061b769c7733a1cfa98c726e
2021-01-12 06:52:14 +00:00
David James a2cb36e854 [CLA] signed by davejames
closes odoo/odoo#64289

X-original-commit: 30a0a5ced3a90c73fbec322a447e741b4b677ca2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-08 17:36:18 +00:00
张文广 44ca035641 [CLA] Zhang WenGuang signs personal CLA
closes odoo/odoo#64287

X-original-commit: 640610a39b7acc6a2840443e895266e8a64320a6
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-08 17:31:11 +00:00
Romain Derie ec132b530f [FIX] web_editor, website: prevent multiple click on save
Clicking on save on html editor is taking quite some time. The user might think
something is not happening and need to click again.
If he does click again, 2 write RPC will be sent, making the COW business code
being triggered twice, ultimately leading to create 2 COW.

Instead of
  A
 / \
B   B'

It will be
    A
  / | \
B   B' B'
With as many B' than there is click on save.

This commit adds a generic helper to make a button load/spin.

closes odoo/odoo#64366

X-original-commit: 80592abda266ef3f9f463854c3101eb3f728087b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2021-01-11 18:41:32 +00:00
Ivan Yelizariev d20f10c0c1 [FIX] point_of_sale: respect setting only_round_cash_method
STEPS:
* configure rounding:
  - cash_rounding=True
  - only_round_cash_method=True
  - round method: 1.0 Down

* open a session
* add products with subtotal in decimals (such as 6.35)
* select Bank payment method and process the order

BEFORE: error "You have to round your payments lines"

AFTER: order is processed and marked as paid

---

https://github.com/odoo/odoo/commit/42425996e36d9cb1fc1391402cf6d00df4aea019
opw-2426027

closes odoo/odoo#64351

X-original-commit: db0b65e547defe3d49c1a31c4671f546aa5156e8
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-01-11 15:45:33 +00:00