Commit Graph
134085 Commits
Author SHA1 Message Date
Damien Bouvy c4b0bcbbd5 [FIX] sale: Unpredictable sales team
Steps to reproduce the bug:
- Install website_crm_score
- Add Mitchell Admin in 2 sales teams
- Create a quote
- Play with the ordering of sales teams sequences

Bug:

The default sales team will be different at quote creation, partner
selection, etc. and will basically be unpredictable (while you would
expect it to take the first team the salesperson is a member of in
the order of the sequence)

The problem is an inconsistent use of the _get_default_team_id method
and the sales team of a user. Since the website score module add the
possibility to have a user member of more than one team, using the
team of the user is bad. You should use the method all the time
for consistent results.

opw:2196934

closes odoo/odoo#45718

X-original-commit: 6d7bbd3074e6b3771b582bf544624cef59e1c6a3
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-19 13:14:20 +00:00
Romeo Fragomeli 7e47742225 [FIX] mail: fix scroll in discuss on small screens
When using the Discuss app (not the systray's thread window) on a small
device, it is not possible to scroll through the discussion (cf. tab
"Chat" or "Channels").

Steps to reproduce:
* Go in discuss (in mobile)
* Go to tab chat or channel => BUG
NB: you must have enough element to test the scroll

This bug is due to the commit odoo/odoo@3ad7706560.

Before it, the styles as interpreted by the browser looked like this:

    .o_mail_discuss_tab_pane {
        overflow-x:scroll; // explicitly set in discuss.scss
        overflow-y:auto;   // implicit ; due to the overflow-x rule
    }

But by removing the overflow-x rule, the styles ware interpreted as:

    .o_mail_discuss_tab_pane {
        overflow-x:visible;   // implicit ; due to the absence of overflow-* rule
        overflow-y:visible;   // implicit ; due to the absence of overflow-* rule
    }

In addition, the parent element had an overflow: auto rule scoped only
for desktop-like screens.

This commit fixes this issue by unscoping the overflow: auto rule on the
parent, allowing to scroll the messages' list in both desktop-like and
mobile-like screens.

Reference:
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x

closes odoo/odoo#45964

X-original-commit: f4b22af7ed28d3515d77bfd76691aba1129581b1
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-21 15:20:18 +00:00
alt-odoo 8f70f203d0 [FIX] base: merge user contacts without company
If some contacts are linked to a user, we keep the company consistent
but we should do it only if a company is set on the destination partner.

opw-2199352

closes odoo/odoo#46000

X-original-commit: 3f9cb47cb6fdc240a58f3daa3bd4cf32f55cb084
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-21 21:06:03 +00:00
Adrien Dieudonne c70e7ebeca [FIX] account: invoice outstanding wrong displayed on mobile
Steps to reproduce:
- Go to Invoicing
- Select an invoice
- Add credit note
- Click on "Post"
- Invoice footer is overlapped on mobile

This bug occured because of "float: right".
Get rid of this is too much work (oe_subtotal_footer is already floating),
so we decided to keep it with a "clear: both".
In desktop, this element is on the right of the screen but
on mobile we take the whole horizontal space.

closes odoo/odoo#46007

Task-id: 2184243
X-original-commit: 986152405a0ba6038df7d93c9264a46ee4207dd8
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-22 15:48:18 +00:00
Christophe Monniez 832bac0628 [REM] website: remove useless browser_js test
This test goes to the public homepage and directly logs a 'test
succesful'. It's useless as many other tests use the public homepage and
therefore, those tests will crash if the homepage is unavailable.

Moreover, it happens to trigger random failures due to the fact that
some RPC may occur between the cookies cleaning and the termination of
the browser.

Typically a "GET /web/webclient/locale/en_US" can be triggered right
after the clearing of the browser cookies, cache ...

closes odoo/odoo#46004

X-original-commit: 3aded126e78b18f8bb753f1b57b827667ca99d18
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-22 08:22:10 +00:00
Romain DerieandJeremy Kersten 4eafd78847 [FIX] web_editor, website: handle date edition in all lang and format
Before d00c0e317, `Datetime` fields would be editable in frontend but would
have unexpected results, especially in non-English languages, for when the
english lang format had been changed.
It would also crash when saving non-English strings, such as `Lundi`.
For more details, see https://github.com/odoo/odoo/pull/44484#issuecomment-586850490

Since d00c0e317, only date displayed in lang format would be editable, which
case is Event page in Odoo 12.0. Everywhere else, the format is changed for a
nicer layout, either with `widget=XXX` or `t-options=YYY`, such as:
`<time t-field="record.date" t-options='{"format": "MMM d, yyyy"}'/>`
`<time t-field="record.date" t-options="{'time_only': 'true', 'format': 'short'}"/>`

When a date parsing crashes during editor save, the problem is not only that
the date can be saved, but the whole changes of the page are lost, as they
won't be saved either.

This commit attempts to fix every languages cases, regardless of the website
lang or user lang.
To do so, we store the date in the user lang format in a data attribute of
every date field in the DOM. Once the field is clicked (to edit probably),
that value will replace the one displayed according to the widget/options.
That way, dates will always be sent to the server in the user lang format,
avoiding any possible mismatch.

This whole fix apply to `Datetime` and `Date` fields.

opw-2183055
Closes #44484
Closes #45555
Fixes #44047

closes odoo/odoo#45725

closes odoo/odoo#45997

X-original-commit: c0db9bb8027ff926c619aebe6e0a5cdd05808232
Original-signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
2020-02-21 18:57:59 +00:00
Antoine Prieels 4a6d3ae934 [IMP] doc: Add reference for IoT
Add documentation for development of new Drivers for the IoT Box.

closes odoo/odoo#45990

Taskid: 2092878
X-original-commit: 246060c0757b52725ebd93164c8151fa8db2c6b9
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-02-21 18:07:11 +00:00
Romeo Fragomeli 2498b5ba23 [FIX] barcode: input text is visible
Before this commit, in mobile, the input to handle the input event of scanner
was visible but with a negative z-index to be in the back of Odoo
viewport.

After this commit, in mobile, the input is transparent (opacity 0) and
so is not visible anymore but it's still present.

Steps to reproduce:
* Go to app switcher (in mobile)
* Scan a barcode with a hardware scanner BUG

closes odoo/odoo#45975

X-original-commit: b2b1e68e541966ad832e03fbc230418d14c85616
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-21 16:45:24 +00:00
Romain Estievenart e0231481d6 [FIX] base,hr,web: kanban image sizing/look & feel
The image illustrating some kanban cards (like "Employees" or
"Contacts") has a weird scaling and rendering on smaller screen sizes.

Step to reproduce (on small screen):
1. Open Employee
2. Apply a filter
3. Picture is ugly (shape changes to get something pretty weird)

This commit fixes it by:
1. removing the rounding which was only applied (sic) on smaller screens
2. adjusting the size and/or the margins of the image to keep its ratio
   and the alignment with the other kanban cards.

Task ID: 2198419

closes odoo/odoo#45956

X-original-commit: dd5db84464998b45d0524055f9c96bcad894c4c9
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-21 14:28:04 +00:00
Jeremy Kersten e6997dae2b [FIX] website_blog: avoid loop of redirect if no trailing / in tag
Before this commit in case you start on blog with url like /blog/blog-1/tag/2,
you should be redirected to /blog/blog-1/tag/website-2 to avoid duplicate
content.

But because the replace was done with /tag/%s/ it will be not replaced and so
you are redirected to the same url, creating a loop.

closes odoo/odoo#45927

X-original-commit: 666306326cecc6ac8587b45d2dbf24c0463b33a5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-21 12:30:15 +00:00
Jeremy Kersten 01028b1cf3 [FIX] website_blog: avoid traceback if tag has been deleted
Before this commit, if you have a link with a tag that doesn't exists anymore,
you will have a traceback because you try to access to a unexisting record.

odoo.exceptions.MissingError:
('Record does not exist or has been deleted.\n\n(Records: [3], User: 2)', None)

Now, we filter on existing tag before to access a field.

X-original-commit: 54b45e5c287138a87a0b04ce4f301ea6893b9223
2020-02-21 12:30:15 +00:00
Jeremy Kersten d020dd89b5 [FIX] website_blog: simplify call to s_latest_posts
Common part of the domain is automatically appended by controller now.

X-original-commit: 38058cc6642b36195329e03ca187bd7d4366914d
2020-02-21 12:30:14 +00:00
jerome hanke (jhk) 8b63f15e27 [FIX] calendar: recurring events can have 0 repetitions
Steps to reproduce:
- install calendar
- create a recurring event with 0 repetitions
- save

Previous behavior:
raises an UserError, this would interrupt the sync with google calendar
Google calendar sometimes sets recurring events to 0 repetitions
once they are done recurring

Current behavior:
the event is handled like a punctual event but remains recurrent

initial commit: https://github.com/odoo/odoo/commit/ba727e15d2dc9a1325cd20527e2ccfe6f8bc63f0
opw-2185699

closes odoo/odoo#45947

X-original-commit: 5b63ddb4e03f34f015e7668c69108fb4a2badd08
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-21 13:49:06 +00:00
Christophe Monniez 952c668b82 [FIX] account, l10n_latam_invoice_document: fix move_type typo
Two typos were introduced with d675dbaa4c.

closes odoo/odoo#45926

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-21 12:18:32 +00:00
Denis Ledoux c59aefb783 [FIX] doc: backend, internationalization, renamed menus
closes odoo/odoo#45946

X-original-commit: 08df477c819aab1c91b04fada285ae1aae340800
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-02-21 13:42:11 +00:00
lejeune quentin 4756e6694a [FIX] point_of_sale: remove hw_blabox_be from odoo in init.d
Since PR 45225 hw_blackbox_be is no longer a module in the IOT but a driver.
It should therefore no longer be executed

closes odoo/odoo#45924

X-original-commit: acf11a68d17f300de3cc03cc53aa1cbac2f1977a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-21 12:01:22 +00:00
yhu-odoo 839e14ee09 [FIX] stock: don't assign immediate transfer in comfirm
Missing part of #44947 of task 2160847

closes odoo/odoo#45922

X-original-commit: 367d236a974b1b726a770e58a03344a3d83fa49f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-21 11:53:21 +00:00
574d7f0d4c [IMP] core: import-compatible export of m2m fields
When performing an import-compatible export, m2m values would be
exported as a record per cell unless the `id` subfield was the first
to be exported. Which is not the case when using the export UI (as it
always adds the field itself before any subfield). This would make the
m2m not actually export-compatible in most cases.

* export m2m "display name" in an import compatible format as well
* re-prioritise exporting xids when there are multiple m2m exports in
  import-compatible mode
* never fall back on the o2m / non-import-compatible m2m path for m2ms
  in import-compatible mode

Note: if multiple m2m fields are specified only one of them gets filled.

Task 2065428

closes odoo/odoo#37407

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: Ravi Singh <ras@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-02-21 12:12:19 +00:00
Michael Mattiello (mcm) 3ecea2c934 [FIX] web_tour: listen on date range picker event
When applying the selected date range using the widget the
tip wasn't consumed. This commit fixes it by listening on the
event triggered when clicking on button apply.

closes odoo/odoo#45916

X-original-commit: 150d69f70a505efa298c66119eced29d8caa3699
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-21 11:21:03 +00:00
Victor Feyens cfabde8386 [IMP] stock: batch creation of company default locations
closes odoo/odoo#45907

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-21 10:25:00 +00:00
Krupal Oza 3a02f08960 [IMP] crm, event(_sale), gamification: avoid long labels in embedded tree views
PURPOSE

In various views, the min width of some columns is too short for the label of
the field. This task aims at fixing this by increasing some minimal widths
and relabeling some fields.

SPECIFICATIONS

crm
  * in view_crm_lead2opportunity_partner_mass, view_crm_lead2opportunity_partner
    add date widget on create_date and remove the phone field in the inline
    treeview of opportunity_ids;

event
  * in view_event_form set width of boolean field 'done' to 70px and in
    view_event_mail_tree set string of field 'mail_sent' to 'Sent'
  * in view_event_form_inherit_ticket set string of fields seats_max to
    'Maximum', seats_reserved to 'Reserved', seats_unconfirmed to 'Unconfirmed'
    and set width '100px' in the inline treeview of event_ticket_ids;

gamification
  * in challenge_line_list_view and challenge_form_view set string of field
    'target_goal' to 'Target' in the tree view and inline treeview of line_ids

LINKS

Task ID 2166865
PR #43401

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-21 09:45:56 +00:00
Loan (lse)andNicolas Lempereur 7ceba92511 [FIX] website_blog: handle None window selection
In the code for commenting or posting to twitter a selected range of
text, we did not take into account the case of no selection (eg. we
click on an element, but another code prevent default browser action).

opw-2197227

closes odoo/odoo#45883

X-original-commit: c578279dba4a3fd95e261d8dc58f2704c3b50eb0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2020-02-20 20:12:17 +00:00
Toufik Ben Jaa 5ab518ce67 [FIX] mail: referenced before assignment error
- In some cases when trying to open a discuss conversation a
    traceback can occur because of the usage of a local variable
    before its assignation.

closes odoo/odoo#45867

X-original-commit: 47bec812a36c1e41bdb525439dfd18a208e1dd79
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-02-20 17:26:35 +00:00
Thibault Francois 8c1c7f2687 [FIX] mail: Don't create duplicate mail.notification
When more than one user are linked to the same res.partner and this user is assigned to a task or a sale.order
as many email notifications will be created as there are users linked to the same res.partner.
This won't send more than 1 email, but multiple mail.notification
records will be created.
This causes duplicate entries in the mail.notification table, and can
crash when an old unique constraint is still present in that table (from
earlier Odoo versions)

To prevent this, we deduplicate the notifications and order by notification
type to get 'email' first in case the user have different notification
type ('email', 'inbox').

How to reproduce:
   - Create a first user test1
   - Create a second user test2
   - Merge the contact test1 and test2
   - Create a customer customer
   - Set the user test1 as salesman
   - Create a new sale.order with customer as partner

Add a test to reproduce the pathological scenario

Solution
  add distinct on partner.id and order by partner.id,
users.notification_type

closes odoo/odoo#45386

X-original-commit: 00f36c60e4790c8f5341cbc4f2c67e22e6d68f87
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-02-14 10:40:57 +00:00
Harpritsinh SisodiyaandMohammed Shekha 7639f7fbcb [IMP] web_editor: check resource is custom or not to display warning on editor
adds _isCustomResource method which will check whether resource is custom or
not, this method checks for JS and SCSS resource, if resource is custom then
do not show "No Update" warning inside ace editor.

task-2167570

closes odoo/odoo#44536

Related: odoo/enterprise#8368
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-02-21 08:34:24 +00:00
jerome hanke (jhk) 0c4d808fd7 [FIX] delivery: handle multiple references in delivery email
Steps to reproduce:
- install sales and easypost shipping
- have a delivery order of multiple packages with easypost
- click "send confirmation email"

previous behavior:
the template does not handle multiple package references
and the associated link is wrong

current behavior:
each reference is set in a separated link

opw-2167037

closes odoo/odoo#45507

X-original-commit: 65eaa3e7daf0b547ae2bb98e335fc5941cb200a6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-17 13:39:48 +00:00
Nicolas Martinelli bef4a3bad6 [FIX] stock_landed_costs: multi-currency
- Activate 2 currencies
- Create a landed cost product
- Create a Vendor Bill in a currency different from the company currency
- Add the landed cost product
- Click on 'Create Landed Costs'

The landed cost is created in the company currency, but with the amounts
in the vendor bill currency.

This happens because the currency conversion is missing.

opw-2200500

closes odoo/odoo#45861

X-original-commit: 41f52aef54ddf9ab4cd0f23c1224c2d7581a1ede
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 16:57:31 +00:00
xmo-odoo 44aa17cc46 [REV] re-enable the multiple calls of initialize_sys_path
Some of the implicit side-effects got missed, namely that under some conditions
(e.g. using an odoo subcommand) `initialize_sys_path` can be called before the
config has been loaded at all, resulting in the first call not properly setting
up things, and one of the subsequent calls fixing things up.

Since this breaks workflows right now, quickly fix it, we'll re-investigate
how to fixup the entire thing in order to restrict & enforce a single call.

closes odoo/odoo#45844

X-original-commit: 6cb4c829e1559bcf836e4b573051760565b7d0c1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-20 15:45:42 +00:00
Nicolas Martinelli 9b95bb7904 [FIX] stock: immediate transfer in multi-step
- Activate multi-step routes
- Set Incoming Shipments: Receive goods in input, then quality and then
  stock (3 steps)
- Create an Immediate Transfer from 'WH/Input' to 'WH/Quality Control'
- Add 2 products, set a quantity
- Validate

Two immediate transfers are created, one for each product, while a
single planned transfer is expected.

This is because the `default_immediate_transfer`i key is polluting the
context.

opw-2180556
opw-2197720

closes odoo/odoo#45843

X-original-commit: 74ad073fd66ca4ff345aaf37a7245a8b93808cb3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 15:44:28 +00:00
Romain Derie 3d3e8f3187 [FIX] website_event_track: add space between icon and date
Line return will add a space between icon & text, as it is done for the one
just above and the one below.

closes odoo/odoo#45875

X-original-commit: c26db3344b1e62158c4a3aa0c457802ea2376c63
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-20 18:42:04 +00:00
Christophe Monniez 253d5341a4 [FIX] tests: remove memory limit for chrome headless
Since Chrome version 80, the V8 javascript engine is using an new
pointer compression feature [1]. This features tries to reserve more the
4GiB of memory. As a consequence, during HttpCase tests, odoo tries to
launch chrome headless in a subprocess but fails because of the
memory-limit-soft.

With this commit, the Chrome browser is spawned in a forked process
that removes the memory limit.

Also a new Chrome CLI switch is used to prevent crash reports to be sent
to google.

[1] https://v8.dev/blog/v8-release-80

closes odoo/odoo#45859

X-original-commit: 726d9c50720c2d3c9e617e998ed0dcd12272a271
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-20 16:53:33 +00:00
Christophe Monniez 426fc163ba [FIX] tests: avoid confusing traceback at browser start
During an HttpCase, when the Chrome browser starts, it may happens that
the websocket is unreachable. In such a case, the stop method is called
and tries to stop the browser gracefully by sending a `Browser.close`
through the websocket ... which is not reachable.

The result is a confusing traceback. With this commit, nothing is sent
is the websocket is not available.

Moreover, the `sigxcpu_handler` attribute is used in the stop method but
not yet declared. Fixed by moving it before calling the _chrome_start
method.

X-original-commit: 0d156fd3bc114b40680ca5aa0456e0f21a5b8cff
2020-02-20 16:53:33 +00:00
alt-odoo 54e1a69b09 [FIX] point_of_sale: allow deletion of contact to any user
Before this fix, if the user has no PoS access rights, he cannot delete a contact
due to a check done on open PoS sessions.

closes odoo/odoo#45868

X-original-commit: f7b83cfc41045e1cc81d2e1c5540ac105f333a61
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-02-20 17:40:10 +00:00
Romeo Fragomeli 49c46b0bb4 [FIX] mail: activity popup is outside the screen
Before this commit, the popup activity in kanban was rendered using
the position of the button. So the left popup was nearly in the center
of the screen but the width is too large to be contained on the screen.

After this commit, in mobile, the popup activity in kanban will be
placed on the left of the button to avoid to go outside of the viewport.

Steps to reproduce:
* Go to sale app (in mobile)
* Click on the activity button of a kanban card (clock icon) BUG

Task ID: 2198429

closes odoo/odoo#45860

X-original-commit: 392c8a57df798d92b8be73d743b690891cf2fda2
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-20 16:56:13 +00:00
Aurélien Warnon aaa7cfa535 [FIX] survey: only show attendees ranking when relevant
The computed field 'session_show_ranking' was only computed based on the fact
that the survey had a scoring mechanism.

It's not very accurate since we also need a question that saves as the attendee
nickname to be able to display a relevant ranking chart.

This commit fixes the compute method by adding the necessary condition.

Task ID 2188482

closes odoo/odoo#45852

X-original-commit: 86ca11517d3872b2bf3cf89eda513a3bc8c84292
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-02-20 16:20:49 +00:00
Arnaud Baes caa09423e0 [FIX] sale: Fields in debug mode only.
`require_signature`and `require_payment` were visible in
debug-mode only for seemingly no reasons, making our
sales team having difficulties with our customers payments.

Issue introduced by TaskID #2033229.

closes odoo/odoo#45842

X-original-commit: dffba03715aba7da3c372f61645720a6e122ad74
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-20 15:35:10 +00:00
Ravi Singh f47b142a7a [FIX] website: debounce link dialog inputs to avoid useless page loading
When we edit a link on the website, the target page is loaded to find
the anchors. This occured at every typed character which was obviously
not efficient.

task-2187754

closes odoo/odoo#45831

X-original-commit: 06ae0b7b00c837733a9c67772007aee6712b246e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-20 14:51:13 +00:00
Kevin Baptiste 078b9acce7 [IMP] hr_recruitment: track fields on hr.applicant
Track following fields:

    - job_id
    - department_id
    - company_id
    - salary_proposed
    - salary_expected
    - availability

closes odoo/odoo#45294

Taskid: 2195796
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-20 16:57:39 +00:00
Nisha patel 09461be2a2 [IMP] hr_holidays: Change the string of company field due to misleading
Purpose
=======
In multi-company, the group by "company" refers to  the field
"mode_company_id" and not to the company of the employee so due to
that there is a confusion.

So for the field model_company_id:
  - on the views, name the field "Company"(Functionally it doesn't change)
  - on the model, name it "Company Mode".

closes odoo/odoo#45181

Taskid: 2168320
Closes: odoo#45181
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-13 09:43:16 +00:00
Prakash Prajapati 8bda216460 [ADD] web: Add qunit test for company creation/updation
Currently when the company is created or updated the whole
web-client is reloaded

so write a qunit test case when a company is created or when
the data is written to the company for the web-client reload.

closes odoo/odoo#44714

Taskid: 2188789
Closes: #44714
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-14 10:28:11 +00:00
jbm-odoo dd37b849d8 [IMP] hr_holidays: Add expiration date in dashboard
closes odoo/odoo#44669

Taskid: 2166745
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-07 08:39:15 +00:00
Lucas Lefèvre 2d470a423f [IMP] fleet: Close driver history on driver change
Purpose
=======
If you set a future driver and click on "apply change", a new assignation log is
automatically created for the new driver.
But the end date of the former assignation isn't populate.

Specifications
==============
Set the date "end date" for the former driver with the "start date" of the
new driver.

closes odoo/odoo#44635

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-05 10:01:24 +00:00
Ujas Dubal ff23944ad7 [IMP] fleet: Make the image readonly on the vehicle and model
Currently when user change the image on a vehicle, it change it
for the car manufacturer and the goal of this image is to recognize
the manufacturer of the vehicle.

After this commit is applied, the model and vehicle image will be
fixed as per the selected brand image. user will not be able to
change from the vehicle and model.

closes odoo/odoo#44153

Taskid: 2168922
Closes: #44153
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-19 10:54:30 +00:00
Adrien Horgnies e28809a1d6 [FIX] l10n_jp: remove country_id from tax_report_line
closes odoo/odoo#45836

X-original-commit: 71969f6dfff1412efee5a34820735492c5f9c850
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-20 15:11:01 +00:00
mreficent 3dffce34bf [IMP] fields: log warning for ignored selection
When a field is related, defining a selection or selection_add will
have no effect and the paramater is ignored.

Log a warning and fix all fields badly definied

Closes odoo/odoo#45716

closes odoo/odoo#45832

Related: odoo/enterprise#8613
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-20 14:58:33 +00:00
Adrien Dieudonne 62c9227fda [FIX] web: document layout configuration: style not scoped
Commit 9a482fc introduced change for the document layout preview:
all "td" tag included in clearfix were in display: flex;
Because of this some styles were broken in form views on mobile.

We could have only put this rule in the right scope but
we preferred to fix this correctly.

Steps to reproduce:
- Go to Settings
- General Settings
- Click on Configure Document Layout

Related to task-ID: 2184243

closes odoo/odoo#45830

X-original-commit: 0206ee8f8a3652ae0eeb5aa78a94b92bd6e84921
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-20 14:47:04 +00:00
Laurent Smet ffbb32209a [FIX] point_of_sale: Fix js compute_all taxes
The compute_all JS-side hasn't be updated since recent changes in the tax computation introduced by:
https://github.com/odoo/odoo/commit/9b7d14c6b3caba5cde0b98bfaf8aaf887fc94abd

closes odoo/odoo#45801

X-original-commit: d9601cceab365276e43634260be29e2f23749020
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-20 11:11:38 +00:00
Victor Feyens d3bbe14c8d [IMP] product: improve creation performance.
The default product category and uom should be fixed on generic 
undeletable records (in data files).

And by caching those default values, we can gain up to 20% time when 
creating products without providing uom and categories.

Also remove the unnecessary defaults on the compute fields, which do the 
same as the compute (and have no use because it is a non stored field).

closes odoo/odoo#45791

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-20 14:51:13 +00:00
Victor Feyens 5ccdc1540d [IMP] base: no use of default AND compute for non stored fields. 2020-02-20 14:51:13 +00:00
Victor Feyens 2d688510d1 [IMP] product: do not allow the deletion of the main product category 2020-02-20 14:51:13 +00:00