Commit Graph
140847 Commits
Author SHA1 Message Date
Jérémy Hennecart 16908e9eac [FIX] crm: correctly recompute dynamic depends when emptying crm.pls_fields config parameter
When we clear the configuration parameter crm.pls_fields unlink method is
called. In order to have a correct dynamic compute based on this parameter
we need to re-evaluate the depends. This is done by overriding unlink of
ir.config_parameter, like already done at create and write.

Task-2196200

closes odoo/odoo#61293

X-original-commit: d04cc4df4ec28816aeb6d1d7c7fc0e547fd13fa5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-03 16:43:37 +00:00
Laurent Smet a011dcc0bd [FIX] point_of_sale: Always use VAT account for tax lines
As the POS doesn't manage CABA entries, don't use the temporary CABA account.

closes odoo/odoo#61250

X-original-commit: 5f3b8108888d019b0a66b47472b98c04889d343b
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-03 11:26:11 +00:00
nie 54b3cd2b15 [FIX] pos_sale: Traceback showing info about POS sales team invoicing
Steps to reproduce the bug:
- Assign a sales team to a new POS
- Go to Sales > Orders > Sales Teams

Bug:
Traceback:
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

opw:2371276

closes odoo/odoo#61292

X-original-commit: 6d41376ae0f17fd582daa6ac78de05cd1255d7b4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-11-03 16:19:42 +00:00
Laurent Stukkens (LTU) 76489303c8 [IMP] hr_contract: ease contract management through contract history
Before this commit:

    It was complicated to manage the contracts as they were all displayed in
    one view.
    When the contract was a time credit one (which is by definition a temporary
    situation) the data used was based on the time credit and not on the full time
    equivalent. This usually forced the HR to create fake new contracts without
    time credit for the appraisals.

After this commit:

    A new report will ease the followup of contracts with the time running.
    It comes with a new view that highlight the reference information which
    allow to easily manage credit time. Simulation is also made on FTE data which
    eases HR work.
    This commit also fixes a bug in the simulation with the meal voucher (only one
    was taken into account in the summary right panel.
    The wage on signature is now populated when the document is signed.

Closes odoo/odoo#58120
Related PR: odoo/enterprise#13384, odoo/upgrade#1802

task-2326407

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-03 15:08:45 +00:00
Sébastien Geelen (sge) 292b03a990 [FIX] web_editor: fix the image gallery snippet
closes odoo/odoo#61254

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-03 11:48:29 +00:00
Antoine Guenet fcd2f942c2 [FIX] web_editor: disable snippet in preview mode on mouse leave options
closes odoo/odoo#61030

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-30 10:54:37 +00:00
Antoine Guenet a6b7d082e8 [FIX] web_editor: properly deactivate snippets and reactivate the last
Some lines had been wrongly (re-)moved during the process of integration
of Jabberwock. This restores them. Among other things, this fixes the
issue that made the popover snippet options still appear when the
snippet was invisible.
2020-10-30 10:12:43 +00:00
xO-Tx 3ab48f5f56 [FIX] web_editor, website: restore footer visibility option
Making the footer visible after having made it disappear was not
possible anymore because of [1].

Part of https://github.com/odoo/odoo/pull/59624
task-2312878

[1]: https://github.com/odoo/odoo/commit/61ffe97d03deae0aee72568311c453d1cd3470c8

closes odoo/odoo#61275

X-original-commit: fab31e378d2069ff6f2bd18365de2f116a43b872
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-03 14:16:31 +00:00
qsm-odoo 585f269212 [FIX] website: fix footer/header item move
Using the handle to move elements from footer/header anywhere
in the page would make the main element disappear with endless
content loading animation.

The end of the drag and drop executes a serie of methods :

_destroyEditors > cleanForSave > toggleTargetVisibility

Since the "cleaning for save" is called for all snippets and the footer
doesn't contain a 'o_snippet_invisible' class, the "onTargetShow" method
is called... but actually hide the footer because the "onTargetShow"
implementation was so that it clicks on the visibility checkboxes
regardless of its current status.

Part of https://github.com/odoo/odoo/pull/59624
task-2312878

X-original-commit: 5488916657f9cd4041abdcbe3fc615174df6cb49
2020-11-03 14:16:30 +00:00
Swapnesh Shah 144dd15505 [IMP] website_sale: respect view mode on action website product
Before this commit:
Going to Website / Products
--> Products will open `tree` at first position while it should open `kanban`
view based on given `view_mode`.

After this commit:
>e remove explicit `view_id` and add view ref in `context` so it opens `kanban`
at first and respects given view_id as well.

This commit closes #50349

closes odoo/odoo#61273

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-03 14:05:06 +00:00
oco-odoo b66c4fd0f7 [FIX] account: reconciliation widget: make invoice matching reconciliation models work with write-off lines
Use case:

1) Create an invoice matching reconciliation model, matching 90% percent of the amount, with a write-off line applying a 100% write-off of the remaining amount.

