Commit Graph
136088 Commits
Author SHA1 Message Date
std-odoo 4e1399dc0d [IMP] web: customize the save/close button of a FormViewDialog
Purpose
=======
In Social, we want to be able to change the "Save" button into a "Add"
button when we add a new stream. For that purpose, we need to be able to
customize the text of the `FormViewDialog` buttons.

Task-2234580
See odoo/enterprise/pull/9933

closes odoo/odoo#49622

Related: odoo/enterprise#9933
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-27 08:56:35 +00:00
Goffin Simon 0d569c8117 [FIX] auth_signup: 403 when sending message on task with portal
Steps to reproduce the bug:

- Let's consider a product P (invocing policy based on timesheet and creating new task)
- Create a quotation with the product P
- Confirm it (A new task T is created)
- Go to T and add a follower (who is a portal user PU) in the task
  but uncheck the box to send him an email
- Connect to the portal with PU
- Go to T and send a message

Bug:

A 403 error was raised

opw:2239844

closes odoo/odoo#51953

X-original-commit: c7e864e039dd2c948a5c61df29052313c6a659ce
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-05-27 08:44:58 +00:00
yhu-odoo 181c7d82e3 [IMP] purchase: send reminder mail to vendor
1. automatically send a reminder mail to vendor to confirm the receipt
date. If confirmed, (confirmed by vendor) will be added next to the
receipt date. If not, vendor can update the date on the portal website.
An warning activity will be set for the purchase representative for this
update.

2. Vendor can also comfirm recieption of the PO when we 'send PO by mail'.
If confirm, (confirmed by vendor) will be added next to the confirmation
date. An filter is added in the PO search view to show all unconfirmed
PO.

Task 2230811
PR #49921

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-27 08:20:17 +00:00
yhu-odoo d83334ef8e [IMP] purchase_stock: add vendor on-time delivery rate
Add on-time delivery rate to vendor. When editing a PO, user can see
the overall on-time delivery rate during the last 365 days next to the
vendor. When click it, user will be redirect to a graph view showing
the detail of the on-time delivery rate of this vendor. Also add a stat
button to show the on-time delivery rate on partner form.

Task: 2230811
PR: #49921
2020-05-27 07:41:43 +00:00
yhu-odoo eb6ddb6e9f [FIX] purchase_stock: old PO not update qty_received after install purchase_stock
Before this commit, after install purchase_stock, old pol records won't
update their qty_received when receive products. This is because their
qty_received_method are not updated during the installation.

Task 2230811
PR #49921
2020-05-27 07:41:43 +00:00
Aurélien (avd) 647247e3ff [IMP] hr_recruitment: Improve global UX (back2basics)
Multiple small changes/fixes to the hr_recruitment module to provide
a better base for later improvements.

The linkedin recruitment source is only added by default to new records,
existing records remain unchanged.

For the google map in the email template, since it requires an API_Key and
only a minority of companies will get this key, it was decided that
it is better to remove it from the template.

Now that linkedin is added to job positions by default, deleting a
job position currently does not delete the related linkedin source.
So after removing 10 job positions, there are still 10 linked in
source in the database. This commit fixes that.

Add three additionnal utm_sources.

Add linkedin as a source job to demo job position to be consistent with no-demo
data db.

closes odoo/odoo#50076

Taskid: 2196767
Related: odoo/enterprise#10778
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-27 07:18:08 +00:00
Aymane (ayt)andThibault Delavallée e02137c485 [REF] sms: move composer from onchange / default_get to editable computed fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

LINKS

Task ID 2229050
PR #51159

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Aymane Taibi <ayt@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-05-27 07:22:28 +00:00
jvm-odoo 28655ac9c3 [FIX] hr_attendance: fix last month worked hours
Issue

	- Attendances > Manager > Attendances
	- Create a line for any employee
		check-in 30/04/2020 12PM
		check out 01/05/2020 12PM
	- Go to Employees > the employee

	Last month worked hours = 0
	but it should be 12

Cause

	We only take into account records
	checked_out the previous month

Solution

	Rethink the whole method to
	take into account records
	checked_in last month and
	checked_out this month

	And adding timezone handling

OPW-2259533

closes odoo/odoo#51919

