Commit Graph
134868 Commits
Author SHA1 Message Date
Arnold Moyaux da3eddbd51 [FIX] stock: warehouse code should impact picking type
Usecase to reproduce:
- Create Warehouse with code A -> Picking type sequence start with A/
- Set the warehouse's code to B -> Picking type sequence remains A/
- Set the warehouse's code to C -> Picking type sequence become B/

It happens because _update_name_and_code is called before the write and
it updates the picking_type's sequence with warehouse current name and
code.
2020-03-19 10:45:25 +00:00
Adrian Torres 975ba27723 [FIX] core: enable logger.runbot() when importing odoo as a library
Before this commit, trying to use Odoo as a library without initializing
the logging features would result in a crash because `Logger.runbot()`
is monkey-patched inside the function `init_logger()`, which is de facto
necessary for using Odoo as a lib.

With this commit, we do the monkey-patch at the module-level so whenever
the `netsvc` package is imported the patch is applied, which should be
well before the loading of the registry starts.

closes odoo/odoo#48396

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-26 09:25:15 +00:00
Benjamin Vray 34227348f0 [FIX] website: fix height and position of carousel indicators controls
In gallery snippet in carousel mode, fix the fact that the height of
the controls are bigger that the others squares and fix also the wrong
position of the indicators.

task-2162952

closes odoo/odoo#48380

X-original-commit: 9752596abfcae6b0bbf79ac675fe9e304a068a21
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-25 17:03:36 +00:00
Benjamin Vray e0dda5172e [FIX] website: fix an issue when changing width option in the gallery
As the container class now changes with the width option. We cannot use
this class in the js or css files anymore.

task-2162952

closes odoo/odoo#48377

X-original-commit: 1cf2ee35c2d85d87b27d5bd72c414e12fcbaf123
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-25 16:27:40 +00:00
Swapnesh Shah d805d73297 [FIX] website: make company required on website config
Before this commit, There would be a crash if the user tries to remove `website_company_id` from Website configuration as It is used in Backend.

With this commit, we make `website_company_id` required if the Website is set.

Fixes #47967

closes odoo/odoo#48175

X-original-commit: 940cc76ef3f301df91b60353e48cbaa5217bea93
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-23 10:43:29 +00:00
Thibault Francois 44c1e0805c [FIX] account: see only the move's company accounts
While you edit an account move line
you only want to see the account
that belong to the company of the move

The record rules on account.account
lets the user see the account
of all the company selected.
It too much when you want to select an account
on a move.

Solution:
Add a domain in the account.move form view

closes odoo/odoo#46197

X-original-commit: e0aeb878eed266810862ffb2efc7c03f51389c8f
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-02-25 09:48:02 +00:00
Goffin Simon 89ede9b576 [FIX] product: Duplicating attribute
Steps to reproduce the bug:

- Let's consider an attribute A with two values V1 and V2
- Let's consider a product P with V1 and V2 as attributes
- Duplicate A

Bug:

P was associated with 4 attributes V1, V1, V2 and V2

opw:2219540

closes odoo/odoo#48342

X-original-commit: 1c44aeb7d1734cd7a6dbdb80971f98553c67003b
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-25 12:12:23 +00:00
Nicolas Lempereur 71e163be9b [FIX] base: cut multipage multi-documents on top heading
When we print a report for multiple records, we call wkhtmltopdf one
time and to save each document separately, we will split the PDF based
on its outline if it is available.

The outline is generated by wkhtmltopdf based on headings
(H1,H2,H3,H4,H5,H6,H7,H8,H9 elements) for example this document:

```
<h1>hello</h1>
<h2>world</h2>
<h1>!</h1>
```

has this abbreviated outline structure:

```
/Outlines: {
    '/First': {
        '/Title': 'hello'
        '/First': {
            '/Title': 'world'
        },
        '/Next': {
            '/Title': '!'
        }
    }
}
```

But the current heuristic did not take into account level of headings,
so if the document had a lower-level headings this could break the
multi-printing of these reports.

So for the example above, the document would be cut in 3 when in reality
we only want to cut it twice over the top level heading (`<h1/>` here).

An existing issue in Odoo is in l10n_in_sale, `<h6/>` element are added
to the report invoice line so instead of only one `<h2/>` heading
containing the invoice name per document, there was an additional
heading per invoice line which broke the heuristic.