2) Create a 100€ invoice

3) Create a bank statement with a 90€ statement line whose payment reference corresponds to the one of the invoice

4) Click 'reconcile' on the bank statement

On enterprise, this crashes when preparing the data to give to the reconciliation widget, as the write_off_vals key is not set properly by the call to _apply_rules.

OPW 2367754

closes odoo/odoo#61265

X-original-commit: 1dd6199519b4ad5b5b17dfa17965ededcecb6da4
Related: odoo/enterprise#14563
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-03 13:23:08 +00:00
Anh Thao Pham (pta) 8dcb312650 [FIX] point_of_sale, pos_restaurant: fix full product name
- Go to Point of Sale > Configuration > Attributes and create an Attribute:
  * Attribute Name: Attribute X
  * Variants Creation Mode: Never
  * Attribute Values: Value Y, Value Z
- Create a Product (i.e. Product X) available in POS with the created Attribute and Values
- Configure a POS and enable the following options:
  * Is a Bar/Restaurant
  * Product Configurator
- Open POS Session and select a table (i.e. Table 1)
- Select Product X and a value for Attribute X
- In the order summary, the value of the attribute appears after product name
- Go to Floor plan
- Go back to Table 1
The values of all attributes don't appear anymore in order summary

In POS front-end, when adding a product, the name of all chosen attributes values
are registered in a variable named "description".
The full product name displayed in the order summary is generated from display_name
of the product and this "description" variable.
When moving to floor plan, ongoing orders are saved in DB and reloaded when moving
back to a table.
As "description" is not saved, regenerating full product name from display_name of
product and "description" is not possible.
However the generated full product name is saved in DB and can be retrieved.

opw-2371965

closes odoo/odoo#61266

X-original-commit: df3061f6e8061cf039bf083f649b7585c8c31df4
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-11-03 13:24:16 +00:00
Romain Estievenart f00fcbfca6 [FIX] web: datepicker inside a dropdown
Steps to reproduce:

1. Go to Project
2. Filter > Add custom filter > Last Updated on
3. Click on the date field and use the date picker to change the value
4. The dropdown is closed and you lost your selection => BUG

This bug was due to a conflict between owl and bs dropdown (e4f87710),
to prevent this bug, we added a check to ensure there are no open
bootstrap calendar inside the current dom.

Note that if you click outside the dropdown, the datepicker is already
closed when you go through this code. It means that the datepicker will
not be present in the DOM anymore and the dropdown can be closed too.

opw-2373573

closes odoo/odoo#61262

X-original-commit: 73dfc1f7a8e2197fcdd4053ec57c260576593a15
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
2020-11-03 12:50:41 +00:00
Thibault FrancoisandAlex Tuyls 0356e543c2 [FIX] odoo_referral(_portal): remove referral
Remove referral feature.
remove odoo_referral and odoo_portal feature

closes odoo/odoo#60927

X-original-commit: dda0bb499b0964b3a1750431255ecfef6cc9eb46
Related: odoo/upgrade#1889
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Thibault Francois <tfr-odoo@users.noreply.github.com>
Co-authored-by: Alex Tuyls <alt@odoo.com>
2020-11-03 10:20:42 +00:00
Rémy Voet (ryv) 725232bb1a [FIX] purchase: fix bug in purchase list overview
In the overview of purchase, click on "To Send" will raise a traceback.
Fix the clean of 2d2783d7ee .

task-2372196

closes odoo/odoo#60916

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-29 10:06:56 +00:00
Pierre Masereel 30139007f9 [FIX] point_of_sale: validate pickings when kits are sold
When you are selling a kit in point of sale, the genrated picking is not
validated.

It is not validated, because the moves are not confirmed, before we set
a quantity done, and so the moves are not exploded and it result to the
impossibility of  calling action_done on the picking.