X-original-commit: 7918cccf0c6e28c25e909b1355eb7fda5373edb2
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-05-26 15:21:35 +00:00
std-odoo 635519ae29 [FIX] mail: fix tracked field with groups
Bug
===
Since 0bd14547a7,
When editing a record which has a tracked field with a group, and if
the current user is not in the group, an error is raised.

Technical
=========
When we get the tracked fields, we must care about the group of the
current user and keep only the tracked fields the user have access to.

To do that, we use `fields_get`, which will return only fields accessible
by the current user group.

The method `_get_tracked_fields` is cached, but it need to depend on
the current user (and also if we are in sudo mode or not), because the
function will return different results, depending on the group of the
user.

Task-2250070

closes odoo/odoo#51915

X-original-commit: c7010058a93ca2fd3b65ac978d8333b273f04fac
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-27 05:53:13 +00:00
Jorge Pinna Puissant c25f435994 [FIX] purchase_stock: vendor choice in multi-company
- Set two companies (A and B);
- Set intercompany flows enabled between company A and B with
  synchronization of PO/SO;
- create a product X is configured as follows in company B:
  -  Storable product;
  - Routes “Buy” and “Dropship”;
  - Vendors price list set with vendor = company A.
- Product X is configured as follows in company A:
  - Storable product;
  - Reordering rule Min 0 / Max 0;
  - Route “Buy”;
  - Vendors price list set with vendor = 'External Vendor'.
- Create and validate a sale order for product X to final customer
  within company B; Odoo will automatically create a purchase order for
  product X to company A within company B;
- Validate the purchase order in company B; Odoo will automatically
  create a sale order for product X to company B within company A;
- If there is no available stock in warehouse A; Odoo will automatically
  create a purchase order for product X within company A.

Before this commit, the purchase order is created with vendor as
'Company A'. As '_select_seller' is run in sudo mode (see:
https://github.com/odoo/odoo/blob/a16c4a0dabe58ab2cfade353c113387ae5bcd572/addons/stock/models/stock_rule.py#L458),
so is not company-aware, therefore the first matching supplier is
chosen.

Now, the purchase order will be created with vendor as 'External Vendor'.

opw-2255989

closes odoo/odoo#51596

closes odoo/odoo#51908

X-original-commit: e2dd8ea7544fba659810ba829433fce7099c1d40
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-05-27 06:22:15 +00:00
Xavier Morel 148f3dabc9 [IMP] base: make ir.model.data use access fields
Apparently some "core objects" used to have a pair of
fields (date_init, date_update) which predate the current access
fields (hopefully anyway, the genesis of both is lost to time so we
can only speculate).

odoo/odoo#34988 removed them on constrains & relations and left them
on ir.model.data, but they do seem redundant with the regular access
fields which *are* enabled on ir.model.data.

* removes the date_init/date_update fields
* converts the one bit of code which did set those to set
  create_date/write_date
* add a default value on the columns, to ensure create_date is
  properly set even from SQL queries
* use create_date/write_date in the view
* adds setting those columns to a bunch of raw SQL queries which were
  missing them (also updates the queries some to merge the literal
  values into the queries as it seems unnecessary to interpolate
  e.g. a boolean literal)

Builds on and closes odoo/odoo#50516 as that's why I started looking
into it, and that fix is in this branch as well.

closes odoo/odoo#50661

Related: odoo/upgrade#1213
Related: odoo/enterprise#10772
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-05-27 06:16:01 +00:00
dmonzonis 2a0638079e [IMP] project: Improve onboarding tour
The onboarding tour of the project app has been improved by changing
some messages and changing the flow to show users how to use the chatter
features within tasks.

Task ID: 2238624

closes odoo/odoo#49760

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-27 06:46:54 +00:00
Julien Mougenot 709d2e8a7a [IMP] account,web: SearchPanel: improve folding behaviour
1) Clicks on a section value are now bound to the entire header, meaning
that the sole purpose of the carets is purely esthetic.
2) Search panel categories will now only be folded if they are being
clicked on while already selected.

Classes that were no longer useful have been removed and tests have been
updated accordingly.

Task 2264700

closes odoo/odoo#51555

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-05-26 13:09:00 +00:00
Julien Mougenot 22167aac57 [IMP] account,web: SearchPanel: move carets to the left
In this commit, hierarchy carets in the search panel have been moved to
the left side of the labels. To achieve a consistent and correct
alignment, some DOM elements have been added/moved and the related SCSS
sheets have been adapted.