note: we also add an assertion to ensure first heading is on first page.

note: allowing several top-level heading on same page has been
implemented so reports that did not work in 11.0 but worked in 12.0 and
over (thanks to 573e57773) still work after this change.

opw-2188767
closes #48099

closes odoo/odoo#48374

X-original-commit: 63c2478cc9fb21afb83d31b04ff6c6090ee492ab
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-25 16:09:34 +00:00
Nicolas Lempereur f3182c6035 [FIX] translate.py,web: aria-label qweb translation and export
In 12.0 9de1bc0e aria-label translation was added for python views, but:

- aria-label attribute are not exported

- aria-label are not translated for JS view rendering

So by default, aria-label would only be translated for python views that
had the same aria-label term in a translatable element (eg. "title"
attribute).

opw-2222504
closes #48255

closes odoo/odoo#48275

X-original-commit: 6b6b11ea2f8391f1f195bd1650531f77b6bed729
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-24 14:46:30 +00:00
Thibault Francois 25e39cdf1b [FIX] account: set proper account_id one line
When you create a invoice from a sale_order
the account was taken from the journal and
it should comes from the product
or the product_categories and in last resort the journal
and finally fiscal position should have been apply.

It was not the case anymore,
because setting the partner_id prior the account_id
trigger the default_get on the account_id which
in that case take the wrong value

closes odoo/odoo#47267

Solution: set first the account_id then the partner_id
X-original-commit: 857564367691f3f11572f718499c9d22c823c421
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-03-10 10:16:12 +00:00
Luis González 680b2797d8 [FIX] web: Add missing aria attributes to selectable menu items
Some menus contain items that are selected/checked when they're
activated, e.g. when a filter is applied, the menu item corresponding to
that filter is checked. However, that information of what items are
checked and what don't, is not reported correctly using aria attributes.

To solve the above, the following is performed:
- Attribute `aria-checked` is set accordingly, usually using the same
  logic as the clas `selected`
- Attribute `role` is set to `menuitemcheckbox` or `menuitemradio`
  instead of `menuitem`, so `aria-checked` is applicable

This applies on the following cases:
- Standard topbar's menus: Filter, Group by and Favorites
- The company switcher widget

closes odoo/odoo#48301

X-original-commit: 64c0b47c0e8e8fdd3fa9b1bc13f2b49b6f49f4e1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-25 09:57:53 +00:00
Thibault DelavalléeandRaphael Collet a1654e59b9 [FIX] core: computed fields can be copied if editable
Purpose of this commit is to let computed stored editable fields being
copied if their field class allows it.

Indeed the value of those fields is computed based on some triggers but
can also be updated manually by users.  When copying a record, it makes
sense to consider that this value is what the user expects and allow its
copy, if the original field allows it.  Either it was computed, and
copied value will be correct without having to call computation again
(well, provided all dependencies have been copied, too), or it was
updated and the copied value will be the one the user entered.

Without this fix, an edited field is not copied, and will be recomputed,
which may look like an inconsistent value.

Task ID 2209163

closes odoo/odoo#48383

X-original-commit: 4b274d3b4101fbae154a572cdf40d23838899773
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2020-03-25 17:36:02 +00:00
RVE-odoo 3efffa8a55 [FIX] website_slides: allow feedback update on review update
Currently, when updating a review on a course, the feedback field is not
updated on the rating model. Therefore, the backend view for rating is
always displaying the first feedback posted

Task ID 2184038

closes odoo/odoo#48382

X-original-commit: f2d04753be9f1feb75e575b0598b3520caa4744d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-25 17:29:21 +00:00
Victor Feyens 466217ff6c [FIX] sale_stock: default warehouse_id
Finetuning of
https://github.com/odoo/odoo/commit/b30e280b2d676f16873ac0fd1279c4870d994dec
:

self.user_id is always an empty recordset in a default function call,
use self.env.user instead, it is the default value for user_id.

The _init_column override is needed to ensure the new property field on
res_users isn't read at module installation, because its ir.model.fields
doesn't exist already, leading to a wrong sql query in ir_property.

closes odoo/odoo#48378