To avoid this problem, we are confirming the moves created, and then set
the quantity done on the moves generated from the
confirmation.

closes odoo/odoo#61260

X-original-commit: 4f2f347c8b21b78efaa702d1b3c91b7f88dd88e0
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-11-03 12:35:41 +00:00
Julian Roussieau 093e86cde6 [FIX] stock_dropshipping: singleton in dropshipping rules
When you want to obtain `dropship_picking_type`, it is possible to have
several results. This will lead to an error when doing
`dropship_picking_type.id`.

```
dropship_picking_type = self.env['stock.picking.type'].search([
    ('company_id', '=', company.id),
    ('default_location_src_id.usage', '=', 'supplier'),
    ('default_location_dest_id.usage', '=', 'customer'),
])
```
The fix ensures that `dropship_picking_type` contains only one element.

closes odoo/odoo#61256

X-original-commit: 3e3b1b335ced1ff20129172e6a7b2b0dcbe1a20d
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-11-03 12:09:30 +00:00
Josse Colpaert ffcc8b9e77 [FIX] l10n_it_edi: ondelete param on one2many does not make sense anyways
closes odoo/odoo#61211

X-original-commit: cea51cfc4b00eff472bf0ba3d61704fb8537e9c6
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-02 17:29:03 +00:00
Martin Trigaux 51527987c0 [FIX] base: verify the rights on individual records too
The access rights of a model was checked but not the records themself.
In case a user has access to a model but not to a specific record, he
should not be able to execute a server action on it.

Correct the ir.rule on private partners to be also verified for other
operations than read.
While it was not possible to actually write on it (due to side effects
of ORM where write implies a read operation),
check_access_rule('write') was working on a private address

closes odoo/odoo#61253

X-original-commit: b0028c05d6ba9c67f16992ddb446eea6a854d099
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-03 11:48:41 +00:00
Martin Trigaux 73830169d5 [FIX] base_automation: access action fields using sudo
The user executing an action triggering an base automation may not
have access to the base.automation record itself (regular employee or
portal)

Added test test_on_create_restricted failed before this patch as the
portal does not have the rights to read the base.automation record

Fixes odoo/odoo#59680

X-original-commit: 33a7142f298eeda7808d6d07e80231836442a0ce
2020-11-03 11:48:40 +00:00
IEL 3c7694b409 [FIX] *: fix image parsing error on saving res config
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus

WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:

	When saving, a read is called. By default, read has
	bin_size to true to avoid performances issues.
	It will return the image size instead of the content

it may lead to image dissapearing or "Incorrect padding" error

HOW:

    find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
    git checkout  -- addons/base_setup/views/res_config_settings_views.xml

---

PR for General Settings: https://github.com/odoo/odoo/pull/47297

opw-2346644

closes odoo/odoo#61215

X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 18:25:20 +00:00
Nicolas Martinelli 39ab53a4d6 [FIX] sale: down payment translation
- Set a customer language to a different language, e.g. French
- Create a SO, add a product and validate
- Create a down payment

The down payment invoice is partially translated in French.

This was first solved in fc659d3f78 but broken in
0e73eca1364c8e0df93cd.

opw-2365982

closes odoo/odoo#61207

X-original-commit: f10b98d1776659f291b2f7f8a4a2111e4f106667
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-02 17:10:14 +00:00
Arnold Moyaux a021d627f1 [FIX] stock: perf run scheduler multi company
Usecase to reproduce:
- 10 company having 10 000 moves in state 'confirmed', 'partially_available'
- Run scheduler manually (without cron)

It will takes a huge amount of time.
It happens because the run scheduler wizard will call run_scheduler
as sudo for each company (passing company as arg).

run_scheduler will try to assign move that could be reserved. However
the domain in order to search move do not include the company_id and
search for every company.

Following upper usecase:
Instead of running action_assign 10 times on 10 000 moves, it will
run action_assign 10 times on 100 000 moves.

Databases with multi companies and having a lot of stock will have a
scheduler speedup from this patch.

Thanks "Rémy Voet <ryv@odoo.com>" for finding this issue.

opw-2328707

closes odoo/odoo#61183

X-original-commit: a21f9876b5b9d01380d03d638deb48cd091f26e7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-11-02 15:16:06 +00:00
Achraf (abz) d36c51d082 [FIX] sale_stock: resize quantity widget
Issue

    - Use runbot with all modules/duplicate DB-all
    - Open a sale order randomly and enable every columns on Order Lines
    - Press "CREATE" button
    - Add "[E-COM11] Cabinet with Doors" to the products

    The widget is not visible