Carets on filter sections of the search panel have also been removed.

Task 2258508
2020-05-26 13:09:00 +00:00
Swapnesh Shah 41e409cff8 [FIX] account: apply correct filters
Before this commit, Clicking on "Unpaid Invoices" or  "Bills to Pay" will open records which includes Unposted moves as well while the count was only counting Posted + Unpaid moves only.

With this commit, We apply the default 'posted' filter, and include the partially paid invoices to make the filter behavior consistent with the count.

closes odoo/odoo#51763

X-original-commit: b4a08879de7109b91834fdcde4eafb2ac8c002a4
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-05-26 12:26:57 +00:00
Raphael Collet b768cf7e8b [FIX] core: normalize domain from field.search()
When search is implemented on a given field, the domain returned by
`field.search()` must be normalized, otherwise its processing just
crashes (because of missing logic operators).

closes odoo/odoo#51927

X-original-commit: c83974ac5d797d38760a46c97468a74214218575
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-26 16:37:15 +00:00
Swapnesh Shah db08c1c794 [IMP] account: use correct tab name in warning
Before this commit, It was refering to wrong tab name in the warning.

With this commit, We use correct tab/section name in the warning.

Follwo up on  https://github.com/odoo/odoo/commit/045e0c0a26412d001a5f735225719d8d77887d9e#diff-dd671a54296b170ea1393dca1a5f7798R2988

closes odoo/odoo#51646

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-05-21 16:53:11 +00:00
Nicolas Martinelli 1229b9a19c [FIX] sale_purchase: do not set Drop Ship Address
- Create 2 companies A & B
- Customers are not shared between companies
- Intercompany transactions activated (SO/PO + automatic validation)
- Create a service product P with MTO + Buy route
- Company B is a supplier for the product P
- Sell the product in company A to a customer C
  => a PO is generated in A thanks to the MTO rule
- Confirm the PO
  => a SO is generated in company B
- Set the user to have access to company B only
- Open the SO

An `AccessError` is raised during a `read` call on `res.partner` C.

The partner C is set as a delivery address of the SO because it is set
on the PO as a `dest_address_id`:

https://github.com/odoo/enterprise/blob/5a841b25389106ce254828a0383b4c71987b9f3a/inter_company_rules/models/purchase_order.py#L62

Looking further, it is set on the PO in the `sale_purchase` module.

Actually, there is no point of setting the field on the PO:
`dest_address_id` is a Dropship address only used in Stock:

https://github.com/odoo/odoo/blob/f705c4088ea7584b17769220a0a7ffcb00546e0b/addons/purchase_stock/views/purchase_views.xml#L38

Dropshipping is not supported for services. Moreover, in that specific
case the picking type usage is internal, so it should be `False`:

https://github.com/odoo/odoo/blob/f705c4088ea7584b17769220a0a7ffcb00546e0b/addons/purchase_stock/models/purchase.py#L55

opw-2260553

closes odoo/odoo#51888

X-original-commit: 9d6da7724a40bcc6b5c76aa733e7deee1b0ce922
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-26 11:42:25 +00:00
Pierre Collinet (pic) 9a8fdda8ab [IMP]mail:set a default value for field Activity Type when scheduling activity
purpose : Improve the efficiency of encoding a next activity by pre-filling the next activity type.

Set a value by default in the field Activity Type following this rules :
1) To do
2) first in sequence for this model
3) first in sequence with no model set

task-2177020
Closes #50550

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-22 07:07:25 +00:00
Lavish Chhatwani 10dd4a18fb [IMP] mail_bot : do not auto install module
Before this commit, mail_bot was an auto install module. However it is quite
disruptive during the onboarding. Moreover it is not doing what is expected
from users.

We therefore set it as not auto install, to avoid having it installed by
default in too many onboarding.

Task ID 2252752
PR #51300

closes odoo/odoo#51897

X-original-commit: ed8cbae3485b6409603e91294d7f6535f3a5e45d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-26 13:09:04 +00:00
Nicolas Martinelli 25ff38eb42 [FIX] purchase_stock: PO follower
- Create a dropship product
- Set a supplier
- As a portal user, buy the product on the eCommerce

The portal user is added as a follower of the PO created.

This is a side-effect of `sudo` keeping the current user and the
following adding the current usr as a follower:

https://github.com/odoo/odoo/blob/96b0dcf9e51f5a924e2cbf618c2ee5462cc1f03f/addons/mail/models/mail_thread.py#L262

When the PO is created from a procurement, the current user might not
have access to the Purchase app. For example, the user might only have
access to Sales. Therefore, there is no need of adding him as follower.

opw-2249357

closes odoo/odoo#51895

X-original-commit: a561ad050e0c8cfe1dafb699c4c84c7c39bf777d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-26 12:52:11 +00:00
Antoine Prieels cba03871a3 [FIX] point_of_sale: IoT Box Changing IP
After each reboot, the IP address of the IoT Boxes changed.

The problem was due to the fact that the UID that was sent to the DHCP
server was sometimes different after the box had been rebooted.

The UID was saved to `/var/lib/dhcpcd5/duid`, which was deleted after
every reboot. The UID then had to be recomputed. This UID contains a
timestamp, which was sometimes off by 1-2 seconds from one boot to the
other. The lease was then not found on the DHCP server and a new one
was created, with a new IP address.

We replace the UID by the clientID, which is not dependent on the time
but only on the MAC address of the IoT Box.

closes odoo/odoo#51889

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-05-26 11:58:34 +00:00
Jorge Pinna Puissant 8deac894f8 [FIX] product: error when automatic selecting PO vendor
The business case is the following:
1) The Child company can order the product to the Parent company;
2) The Parent company order the product to a 3rd party supplier.

Settings:
- Enable ‘Inter-Company Transactions’ transactions with the option
  ‘Synchronize sales/purchase orders’ checked;
- Enable 'dropshipping'.

Set 2 companies:
- Parent company;
- Child company: which belongs to the Parent company.

Set a product 'my purchased product':
- Can be Purchased;
- Product Type: Storable Product.
- ‘Purchase’ tab:
  - Set a Vendor price list line 1: which is your Parent company + set
    your Child company who can buy the product;
  - Set a Vendor price list line 2: which is your 3rd party Supplier +
    set your Parent company who can buy the product.
- Log in as the Child company (disable the login in the Parent company,
  select only the Child one);
- Place a Purchase Order for ‘my purchased product’ to vendor 'Parent
  company';
- Confirm the PO.

Before this commit, an error message appears. The issue arises because
seller_ids is retrieved from the cache and not re-read as superuser.
Therefore, records are missing from the list and the correct seller is
not found.

Now, the correct vendor for the purchase order of the parent company is
selected.

opw-2261971

closes odoo/odoo#51887

X-original-commit: 0a9f0c5d2c85e80dd5dceaeacf3f04bfc8aa0be1
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-05-26 11:37:55 +00:00
Arnold Moyaux e26b94405c [IMP] mrp: performance on move
With a database that contains a lot of production with kits or
BoM with a lot of bom.line. The database could become slow.

Index on stock.move <-> mrp.production could improve it.

closes odoo/odoo#51870

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-26 11:33:50 +00:00
Odoo's Mergebot 3c6ad3ce4a [MERGE] (test_)(mass_)mail(_full): reorganize test classes and helpers
PURPOSE

Improve marketing automation tests: improve their reading, add more tests
and notably SMS tests. For that purpose clean helpers and tools.

SPECIFICATIONS

Add some helpers to improve marketing tests (click on SMS, find sms / mail
based on data available in tests, ...).

Modules holding tests and helpers

  * link_tracker: mainly mock, asserts and tools for link tracker tests
    (MockLinkTracker);
  * mail: mainly gateway mock and base for mail tests
    * MockEmail -> mocks for mail gateway;
    * MailCase -> tools and asserts for mail tests;
    * MailCommon ->     base for mail functional tests);

  * sms: mainly SMS gateway mock and base for sms tests
    * MockSMS -> mocks for SMS gateway;
    * SMS Case -> tools and asserts for mail / SMS tests;
    * SMSCommon -> update of MailCommon with SMS capabilities);

  * mass_mailing: mainly asserts and tools for mass mailing tests
    * MassMailCase -> update of MailCase for mass mailing tools and asserts;
    * MassMailCommon -> update of MailCommon with mass mailing);

  * mass_mailing_sms: mainly asserts and tools for mass SMS tests
    * MockMassSMS -> update of MockSMS for mass SMS tools and asserts;
    * MassSMSCommon -> update of MassMailCommon with SMS capabilities);