X-original-commit: 6c6bd018c761535f973781319090116d7eea60ad
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-03-25 16:28:04 +00:00
jvm-odoo 5eea6b278e [FIX] website_slides: fix undeletable question answer
Issue

	- Go on Runbot V13
	- eLearning
	- In a course, try to delete a question

	You can't

Cause

	The linked answer is not deleted
	If you want to delete the answer you should
	add an extra menu

Solution

	Add ondelete='cascade' on answer's question_id
	Prevent course deletion if there are attendees

OPW-2210096

closes odoo/odoo#48372

X-original-commit: 799ee72facbca7a7eaf348938ed312a6d723854e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-25 16:04:59 +00:00
Swapnesh Shah ca7f780ca7 [FIX] website_event_track: fix kanban state position on form view
Before this commit, the `kanban_state` field on the form view was not
positioned correctly in community edition, making it impossible to read
possible values. This commit fixes that by ensuring it is on the right.

Due to some CSS differences enterprise was not affected.

Fixes #38567

closes odoo/odoo#48370

X-original-commit: 2f89951a17762c05e17a247fa795e9f96703018d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-25 15:51:46 +00:00
Thibault Delavallée 52ac7f2ddb [FIX] website(_crm): fix email and phone computation of visitor
Currently there are several limitations in visitor email and phone
computation, notably phone of partner is not taken into account (only mobile)
and computation does not work in website_crm if there are no leads.

In this commit we

  * support both mobile and phone fields of partner. Indeed generally all
    SMS flows check for those two fields and not only for mobile;
  * replace the SQL by standard ORM computation. As those fields are not stored
    and displayed in list views ORM should be capable of managing them;
  * avoid crash when creating visitors through the UI (no ids -> don't go
    into raw SQL);
  * correctly keep partner-based values when no lead is linked to the visitor;

Tests are also added in order to ensure behavior.

Task ID 2196869

closes odoo/odoo#48369

X-original-commit: 02ceb42e204be2b40b334b4e554eef6dfaffd228
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-25 15:51:25 +00:00
Swapnesh Shah a2e5514b8a [FIX] product_email_template: use correct parameter for notification layout
Message post with template has to be called with a notif_layout parameter in
order to have a layouting correctly set through the call chain.

closes odoo/odoo#48359

X-original-commit: 077f58027e29a50cd9a9bf455b5ca5c482503686
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-25 15:01:22 +00:00
Benjamin Vray 95f30739a8 [FIX] website: keep images order in gallery snippet with masonry mode
Keep the same images order as the other modes in the gallery snippet
with masonry mode. Before this commit, the images order was reversed
with masonry mode.

task-2162952

closes odoo/odoo#44486

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-25 15:12:29 +00:00
Helly kapatel e4ebd3e6e3 [IMP] hr_holidays: show the initial duration while the accrual is selected
Purpose of the task is, when the accrual is selected, the field for
duration is hidden but the feature allows to use it.

So in this commit,when accrual is selected, display number of days
(duration) to provide an intial allocation while accrual is selected.
Also change label and tooltip according to allocation type.

closes odoo/odoo#48354

Taskid: 2199324
Closes: #47598
X-original-commit: 74df5cbaf37d3cc6da0b15efa9d7f4a4ec265ec5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-25 13:46:11 +00:00
lejeune quentin ad69cc13d3 [FIX] hw_posbox_homepage: Fix default server value in steps by steps wizard
in helpers 'get_odoo_server_url()' return the server string or False.
In steps by steps config wizard we display this value.
So in server input it display 'False' and with this value we can't submit the form

Now we set a empty string if the return is 'False'

closes odoo/odoo#48346

X-original-commit: 57283f213ee3d1dd4f59c83cc34fbdd3545c4533
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-03-25 12:15:07 +00:00
Jorge Pinna Puissant 2242a08f85 [FIX] account: date of currency exchange reversal
- Create and validate an invoice in a date (near the end of the fiscal
    year for example: 20.12.2019) in a foreign currency;
- Pays the invoice in a different date (23.12.2019), the invoice is
    settled and a currency exchange is created;
- In the new fiscal year (for example: 03.01.2020), amends the invoice
    (a description change for instance): cancel the invoice, change the
    invoice into draft, made the amends, re-validate the invoice and
    re-settle the invoice (a new currency exchange reversal is created).