Cause

    There are too many columns

Solution

    Increase the width of the widget

opw-2342149

closes odoo/odoo#61210

X-original-commit: f1a1cf87efc184dfe8f266729e5923994d224ce5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-11-02 17:22:01 +00:00
Xavier Dubuc b0ae9777f0 [FIX] mail: handle traceback on need_moderation=false filter in discuss
Changed ValueError to UserError and return to raise so the user get a popup to
explain that this filter value is not supported instead of a traceback

task-2352688

closes odoo/odoo#61213

X-original-commit: f9ab590cd961026865808f4008bd45fc2afb6bed
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-02 17:44:06 +00:00
Benjamin Vray 2c21649d35 [FIX] web_editor: avoid traceback on form inputs double-clicks
Before this commit, double clicking on the border or on the padding of
a form input generated a traceback.

task-2312878

closes odoo/odoo#61201

X-original-commit: 904af21214a5a6924ec80b5690a523819aaec5f1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-02 16:37:49 +00:00
qsm-odoo 265d8ce9d2 [FIX] website_form: fix form values reset on Firefox
Reseting the field should just be done through the form element's reset
method to let the browser do it properly, otherwise the browser may
validate the applied values (and for example mark the required field
as wrong (making them red)).

task-2312878

closes odoo/odoo#61200

X-original-commit: 7676fc069d8b6458d0fc1f8eafe087ce553743f0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-02 16:37:27 +00:00
Laurent Smet 6b404c615d [FIX] l10n_de_skr04: Fix typo in account.account.template.csv
closes odoo/odoo#61198

X-original-commit: 1a8913aa6830618fd973e753d16f2392d0c30d85
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-02 16:23:42 +00:00
Laurent Smet dea2833029 [FIX] l10n_hu: Fix typo in account.account.template.csv
X-original-commit: f40b2483e170abca20349a21613b762b0b88b660
2020-11-02 16:23:41 +00:00
Benjamin Frantzen (bfr) d31e260646 [FIX] account_edi: prevent a failed edi import to be imported again
When creating an invoice from an attachment fails, we call super() which creates a new invoice and post the attachment to it without the `no_new_invoice` context key. This triggers an new import of the attachment.

closes odoo/odoo#61191

X-original-commit: 034625f2ade73f368f97e583b83db86372ae8001
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2020-11-02 15:50:56 +00:00
oco-odoo 84c14fde05 [IMP] account: better handling of journal codes when duplicating
Before that, even though the code contained something about it, the duplication of account.journal objects handled their code field pretty poorly (as it was trimmed to 5 characters), leading to situations where journals could have the same code, leading to possibility for account moves to have the same name.

This commit improves the SQL constraint testing journal codes so that they  must now be unique per company. We also recompute the code in a more advanced way so that journal duplications works as smoothly as possible.

Task 2346404

closes odoo/odoo#59791

Related: odoo/enterprise#14447
Related: odoo/upgrade#1880
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-02 15:46:15 +00:00
Andrea Grazioso (agr-odoo) b9d4976a97 [FIX] pos_epson_printer: disable cashdrawer when parent option is unchecked
Open POS Config
Enable the option 'Connect Devices'
In 'Epson Receipt Printer IP Address' write anything then focus out
Enable the 'Cashdrawer' Option
Empty 'Epson Receipt Printer IP Address'
Disable'Connect Devices'
Save

Blanking 'Epson Receipt Printer IP Address' leaving 'Cashdrawer' on
will lead to crash during the payment session if the user click on
'Open Cashbox' when using cash as a payment method.

'Cashdrawer' should be disabled automatically when needed.

opw-2367498

closes odoo/odoo#61086

X-original-commit: 6491f9b20570c374e464194cbce698b00c173847
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-30 17:30:56 +00:00
IEL 33b35286cb [FIX] hr_holidays: hide Duration for half day leaves
STEPS:
* install hr_leaves
* allocate half days leaves
* start creating new time off, set [x] Half day checkbox

BEFORE: there is label "Duration", but no any fields for it

AFTER: hide Duration label

WHY:

* this bug came after improvements in https://github.com/odoo/odoo/commit/d2238de57630d58c4913ab44746476b83492c72f