Modules for tests

  * test_mail: module for mail app tests (TestMailCommon);
  * test_mass_mailing: module for mass mailing app tests (TestMassMailCommon);
  * test_mail_full: tests integrating all discuss features, currently mainly
    mail and SMS (TestMailFullCommon);

Enterprise: update test_mail_enterprise and test_marketing_automation

LINKS

Task ID 2247037
Community PR odoo/odoo#50384
Enterprise PR odoo/enterprise#10266
Upgrade PR odoo/upgrade#1122

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-26 14:22:54 +02:00
Nicolas Martinelli a874dfa08a [FIX] account: foreign exchange partner
- Create rates at dates 1 and 2 for a foreign currency
- Create an invoice at date 1 in foreign currency, set a partner
- Register a payment at date 2

The foreign exchange entry has no partner, while it should have as it
was the case up to 12.0.

opw-2249257

closes odoo/odoo#51873

X-original-commit: 3bc48c01f68c6ee95bec206a4a992adc43a0d8b9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-26 10:44:47 +00:00
Thibault Delavallée e8b1e2b7e4 [IMP] sms, link_tracker: clean some test helpers and add an helper to click SMS links
Clean some helpers, and add a helper to simulata a click on a shortened link
embedded in an SMS.

Task ID 2247037
Community PR #50384
2020-05-26 10:35:58 +00:00
Thibault Delavallée c13c3318b2 [FIX] sms: fix test helpers calling a removed method
Fix a crash when calling assertSMSStatistics without a number but taking the
number from a partner.

Also fix "sent" sms helper, content should be optional like other helpers.

Task ID 2247037
Community PR #50384
2020-05-26 10:35:58 +00:00
Thibault Delavallée 4a2ac044f8 [IMP] (test_)(mass_)mail(_full): rename and reorganize mail related test classes
Modules holding tests and helpers

  * link_tracker: mainly mock, asserts and tools for link tracker tests
    (MockLinkTracker);
  * mail: mainly gateway mock and base for mail tests
    * MockEmail -> mocks for mail gateway;
    * MailCase -> tools and asserts for mail tests;
    * MailCommon ->     base for mail functional tests);

  * sms: mainly SMS gateway mock and base for sms tests
    * MockSMS -> mocks for SMS gateway;
    * SMS Case -> tools and asserts for mail / SMS tests;
    * SMSCommon -> update of MailCommon with SMS capabilities);

  * mass_mailing: mainly asserts and tools for mass mailing tests
    * MassMailCase -> update of MailCase for mass mailing tools and asserts;
    * MassMailCommon -> update of MailCommon with mass mailing);

  * mass_mailing_sms: mainly asserts and tools for mass SMS tests
    * MockMassSMS -> update of MockSMS for mass SMS tools and asserts;
    * MassSMSCommon -> update of MassMailCommon with SMS capabilities);

Modules for tests

  * test_mail: module for mail app tests (TestMailCommon);
  * test_mass_mailing: module for mass mailing app tests (TestMassMailCommon);
  * test_mail_full: tests integrating all discuss features, currently mainly
    mail and SMS (TestMailFullCommon);

Enterprise: update test_mail_enterprise and test_marketing_automation

Task ID 2247037
Community PR odoo/odoo#50384
Enterprise PR odoo/enterprise#10266
Upgrade PR odoo/upgrade#1122
2020-05-26 10:35:58 +00:00
Victor Feyens a624567cd8 [FIX] pos_sale: sale.report discount_amount computation
The pos.order.line quantity wasn't considered when computing the discount amount.
E.g. buying 5 products (1$) at 50% would only show 0.5$ as discount_amount, instead of 2.5$.

Followup of #43587

closes odoo/odoo#51872

X-original-commit: 96e96284fceb2f68838c85f04c40da65176eb006
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-26 10:14:02 +00:00
Nicolas Martinelli 66240a8536 [FIX] website_sale_delivery: disable 'Pay Now' button
- Activate a single shipping provider, e.g. UPS
- Go to the eCommerce, purchase an item
- Enter an incorrect address (e.g. street contains more than 35
  characters, or phone number without anough digits).
- Go to the '/shop/payment' page

Nothing prevents from clicking on the 'Pay Now' button although UPS
returns an error.