Before this commit, when cancelling the invoice, a currency exchange
reversal is created at the current date (03.01.2020) to revert the first
currency exchange reversal. When the invoice is re-settle, a new
currency exchange is created a date of the payment (23.12.2019).

This means that, in the fiscal year of 2019 two currency exchanges were
created, and in the new fiscal year of 2020 a currency exchange revert
is created. To avoid this erroneous situation, the date of a currency
exchange reversal should be the creation date of the currency exchange.

Now the currency exchange reversal entries has the same date as the
initial currency exchange entry.

opw-2209675

closes odoo/odoo#48344

X-original-commit: cedfbd0379a907650db9b23f6c5203522d4ced95
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-03-25 12:13:46 +00:00
lejeune quentin 2ddb3a23b8 [FIX] hw_posbox_homepage: Fix IoT auto-upgrade
If we start a self flash and we refresh the page
we are able to start again the upgrade.

So now we check if a upgrade is not already started

closes odoo/odoo#48340

X-original-commit: 7189111a73b689af919cdfa4712f04108b7931e6
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-03-25 12:11:29 +00:00
Sébastien Theys d1282408d4 [FIX] test_mail: adapt query count
A commit merged very recently added 1 more base query to both users, but because
the count of that particular test is non deterministic, the issue is only
spotted later on runbot, and it has to be fixed now.

closes odoo/odoo#48331

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-03-25 11:22:02 +00:00
Goffin Simon 36316c5af2 [FIX] account: Printing invoices in multi companies/currencies
Steps to reproduce the bug:

- Lets consider two companies C1 in € and C2 in $
- Let's consider two customer invoices I1 in C1 and I2 in C2
- Select these two invoices in the list view of invoies and print it

Bug:

A traceback was raised because the function _convert expects a singleton

opw:2222140

closes odoo/odoo#48323

X-original-commit: b66bcfe96dfdc62a1faa26ccf9c6adfa2b8929a4
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-25 10:47:12 +00:00
svs-odoo e729af8dd9 [FIX] stock: don't validate WH/OUT/0005
Before this commit the demo delivery WH/OUT/0005 is plan then validated.
But as this delivery is the one used as example in the barcode PDF, it
could be usefull for demonstration to keep it as to process.
So, this commit keeps it only as ready, and also increases the stock
amount of Desk Combination to be able to process this delivery without
any issue.

task-2199747

closes odoo/odoo#48320

X-original-commit: 652ee46e8adc35bae4f89bf9802f12bd1c424c8d
Related: odoo/enterprise#9474
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-25 10:26:38 +00:00
svs-odoo 4cb21e1a95 [IMP] stock: add barcode for small refrigerator
As a barcode for this location was created into the barcode pdf
(enterprise), it seems logical this location has actually a barcode.

task-2199747

X-original-commit: 661bfffca9ad2aa1357ef031ca983104200d5d1f
2020-03-25 10:26:37 +00:00
jvm-odoo eaf62e948a [FIX] web: fix grouping content overlap
Issue

	- Be in multicompany
	- Have a company with a long name
	- Install Accounting
	- Settings > Currencies > Dollars
	- Click on the smart button "Rates"
	- Group by company

	Company name and rate overlap

Cause

	In `_computeDefaultWidths`, we use the method
	`_getColumnWidth` which returns a width depending on the
	field type.

	When you use group by, the fields order doesn't change
	so the company name in the group line have the width
	of the date field (92px) and there is nothing that
	limits the place that the string can takes so there
	is overflow.

Solution

	As it seems to be something very accurate, I think the
	safest solution would be to use the `o-text-overflow`
	saas mixin.

OPW-2218143

closes odoo/odoo#48318

X-original-commit: 2898dd4577e12326cbe83dce9fdbdef0e32d51e6
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-25 10:06:49 +00:00
Luis González 5dda9a709e [FIX] web,mail: Harmful or incomplete aria-label attributes
Some elements contain superfluous `aria-label` attributes, which
overrides any default useful information. For instance, some dropdown
menus contain the `aria-label` "Dropdown menu" (e.g. the company
switcher), which doesn't add any useful information, as dropdown menus
are already labelled correctly using `aria-expanded`.

This change applies on the following buttons:
- Schedule an activity
- View attachments
- View followers
- Switch company
- Open user options from systray
- The widget `state_selection`

closes odoo/odoo#48317