---

opw-2370907

closes odoo/odoo#61181

X-original-commit: 47213962c8884125e8f68c7bd39e499a585d1345
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 14:57:24 +00:00
Xavier Dubuc 3dd9c3b7f9 [FIX] mail: handle transient messages with (un)seen notions
task-2343887

closes odoo/odoo#61180

X-original-commit: 03481fd3df9bc53a17ba884ad4029ae46d7e54bf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-11-02 14:56:57 +00:00
wan be2f050993 [FIX] account: view statement correct action
The dashboard "View Statement" action on bank journals was using the
`open_action` helper, but it was badly computed for journals with
`bank_statements_source` set to `online_sync`. We were directed to the
statement lines instead of the statements; and there was no other way to
go to the list of statements.

closes odoo/odoo#61190

X-original-commit: 78286851034b8f3ef4dcab78e50b7220c0bdd213
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-11-02 15:50:34 +00:00
Benjamin Vray 6a2dd450a7 [FIX] website: fix off canvas hamburger max height
Before this commit, the max height of the off canvas hamburger was the
same as the standard navbar-collapse (80vh) but in the case of an off
canvas hamburger menu we need a 100vh max-height to display it
properly.

task-2312878

closes odoo/odoo#61189

X-original-commit: 007580b2cd7329733f1e9b70ea95265080b7ccd8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-02 15:49:50 +00:00
Martin Trigaux b5ab4a3aca [FIX] sale: revert cfc9abe14689d
Revert "[FIX] sale: correct _get_to_invoice_qty depends"
This reverts commit cfc9abe14689db82acf1872fa8d358662fc7e123.

While the field is indeed in the list of records, it's a big change of
behaviour.
Retroactively changing the invoicable lines of sale.order that are
closed is dangerous and can lead on unexpected behaviours.
Performances can also be bad when changing the product configuration
on a database with a lot of sale orders.

Changing the product configuration should only apply to future orders,
not past.

closes odoo/odoo#61168

X-original-commit: be13bc94c2ff51b99a4399be44a765d0b28202eb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-02 14:04:48 +00:00
Goffin Simon c11179b0b4 [FIX] purchase: Smart button in contact view form
Steps to reproduce the bug:

- Let's consider a company contact C with two children CH1 and CH2
- Create a purchase order for CH1 and a subscription for CH2
- Archive CH1 and CH2

Bug:

The count of purchase orders in C was displaying 0 instead of 2

Same issue for the vendor bills

opw:2360155

closes odoo/odoo#61167

X-original-commit: b3e31f2680534382b048324cfcb8a6f6c457553f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-02 14:04:26 +00:00
Goffin Simon 16d9ca17fc [FIX] crm: Opportunity Smart Button Incorrect Value
Steps to reproduce the bug:

- Let's consider a company contact C with two children CH1 and CH2
- Create an opportunity for CH1 and a subscription for CH2

Bug:

The count of opportunities in C was displaying 0 instead of 2

opw:237344

X-original-commit: d11fb611fed3a8541d03b7d3e49973ae7c16a768
2020-11-02 14:04:25 +00:00
Goffin Simonandnim-odoo 8ffac3464c [FIX] crm: Smart button for meetings not working
Steps to reproduce the bug:

- Let's consider a company contact C with two children CH1 and CH2
- Create a meeting for CH1 and a meeting for CH2

Bug:

The count of meetings in C was displaying 0 instead of 2

PS: set() is used to avoid to count several times the same event for a partner.

If for example CH1 and CH2 attend to the same event, only one event must be counted for the
parent C

opw:2360155

X-original-commit: 7449c8a6643477742616bf236f2f2c90aec68581
Co-authored-by: nim-odoo <nim@odoo.com>
2020-11-02 14:04:25 +00:00
Daniel DuqueandRaphael Collet 55bd019a62 [FIX] core: missing default values with inherits
Consider some model A that "_inherits" from model B, which itself
"_inherits" from model C.  Also consider a field F on model C, which is
inherited by both models B and A.  Now create a record from model A,
with a given record for model C, no record for model B, and a default
value for field F.  This should create a record in A, connected to a new
record in B, connected to the given record in C, and the default value
should be ignored, as a record from C is given.

Before this commit, the given record in C is modified with the default
value for F.  The default value is considered because no record is given
for B, and that value is used to modify the given record in C.  The fix
consists in discarding default values by considering potential ancestor
records when parent records are not given.