The fix 0b412c250a doesn't apply after 5836f1611a
since the event requires the `o_delivery_carrier_select` class.

There are several possible solutions for this issue. The one proposed
has the following advantages:
- no upgrade of the view is required
- no additional RPC is performed

It should be fine since if the default carrier selection is ok, the
delivery method will be checked thanks to:
https://github.com/odoo/odoo/blob/33547b6bc94e1df8a8d9c22dc5894678e51a2df6/addons/website_sale_delivery/views/website_sale_delivery_templates.xml#L32

If the default carrier selection is not ok, the delivery method won't be
checked thanks to:
https://github.com/odoo/odoo/blob/33547b6bc94e1df8a8d9c22dc5894678e51a2df6/addons/website_sale_delivery/controllers/main.py#L77
https://github.com/odoo/odoo/blob/33547b6bc94e1df8a8d9c22dc5894678e51a2df6/addons/delivery/models/sale_order.py#L152

opw-2247557

closes odoo/odoo#51852

X-original-commit: 793fa68b2f79fc7da0b92bde4d74dd03ccd9fe44
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-26 08:33:25 +00:00
Priyanka Kakadiya c50210f7c7 [IMP] web: default cursor on search panel header
PURPOSE

hovering searchpanel section titles should have the default cursor
rather than selection cursor

SPECIFICATION

show default cursor on hovering search panel header

LINKS

PR https://github.com/odoo/odoo/pull/51639
Task 2259683

closes odoo/odoo#51639

Related: odoo/enterprise#10711
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-05-26 09:42:03 +00:00
Romeo Fragomeli 3e29babc3e [FIX] web: calendar: hide event span when not used
Due to commit odoo/odoo@8e48ba3eb5
a span was added to show the time before the title on a event in
month view.

DOM of event
+---------------+
| SPAN FOR TIME |
+---------------+
| TITLE         |
|               |
|               |
+---------------+

This commit, hide the empty span when is not needed, to avoid empty
blank space.

Steps to reproduce:
* Go in calendar app
* Go in view week (BUG)

closes odoo/odoo#51859

X-original-commit: 8456be44b1bc6746563cbca5366257a1da8b4a53
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2020-05-26 08:57:40 +00:00
jev-odoo 2ef534a6d5 [FIX] payment: Add email warning when generating payment link
As some payment acquirers require the email to be set,
a warning is shown when generating a payment link if
the partner does not have an email.

OPW-2254011

closes odoo/odoo#51857

X-original-commit: 6f61e89ab9b947ca54cfd8dbd5470083a625d24e
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-05-26 08:56:03 +00:00
Martin Trigaux 4dbab5a70b [IMP] account: use singular description
The description of the model is used in sentences like
This <model> has been created from: <link>
All model descriptions should be singular

Courtesy of Erwin van der Ploeg for raising the issue

closes odoo/odoo#51837

X-original-commit: e0acef778272abb748dacfe4460b3536b3c30a82
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-05-26 07:34:17 +00:00
Martin Trigaux 6394c628fa [IMP] mail: make the template easier to translate
Don't try to save bytes, make longer sentences, easier to translate
instead of splitting it into small blocks of one word.

https://www.odoo.com/documentation/13.0/reference/translations.html#blocks

Courtesy of Erwin van der Ploeg for raising the issue

X-original-commit: 737ee6393cd99b0c41272f6cfa9a0acb68276744
2020-05-26 07:34:16 +00:00
Nicolas Martinelli 95bc27b1cb [FIX] point_of_sale: access to rounding
- Create a user with only Point of Sale / User rights
- Open a POS session

An AccessError is raised on `account.cash.rounding`.

We add he access right: the user should be able to read the cash
rounding configuration.

opw-2258719

closes odoo/odoo#51816

X-original-commit: 61915c33e4e0e7979d10dee01fa80a6511498f33
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-25 13:31:03 +00:00
Anh Thao Pham (pta) 12d77d271c [FIX] payment_stripe: fix "lower()" applied to bool with stripe payment
- Go to Website > Configuration > eCommerce > Payment Acquirers
- Activate Stripe
- Configure Stripe
- Go to Sales
- Create a quotation
- Send quotation by email
- Click on "Customer Preview" smart button
- On Website, click on "Sign & Pay" or "Pay Now" if already signed
- Sign it and confirm on "Accept & Sign"
- On payment wizard, select "Credit Card (powered by Stripe)"
- Validate with "Pay & Confirm" button
An error message appears.