X-original-commit: e3c7f66e89d7be39dfa4cc3d6b038c6f4a114aa5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-25 12:39:02 +00:00
jev-odooandRichard Mathot 52a98f74f3 [FIX] account: More information when missing account
Before this fix, when default debit and credit account where not
set on the journal, there was a simple error message saying
that an account was missing on an invoice line:
"Missing required account on accountable invoice line."

Now, the error message tells on which journal the accounts are missing,
giving better insight to the user.

Update addons/account/i18n/account.pot

Update addons/account/models/account_bank_statement.py

closes odoo/odoo#48312

X-original-commit: bb4b707fbcafa54a2e8b8a6e73fbe102b8b13811
Signed-off-by: jev <jev-odoo@users.noreply.github.com>
Co-authored-by: Richard Mathot <rim@odoo.com>
Co-authored-by: Richard Mathot <rim@odoo.com>
2020-03-25 09:46:02 +00:00
Yannick Tivisse aa618d7661 [FIX] odoo_referral: Fix undeterministic crashing bug
The http request to odoo.com could lead to a timeout.

Avoid it in a testing environment, to avoid tests like
test_20_crawl_demo to crash.

closes odoo/odoo#48307

Taskid: 2222797
X-original-commit: 873699142f3427ecf486cf4319e158768a4e1336
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-25 09:09:40 +00:00
Victor Feyens 859c7e7708 [IMP] account, website_sale: remove 'remove me' code.
Master cleanup of 
https://github.com/odoo/odoo/commit/a540f7864af5fd46cc30ea8c99b2f404cbf58dd7

closes odoo/odoo#44719

Related: odoo/enterprise#8213
Related: odoo/upgrade#790
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-03-12 15:16:46 +00:00
fw-bot 7f944bc664 [FIX] account: Exclude journal entries from account.move.line
In this commit, domain has been put in the action_account_moves_all in order
to exclude the totally cancelled journal entries

task:2028813

closes odoo/odoo#48161

X-original-commit: d50eae4c76ad280fe4480fea06d612fbfe349614
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-03-23 08:08:11 +00:00
David Beguin 83ffe8b50b [FIX] base: make parent contact lang prevail on DB lang
Purpose
=======

If a user specifies a language on a company (res.partner), chances are children
of said company will speak the same language. It is at least most likely than
having them speak the default DB language.

Specifications
==============

If a language is set on the parent, the child contact created from the o2m
should have by default the same language.

Before this commit, we set lang in the context of the o2m field but it not
taken into account and is overriden by the default DB lang.

After this commit, the default lang value is forced in the default get to
be the same than the parent, if any. Else, we fallback to the default DB lang.

Link
====

Task ID: 2210350
PR #48077

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-23 09:57:09 +00:00
svs-odoo fba4517567 [FIX] stock_picking_batch: kanban view for picking
Display the kanban view for the `picking_ids` field in the picking batch
form when user is on mobile mode.

closes odoo/odoo#48313

X-original-commit: 2c022a285fde3ccc34398c94e331ae3473d79559
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-25 09:46:28 +00:00
svs-odoo b9d5129a4e [FIX] stock: picking operation kanban mobile
Display the operations (`stock.move`) in the picking form view as
kanban view when the user is in mobile mode.

X-original-commit: c3488d625a5e939de6a5b2d41b5029640e0790f5
2020-03-25 09:46:26 +00:00
Nicolas Lempereur 033980a5f8 [FIX] test_xlsx_export: no warning when install w/o test_impex
This module define same `export.integer` model that is in `test_impex`
module, but do not define model access.

So if you only install `test_xlsx_export` the test will work but you
will get a warning over "The model export.integer has no access rules,
consider adding one".

opw-2204111
closes #48293

closes odoo/odoo#48308

X-original-commit: 92761b7877d63e2432cb246f5078c22b1b0f24ea
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-25 09:21:56 +00:00
william b99322e64e [FIX] account: double column allow reconciliation in CoA
65a10c0e34 duplicated the column

closes odoo/odoo#48297

X-original-commit: 9dbbb7f752b4ed1f8cec2895fb4046e51b545c95
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-03-25 08:21:48 +00:00
William Henrotin 389049102a [FIX] mrp, purchase_requisition: hide empty variant description
Commit abef168389 adds the fields
'product_description_variant' on mrp.production and purchase.requisition
models. This text is taken from the product variant.