closes odoo/odoo#61165

X-original-commit: b83dfaa2c9bcc6bc7f8df19ed0e442554816709b
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2020-11-02 13:53:36 +00:00
Daniel Duque 51ed48b1b6 [CLA] FactorLibre
X-original-commit: bec158627024f3ff6e7352cc8d4e91be9d807540
2020-11-02 13:53:36 +00:00
Nasreddin (bon) b85680a348 [FIX] portal_rating, rating: Wrong star rating number
Issue

	- Install 'eLearning' module
	- Go to 'Course' page on website
	- Open any course and click on 'Review' tab

	Rating star numbers are 2,4,6,8 & 10.

Cause

	Since this commit https://github.com/odoo/odoo/commit/e4a4ffb974ccde1842e1b2389450718f8576ad5b,
	odoo use a system of 5 stars instead of 10.

opw-2373115

closes odoo/odoo#61158

X-original-commit: e2e1ecd0de467cb97748092554c5abc3b0c9f993
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-11-02 13:12:52 +00:00
IEL f7c5fb244f [REF] hr_holidays: remove readonly in labels
WHY: it's a copy-paste mistake and doesn't have any meaning, while makes code
less readable

closes odoo/odoo#61091

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-30 18:05:14 +00:00
Nasreddin (bon) 9b90b933ed [FIX] mail: mail not sent because partner not find in chatter
Issue

	Partner not found if multiple breakline in message.

Cause

	'\n' not replaced by '\n ' globaly.
        '<br/>' not replaced by '<br/> ' globaly.

Fix of this commit : https://github.com/odoo/odoo/commit/902302598e98efab52d61979e85def6d025ff2ab

opw-2322577

closes odoo/odoo#61145

X-original-commit: 64a1a7b78782cb255a47d2e7d55d605c8175b6ce
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-11-02 12:19:30 +00:00
nans 2c7f9f7553 [FIX] product: remove unused confusing variable
This variable has been unused since commit f3d6a54e36.

opw 2368733

closes odoo/odoo#61143

X-original-commit: 563253a8303723e3eb4217005bf518fdf6b3f9e3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-02 11:54:10 +00:00
nans 922dbe7de0 [IMP] product: extract pricelist item price computation into its model
The pricelist item model (product.pricelist.item) has a compute_price field,
and the necessary fields to be able to compute the price of a product.
However, these fields are never used into the model itself;
the parent model (product.pricelist) actually makes the computation,
embedded into _compute_price_rule.
Because of this, it's not possible to inherit pricelist items.
It's also a better design, on object principles.
Last, it lighten a method that is still 130+ lines long.

opw 2368733

X-original-commit: 9cd0bf740706a64e49599111304a6fb5ec6d7287
2020-11-02 11:54:10 +00:00
Nicolas Galler 4f3af25a15 [FIX] stock: consistently use translated value for product description
Behavior prior to this commit:

In a multi-lingual setup, when entering a SO for a customer set in
a non-default language with a product that has translation in both
languages and is set up to replenish on order, the description in the
generated RFQ is duplicated, for example: "Product test Test Product in Dutch"

The problem stems from the fact that the description on the generated
stock move is set to the translated name of the product.  When
generating the PO, the stock move class removes the product name to
avoid duplicating the description, but it uses the non-translated name
in the comparison.

Behavior after this commit:

The description on the RFQ line is included only once (using the default
language for the database)

opw-2368562

closes odoo/odoo#61138

X-original-commit: d013f8641ae2ed8c12d30ba5650c8e6ff2f1d5fd
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-02 11:28:37 +00:00
Benjamin Vray 855cba11f6 [FIX] website_forum: fix link and media option in wysiwyg editor
Before this commit, link and media buttons of the wysiwyg editor
toolbar in the forum were never displayed. It's because we were not
using the right option names in the toolbar object.

Thanks to @kirtangajjar for initial bug fix.

Closes https://github.com/odoo/odoo/pull/53589
task-2369420

closes odoo/odoo#61098

X-original-commit: 88a693fa5b8852596e623e08f5eb846b9988b5d7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-30 19:03:01 +00:00
Pierre Collinet (pic) c5b448552f [FIX] sale: forward port error
fix conflicts due to the new PR for the forward port created by the fw-bot

closes odoo/odoo#56121

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-10 12:54:08 +00:00