opw-2262990

closes odoo/odoo#51815

X-original-commit: 3c5117eaac96604a3306c90480d106e0e36fed2f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-25 13:24:11 +00:00
Christophe Simonis 97d439ae9c [FIX] purchase: use fully qualified column named to avoid ambiguities
closes odoo/odoo#51819

X-original-commit: c79dc7b24c5892c714ccb78cec808edbe0574ce6
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-05-25 13:55:21 +00:00
Yannick Tivisse 12b526432f [IMP] hr: Display chat icons on employee kanban/form views
Purpose
=======

On the Employees App, we dont have a smart way to start a discuss
with a colleague or an employee.

Specification
=============

Style for each button :
- use fa-comments
- use primary color/action color (green)

On private/public employees form/kanban views, add a button to
start a chat with the user

closes odoo/odoo#51484

Taskid: 2252207
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-25 14:50:19 +00:00
Xavier Morel 7a7b5b5d9d [FIX] core: searching through o2m with auto_join
Replaces the auto_join scheme which is pretty fast but doesn't quite
work (it's *completely* broken for read_group) by a subquery which is
slower but has the same semantics as the ORM version.

Ideally we'd use `EXISTS (select 1 from ...)` but that has no support
inside the SQL compiler right now, so use `id in (select inverse_field
from ...)`.

Here are some measures of a `read_group` on a simple object with lines
filtered on line values, similar to

    read_group([('order_line.product_uom', '=', xxx)],
               fields=['total_amount'], groupby=['user_id'])

    +-------+-------+-------+--------+
    |       |   ORM |  join |subquery|
    +-------+-------+-------+--------+
    | large |   160 |    10 |     20 |
    +-------+-------+-------+--------+
    |  many | 36000 |    50 |    180 |
    +-------+-------+-------+--------+

* values of data fields (filtering, grouping and aggregating) randomly
picked between 10 different values
* "large" is 1000 objects with 1000~15000 lines each
* "many" is 1000000 objects with 1~40 lines each

closes odoo/odoo#48494

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-05-20 12:51:43 +00:00
Raphael Collet e950c395b7 [IMP] test_read_group: read_group with one2many auto-joined fields 2020-05-20 12:44:38 +00:00
Romeo Fragomeli 2adaeb589b [FIX] web: deadlines are not visible in day/week calendar views
Due to commit odoo/odoo@0150141756
when the widget calendar is initialized with date type record for
date_start and without all_day mapping events aren't shown on day/week
views. This is because all day zone isn't visible when all_day mapping
is not set.

After this commit, we show the all day zone also when the date_start is
a date type.

Steps to reproduce:
* Go to Project App
* Select/Create a project
* Select/Add a task with a deadline
* Return to project
* Select calendar view
* Select week view (of the deadline) => BUG

closes odoo/odoo#51818

X-original-commit: 1d83f4184e1b82db4dd4db54d98e509432340996
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: rfr-odoo <rfr-odoo@users.noreply.github.com>
2020-05-25 13:54:55 +00:00
Goffin Simon e03a87ae08 [FIX] repair: Unable to end repair
Steps to reproduce the bug:

- Create a repair order RO for a product P1
- Create a part for a product P2 that needs a lot L
- Specify a source location for P2
- Process RO
- Click on 'END REPAIR'

Bug:

A UserError was raised saying: You need to supply a Lot/Serial number for product P2
even if a lot L was set to P2

opw:2251047

closes odoo/odoo#51797

X-original-commit: 1e3ed56332efd3f58ccd05f23c6af9cb23f1052f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-05-25 11:12:17 +00:00
Yannick Tivisse 45f3659305 [IMP] project,...: Improve list views with new widgets
Purpose
=======

Task 2195254 introduced many wonderful widgets to pimp the list view.
This task aims at implemeting them into the Services apps: project,
timesheets, helpdesk, expense, planning and field service.

Remaining days: https://drive.google.com/file/d/1o4Wn47445GxLqBkw-ifH9MgtFU_437xz/view
Avatar: https://drive.google.com/file/d/1yDwJWP0MZCUKZbqCa8hte1ziVTYRMMtb/view
Activities: https://drive.google.com/file/d/1e_rXH50eZq4zY2HOzw7_pfgiD39SoRIl/view
Field-specific decorations: https://drive.google.com/file/d/1WFnqJ-jkyDFftRHxWW4bgomoWrOpOuaY/view
More control on buttons

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

You will find below a list of which widgets to apply to which fields by
model. Some changes have to be done in the form/kanban views as well.

1) project.task