This commit make them invisible in case they are empty.

closes odoo/odoo#47716

Related: odoo/upgrade#948
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-24 11:08:12 +00:00
William Henrotin 1093baa29a [REM] mrp: remove unused field
Task : 1966889
2020-03-24 11:08:12 +00:00
Laurent Stukkens (LTU) 163512da49 [IMP] sale: Pass SO notes to invoices
Sales Order notes were not passed in when generating the invoices.

     * [IMP] When generating an Invoice from several SO's the lines sequences
       were copied from the SO's. Because of that the resulting Invoice
       could have lines mixed-up between the different SO's which could
       be confusing, especially as notes are now passed in too.

     * [IMP] Down payments where not sent into a separated section on invoices.
       This could confuse the user, especially when the down payment was
       included in a section created that was created in a previous SO
       line.

    Closes odoo#47279
    Task ID #2206228

closes odoo/odoo#47279

Related: odoo/enterprise#9465
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-25 07:23:27 +00:00
Yannick Tivisse e4c66d7d28 [IMP] hr_contract: remove unused field
+ Add helper method to retrieve the contract wage.

Those methods are supposed to be overriden in some cases.

closes odoo/odoo#48258

Taskid: 2222984
Related: odoo/enterprise#9454
Related: odoo/upgrade#980
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-24 12:47:12 +00:00
Swapnesh Shah 873e2e55af [FIX] account: Compute root with single character code
Fixes #47147
Followup on 39e2dfca0a4a2cf641a50ee9af510180fff6eb9c and 737eaf9333

Before this commit, Accounts with single character code was setting non-existing `root_id` which crashes on Grouping by using that field. (and also Accounts were not visible search panel)

With this commit we support computing `root_id` with Single Character.

closes odoo/odoo#48261

X-original-commit: d93ccdc5a25c061468870359ad8f749496140d19
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-03-24 13:02:17 +00:00
Martin Trigaux b51129bd30 [FIX] base: proper unlink of abtract model
Context:
Since 7593b887df an entry of ir.model.fields.selection is created
for each entry in a selection field. This allow a more modular
approach of tagging entries with an external id and translating
selections in the module that defined the selection (and not the one
that defined the field)

Problem:
When removing a selection, every record that used this selection is
updated with a 'set null'.
This was also intented on abstract models that do not have a table.

To reproduce:

1. create two models:

class ModelA(models.Abstract):
  _name = 'abstract.a'
  select = fields.Selection([
    ('foo', 'Foo'),
    ('bar', 'Bar'),
  ])

class ModelB(models.Model):
   _name = 'model.b'
   _inherit = 'abstract.a'

2. update code and removes the key 'foo'
3. update the module
   -> error
   psycopg2.errors.UndefinedTable: relation "abstract_a" does not exist
   LINE 1: UPDATE "abstract_a" SET "select"=NULL WHERE "re...

When updating the values in db, only update on real models

closes odoo/odoo#48288

X-original-commit: 6b20a8241300ebfc185500eb64e210db755574a8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-03-24 20:53:36 +00:00
Benjamin Vray 7da747c627 [IMP] website: add position top in cookie bar and fix a bug
Add position top in popup snippet and cookie bar.
Properly center content when full size and position center because
before this commit the content was at the top and not centered.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309

closes odoo/odoo#46503

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-24 16:07:26 +00:00
Benjamin Vray 079dac124a [IMP] website: move options in table of content snippet
Move position options in navbar.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:22 +00:00
Benjamin Vray 9ebc9a1a44 [IMP] website: review snippet Share
Reduces margin on icons when layout is none. Add icon size options.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:19 +00:00
Benjamin Vray efe8ea2676 [IMP] website: review progress bar snippet
Add an input field to define the value of the progress bar instead of
the previous system by mousedown. Disable animated by default.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:14 +00:00
Benjamin Vray c87f61d26b [IMP] web_editor, website: copy absolute path for anchor links
Copy the absolute path in the clipboard instead of the relative for
anchor links. So the link still works if it is pasted on another page.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:10 +00:00
Benjamin Vray a522e08273 [IMP] website: review timeline snippet
Removes option to move card to the right/left from the left panel
and add this option on the element overlay.
Makes the snippet responsive and other improvements.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:06 +00:00