remaining days -> date_deadline -> list + kanban + form views
hide this field if is_closed is true
avatar -> user_id -> list view
activities -> 'next activity' field to be added -> list view
field-specific decorations
https://nimb.ws/ACewrY remove the current orange/red decorations we have
if planned_hours > 0, display the remaining_hours field in (list view):
red if progress is > 100%
orange if progress is between 80% and 100%
green if progress is <80%
display unit_amount in red if > 24:00 -> form view

2) rating.rating

display the rating in:
green = satisfied
orange = not_satisfied
red = highly_dissatisfied
list + form views

3) project.project

avatar -> user_id -> list + form views

4) account.analytic.line

avatar -> employee_id -> list view
display unit_amount in red if > 24:00 -> list + kanban + form view
https://nimb.ws/eIWa7E merge the timer and duration fields together

5) helpdesk.ticket

avatar
user_id -> list view
employee_id under timesheet_ids -> form view
remaining hours -> sla_deadline
activities -> 'next activity' field to be added -> list view
field specific decoration -> display unit_amount in red if > 24:00 -> form view

6) hr.expense

avatar -> employee_id -> list view
activities -> 'next activity' field to be added -> list view
badge -> state -> list view
draft = blue
reported = green
approved = green
done = green
refused = red
combine the unit_amount and the currency_id fields (see the total_amount field for reference) -> list view (idem for the expense_line_ids one2many on hr.expense.sheet)
display the total_amount in bold
move 'company_id' before 'amount'

7) hr.expense.sheet

avatar
employee_id -> list view
user_id -> list view
activities -> 'next activity' field to be added -> list view
badge -> state -> list view
draft = blue
submit = green
approve = green
post = green
done = green
cancel = red
display the total_amount in bold
move 'company_id' before 'amount'

8) planning.slot

avatar -> employee_id -> list view
decoration
display the allocated_percentage field in red if > 100% -> list + form view
display the forecast_hours field in red if > planned hours and if planned_hours > 0 -> form view
display the effective_hours field in red if > forecast_hours and if forecast_hours > 0 -> form view

9) misc

calendar.event -> avatar -> user_id -> form view
mail.activity.type -> combine the delay_count and delay_unit fields together -> list view
note.note -> 'next activity' field to be added -> list view
crm.lead.mining.request
combine the lead_number and lead_type fields together -> list view
display the name in bold
badge -> state
draft = blue
done = green
error = red
planning.slot.template -> display the duration field in red if it is = 0

closes odoo/odoo#51271

Taskid: 2248351
Related: odoo/enterprise#10605
Related: odoo/upgrade#1252
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-25 12:44:14 +00:00
Yannick Tivisse f27baf0c94 [FIX] crm: Fix singleton error 2020-05-25 12:44:14 +00:00
svs-odoo 46b70e8ef3 [IMP] purchase: hide date_planned if empty
Also, makes `date_planned` readonly when PO in "Purchase Order" state.

task-2181611

closes odoo/odoo#49835

Related: odoo/enterprise#10073
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-25 11:08:04 +00:00
svs-odoo 3e984aac75 [IMP] stock: log message instead of activity
When rescheduling a stock document, logs a note about the new scheduled
date instead of create a new planned activity.

task-2181611
2020-05-25 11:08:04 +00:00
svs-odoo 6b15eab7e1 [IMP] stock: don't auto. assign backorder
Before this commit, when a backorder is created, it was automatically
reserved. It is no more the case. Now user have to reserve it manually.

The reason is, when a user doesn't delivery all expected quantities, it
could be because there is no enough quantity in stock, or the user
doesn't want to delivery all. In these cases, it doesn't make sense to
reserved it directly.

task-2181611
2020-05-25 11:08:04 +00:00
svs-odoo 6501713d9a [IMP] maintenance,mrp,repair,sale: text changes
task-2181611
2020-05-25 11:08:04 +00:00