Commit Graph
124055 Commits
Author SHA1 Message Date
Lucas Lefèvre d77ce4c2a9 [IMP] hr_*: introduce the employee profile
General Purpose
===============

We want an 'Employee profile' gathering every data about an employee.
The main form view is modified to become this employee profile.
A user can also see his own profile through the Preferences menu.
The new profile replaces the current Preferences view if the hr module is installed
and the current user is linked to an employee.

A user should be able to see and edit his own profile.

*Problem*:
Many fields on hr.employee are protected by groups="hr.group_hr_user".
Therefore, a regular user cannot see or edit those fields.

This protection must be bypassed to allow read/write access
to the regular user's own data.
A similar mechanism already exists for res.users (for Preferences)

The better (least worst) solution found is to reuse this mechanism by adding related fields on res.users.

Pros:
- Don't change security access on hr.employee
- Don't implement yet another custom security layer, risking to add new security breaches
- A lot of fields are added by other modules on hr.employee.
  It would have required to integrate them with the custom security layer.
- Fields added by other modules on the user's preferences view (normal view, not the profile)
  are automatically included in the employee's profile view.
- Allow the hr.employee form view to be different than the user profile accessible
  through the Preferences menu.
  E.g. add custom buttons only relevant to the logged in user such as "Request a leave".
Cons:
- Each field from hr.employee that you want to appear on its profile
  must be added as a related field on res.users
- Those related fields must be added to user's preferences view (duplicate views)
- They also must be added to SELF_[READABLE | WRITABLE]_FIELDS

Note:
When the front-end loads the views it gets the list of available fields
for the user (according to its access rights). Later, when the front-end wants to
populate the view with data, it only asks to read those available fields.
However, in this case, we want the user to be able to read/write its own data,
even if they are protected by groups (groups are kept on the related fields on res.users).
The front-end need to be made  aware of those fields by sending all field definitions.

hr_attendance
=============

This commit integrate attendance in the new employee profile.
It also adds a stat button to this employee profile showing
the number of hours worked last month.

Remove the boolean computed field 'manual_attendance'.
This field is just a shortcut to add/remove the employee's user
in the "Manual Attendance" group.
The checkbox is confusing on the employee's form and this should
be done through the normal group management screens.

hr_presence
===========

Display the presence status on the employee kanban template.
The status is a colored chip which can be green (present),
orange (to define) or red (absent).

Currently, the presence status is only computed when accessing
the report view. As this commits displays it on the employee kanban,
it should be updated more frequently.
The state should not be updated every time the kanban view is loaded
since the computation is a bit heavy. Instead: add a cron to update
status every 15 minutes.
-> The status is accurate on the report view (status is still updated
   when loading the view)
-> The status in accurate at 15 minutes on the kanban view

[ADD] hr_attendance_presence
============================

Bridge module between hr_attendance and hr_presence.

This commit integrates hr_presence module in the employee
profile and adds the presence status on the employee kanban view.
But hr_attendance adds at the same place a similar status icon for
checkin/checkout.
This bridge module makes the status from hr_presence invisible as
hr_attendance should be the main presence control mechanism.

Also, this commit adds the ability (through a new setting option)
for hr_presence to take into account checkin/checkout to determine
the presence status.

l10n_be_hr_payroll
==================
integration with employee profile
2019-02-14 16:28:54 +01:00
Lucas Lefèvre c7aa8c5f66 [IMP] mail: allow tracking on groups protected fields
Purpose
=======

Currently fields with a `groups` attribute can't be tracked.
Otherwise changes would be visible by all in the chatter, including
users which normally don't have the access rights because they are
not members of `groups`.

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

Filter tracking field values according to the `groups` attributes.
Users without the access rights should not see them.

If a message is only composed of tracking values and the user doesn't
have the rights to see them, an empty message should not be displayed.
2019-02-13 11:03:33 +01:00
Lucas Lefèvre 0cd13b001a [IMP] hr, hr_holidays, hr_expense: Change onchange parent_id behaviour
Purpose
=======

When the manager (parent_id) of an employee changes,
it doesn't always mean that other responsibles (Leave responsible,
expense responsible, coach) should also change.

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

When changing the employee's manager, the leave responsible,
the expense responsible and the coach should be changed only
if the field was not set or if the responsible is the previous manager.
In that case, they should be set to the new manager.
Otherwise, it means the field was most probably set manually and
it should be left unchanged.
2019-02-13 11:03:33 +01:00
Lucas Lefèvre 1e5778844f [IMP] hr_contract,hr_payroll: Remove unused boolean 'manager' field on hr.employee
The boolean manager field added by hr_contract on the hr.employee model was not used.
This commit removes it.
2019-02-13 11:03:33 +01:00
Jinal Patel 7e49fda883 [IMP] point_of_sale: Allow to filter partners based on pos orders
Especially used for e-marketing to filter the customers who purchased from store using pos.

Related Task ID: 1931528

closes odoo/odoo#30645
2019-02-13 07:28:08 +00:00
Nimesh Jethva 2d633fc7ac [IMP] mrp : BoM of type kit improvement.
- Hide operation as well as menufacturing readiness when bom type is kit also make help message user friendly.

Task : https://www.odoo.com/web#id=1929631&action=327&model=project.task&view_type=form&menu_id=4720

This commit is related to task ID : 1929631

closes odoo/odoo#30405
2019-02-13 06:16:47 +00:00
Yannick Tivisse 9a8863d01f [FIX] l10n_in: Fix forwardport
closes odoo/odoo#28816
2019-02-13 06:12:39 +00:00
Barad Mahendra 4ef4aa2083 [IMP] payment: Log error message on payment transaction failure
Currently when the payment is initiated there is a message in
sale order for waiting for confirmation.

But when the payment returns an error there is no message on
sales order so it's not clear for the end user that payment
is still pending.

Related Task ID : 58741
2019-02-13 06:12:39 +00:00
Jinal PatelandRohan Patel f735951d5c [ADD] payment_ccavenue: Add new payment acquirer for India
CCAvenue is the most popular payment provider in india.

Co-authored-by: Rohan Patel <rop@odoo.com>

Related Task ID : 58741
2019-02-13 06:12:39 +00:00
wan 7a1c8d54b4 [IMP] account: filter reconciliation with check number
Task 1881964
Allow to search for counterparts with a check number

closes odoo/odoo#30593
2019-02-12 12:13:59 +00:00
Thibault Delavallée 752c8925ea [FIX] website_slides: fix typos
Othrewsie you colud have some isuses.

closes odoo/odoo#31020
2019-02-12 11:24:30 +00:00
David Beguin f95f8cc696 [FIX] gamification: fix rank computation 2019-02-12 11:24:23 +00:00
David Beguin b0aa6f654b [MOV] gamification, website_forum : move karma data and demo in gamification
As gamification karma-based features can be used outside of forum let us
move demo and data directly in gamification. It will be used notably for
eLearning.
2019-02-12 11:23:34 +00:00
Robot Odoo 77b5673a0d [MERGE][REF] website_slides: allow / improve channel and slide creation
This merge provides new modal to create slide channel from the 'New' website
menu, like blogpost or forum. It also improves the upload slide widget from
channel homepage.

This merge also brings new slide type 'webpage'. This allow user to create
completely customized content as a slide.

This merge is linked to Task-1938643. More generally it is linked to the
eLearning feature [1]. For more details see subcommits.

[1] see task ID 1902304 (main eLearning task) PR #29876

closes odoo/odoo#30991
2019-02-12 14:03:26 +01:00
qmo-odoo 1b1732beb5 [IMP] website_slides: new modal to upload a document
With new slide type, it was required to change the
upload modaL. Now, the use select first the type
of document he wants to upload, then the correct
form appears. When filled, user can sumbit it to
be redirect to the slide he just create.

Task-1938643
2019-02-12 11:23:13 +00:00
qmo-odoo 0f22f95289 [IMP] website_slides: webpage slide type
The idea is a slide can be a HTML page completely customized by
user. So, you can now easily create custom content and publish
it on your website, like a normal slide.

Task-1938643
2019-02-12 11:22:59 +00:00
qmo-odoo b8a24751c2 [IMP] website_slides: remove unique slide name constraint within channel
Having a unique constraint for a slide name in a channel look strange.
It force an RPC call to check this when uploading a slide, making the
process a little bit slow.
Morevover, name is a translatable field on slide.slide model, so the
constraint can not be fully respected.

To simplify the model, we decided to remove this.

Task-1938643
2019-02-12 11:22:59 +00:00
qmo-odoo 5aa645c89f [IMP] website_slides: add external links on slide
A slide can now have some external link. For instance, links to
the origin of the document (sources for scientifics papers, ...).
A new model is added to allow the user to provide several link
per slide. Those are display below the channel on website page.

Task-1938643
2019-02-12 11:22:59 +00:00
qmo-odoo c2a38e4602 [IMP] website_slides: create channel in frontend
This commit provides the abilty to create channel from the website
instead of creating a slide. To do so, the user still have the "upload"
button on the channel home page.
The new modal allow user to set title, description, type and channel
tags. We prevent channel tag and group tag creation on the fly, as it
can impact the UI (coming in a future commits).

Task-1938643
2019-02-12 11:22:55 +00:00
Thanh Dodeur 0284e5f3fd [REF] account: prepares hooks for reconciliation requests
This commit changes some methods so they can be used in the account_documents enterprise bridge
and adapts activity tests for the new request on upload_file feature.

task: #1928404
related to: odoo/enterprise#3607

closes odoo/odoo#30950
2019-02-11 14:33:15 +00:00
Aurélien Warnon 9352bb682f [IMP] website_slides: improve channel's "members_count" computation
Task #1937160

Purpose
=======

Performance improvement:

The members_count computed field now uses a compute_sudo with
a read_group allowing to compute all the members_count of the recordset
in a single query.

closes odoo/odoo#31013
2019-02-12 09:22:29 +00:00
Prakash Prajapati 3259bad899 [IMP] sale: Improve invoice order wizard
Improve wording of invoice modal.

Task:1939613

closes odoo/odoo#31011
2019-02-12 08:39:20 +00:00
William Henrotin a1f22d599d [FIX] website_sale_delivery: remove unused variable
3bf8e75379 changes the only call to
has_delivery to a check on another variable. This commit removes
the field from the model as it's now useless.

Task : 1908654

closes odoo/odoo#28976
2019-02-11 13:55:55 +00:00
William Henrotin de88a727b2 [REF] delivery: new delivery carrier wizard
On a sale order, the delivery carrier choice was done directly
on the form view. To get an estimated delivery price, the user need to
click 'add to order' to create a delivery fee line. To get the exact
delivery price on the sale order, the user needed to leave the sale
order without delivery line in order to get the exact price from the
picking at its validation.
As this flow was not so clear, this commit adds a new wizard to choose
the delivery carrier and check its commition fees. This add a line in
any case.

The wizard will be launched from a new button on the sale order

Task : 1908654
2019-02-11 13:55:55 +00:00
William Henrotin 8938afa3f6 [IMP] delivery: invoicing policy of delivery price
The delivery carriers get a new field to specify the invoicing
policy. The two cases are :
  - Estimated cost: the delivery price is charged directly on
the sale order based on the estimated fee
  - Real cost: the delivery price is estimated from the sale order
but not added in the delivery line (we get a line with quantity=1 and price = 0).
Once the delivery is validated, the delivery price is recomputed.
The new price depends on the integration level. If it's 'rate', the price is
the estimated one (carrier.rate_shipment()). If it's 'rate_and_ship, the price
is the one given by the carrier at the delivery

The bases carriers (fixed_on_rule and base) always use 'Estimated Cost'
as their price should not be changed between the sale order creation
and delivery validation

Task : 1908654
2019-02-11 13:55:55 +00:00
Robot Odoo 8b7605c9e5 [MERGE][ADD] website_slides_sale: allow to sell slide.channel
Purpose of this merge is to be able to sell courses [1] when using the
slides / eLearning platform.

This commit adds sale capabilities on a slide.channel. A slide.channel can
now have the 'payment' visibility, that requires a 'product_id' configured
on the channel.

When a customer purchases a product linked to a channel, he is added to the
members of the channel (see slide.channel.partner_ids) when his order is
confirmed.

This merge is linked to task ID 1937160 and PR #30914. Future tasks will
improve homepage of channels and clearly show public, private and payment
based channels [2].

[1] see task ID 1902304 (main eLearning task) PR #29876;
[2] see task ID 1936153 (new homepage for slides) PR #30770;
2019-02-11 20:29:40 +01:00
Aurélien Warnon a15810e0c2 [IMP] website_slides: add a setting to install website_sale
Purpose
=======

With the new 'website_slides_sale' module users can now sell slide.channels.

This commit adds a setting to let the user know he has to install website_sale
to be able to sell courses / documentation.
2019-02-11 17:47:35 +00:00
Aurélien Warnon e5536fc07b [IMP] website_slides: add invite wizard for 'invite' slide_channel
Purpose
=======

Currently, the slide_channels having a visibility configured as 'invite' could
only add members manually.

This commit adds an 'Invite' button on top of the slide channel form that opens
a wizard allowing to send emails to contacts and also make them members of the
related slide channel.
2019-02-11 17:47:22 +00:00
Aurélien Warnon 779d9c9b90 [IMP] website_slides: add a "Attendees" stat button on slide.channel
Task #1937160

Purpose
=======

This commit adds a "Attendees" stat button on the slide.channel form view
showing the members (partner_ids) count.

On click, it redirects to a tree view of slide.channel.partner. The tree
view is configured as editable to be able to administrate members
(add/update/delete).
2019-02-11 17:47:10 +00:00
Aurélien Warnon 9b7bee73e5 [ADD] website_sale_slides: allow to sell slide.channel
Task #1937160

Purpose
=======

This commit adds sale capabilities to a slide.channel. A slide.channel can
now have the 'payment' visibility, that requires a 'product_id' configured
on the channel.

When a customer purchases a product linked to a channel, he is added to the
members of the channel (see slide.channel.partner_ids) when his order is
confirmed.

The feature is added in a new module 'website_sale_slides' that comes as a
bridge auto-installed between 'website_slides' and 'website_sale'.

The final goal is to be able to sell "courses" (see task #1902304).
2019-02-11 17:46:40 +00:00
wan fb8126ddd7 [IMP] l10n_be: change default taxes
Task 1939277
The default tax  TTC (in l10n_be) generate errors in the new business game, need to change that

closes odoo/odoo#30990
2019-02-11 10:34:26 +00:00
Christophe Simonis 1738fbb67e [FIX] test_mail: only patch message_track for test model 2019-02-11 18:35:50 +01:00
Christophe Simonis 8c29df10e0 [MERGE] forward port branch saas-12.1 up to 93d736e905 2019-02-11 17:00:35 +01:00
Christophe Simonis 93d736e905 [MERGE] forward port branch 12.0 up to 6e8dff1952 2019-02-11 16:17:02 +01:00
Christophe Simonis 6e8dff1952 [FIX] purchase: correctly extract date from datetime
Oversight of previous forward-port
2019-02-11 14:23:33 +01:00
Christophe Simonis 75eec26da3 [MERGE] forward port branch saas-11.3 up to 728bb2a28e 2019-02-11 12:47:52 +01:00
Nikunj Ladava 0e71f91fa1 [ADD] payment_payulatam: Add new payment acquirer for Latin America
TaskID 1826303

closes odoo/odoo#24802
2019-02-11 11:36:14 +00:00
Robot Odoo 890e47ea7f [MERGE][REF] website_slides: prepare channel model to eLearning
Purpose of this merge is to prepare eLearning feature by already modifying
channel model.

It includes

 * addition of tag and tag groups on channel, allowing to filter and search;
 * addition of statistics computation on channel, notably tracking completion
   of users;
 * removal of promoted slide feature and addition of specific image field
   on channel;

This merge is related to task ID 1936153 and closes PR #30985. More
generally this merge is linked to ongoing tasks

* task ID 1902304 (main eLearning task) PR #29876;
* task ID 1922159 (new user profile and gamification) PR #30514;
* task ID 1937160 (payment flow and integration with ecommerce) PR #30914;
2019-02-11 12:57:57 +01:00
Robot Odoo 47bb7ef796 [MERGE] mail, hr_holidays, *: add out of office status
*: base, bus, mail_bot, test_mail

Before this task, it was not easy to tell when a user is not available (or is on holiday)
from conversations, such as from chat windows.

With this task, a user can now tell that he is out-of-office from the user menu preferences,
by defining an an out-of-office message. This information will be displayed to other users from
chat conversations and mention suggestions (i.e. with `@`).

Also, the computation of the user `im_status` has been changed when he has an active leave:
an out-of-office message can be set on the leave, and this will be displayed on conversations
instead of the user's out-of-office message from the user menu preferences.

Task: 1856205

closes odoo/odoo#29974
2019-02-11 12:57:48 +01:00
Robot Odoo 768844040f [MERGE][IMP] sale: improve usability of down payments
Task #1908673

Purpose
=======

The "invoice" modal is too complex to use for new users and has a lot of useless options for
the most simple use cases.

The goal here is to remove 2 options of the 'advance_payment_method' field:
* Invoiceable lines
* Invoiceable lines (deduct down payments)

And combine them into a new one: "Standard invoice".

If there are any down payments to deduct, another checkbox field appears under this
one: "Deduct down payments".

This keeps all the invoicing features while simplifying the modal.

Spec
=======
* Remove "invoiceable lines, deduct down payment" and replace by a checkbox
  (checked by default, only visible if down payments to deduct)
* Rename "Invoiceable lines" into "Standard invoice"
* tooltip on radio buttons: A standard invoice is issued with all the order lines ready for invoicing,
  according to their invoicing policy (based on ordered quantity or on delivered quantity).

closes odoo/odoo#29978
2019-02-11 11:41:50 +01:00
Thibault Delavallée 7b81df3747 [REF] website_slides: remove promoted slide feature, add image and channel_type
Purpose of this commit is to clean a bit channel model. Promoted slide
feature is removed as people can already choose an order for a given
channel. Moreover promoted slide will not be used when having a eLearning
display of a channel.

Image field on channels is added as it is not depending on promoted slide
anymore.

To simplify future additions a search-specific template is removed to
have a unique template to display a channel content. It will ease future
merge.

This commit is linked to task ID 1936153 and PR #30985.
2019-02-11 09:55:15 +00:00
Thibault Delavallée 7ee22f1219 [IMP] website_slides: improve and add statistics computation
Purpose of this commit is to add some statistics computation on slide.channel
model. We want notably to have a count of views and votes (likes and dislikes)
on channels. Completion is also computed.

Purpose is to be able to search and order channels based on those statistics.
Having stored computed fields for some statistics help achieving that purpose.

Tests are added.

This commit is linked to task ID 1936153 and PR #30985.
2019-02-11 09:55:12 +00:00
Thibault Delavallée cbc2de0eb6 [IMP] website_slides: add tags and tag groups on channel
Purpose is to be able to filter, search and categorize channels. Notably
with eLearning in mind there will be more channels as a channel will also be
used to hold lessons.

For that purpose we add a model of tag linked to channels. Those tags are
organized by groups in order to be able to display them using a menu or
a small hierarchy of tags. Displaying a tag group as a specific navigation
element is controlled by a specific field.

Those models will be used to display a new and improved home page for
channels / courses.

This commit is linked to task ID 1936153 and PR #30985.
2019-02-11 09:55:05 +00:00
XavierDo 975164473c [IMP] mail, hr_holidays: improve channel_info
`channel_info` can be called on multiple channels especially during
the init_messaging. The current implementation will perform read and
other queries in the loop. This commits aims to refactor `channel_info`
in order to read all informations in database out of the loop.

Computation of members informations is now the same as for `direct_partner`
As a side effect direct partner will have an email adress and members will have
im_status and out_of_office message if the partner is in a
channel of type chat. It would be easier to compute im_status in all case but
this could create performances issues when calling channel info on channel with
hundreds of users.

channel_fetch_preview will make a query in database in any case but seems to work ok
in api multi. We can put it out of the loop.

44ac7903cc fix shouldn't be broken by this refactoring since we are no longer using the many2many to find direct_partners.
2019-02-11 09:22:24 +00:00
Pierre Masereel 4de183a966 [FIX] iap: logo svg text
The IAP logo is an svg file, and contains a text tags with font
specified in it. It leads to wrong display in some browser and/or
operating systems when the font is not installed.

To avoid this wrong display we changed the text into a path in the svg.

closes odoo/odoo#30995
2019-02-11 08:44:38 +00:00
Aurélien Warnon 5cec9cf223 [IMP] sale: improve usability of down payments
Task #1908673

Purpose
=======

The "invoice" modal is too complex to use for new users and has a lot of useless options for
the most simple use cases.

The goal here is to remove 2 options of the 'advance_payment_method' field:
* Invoiceable lines
* Invoiceable lines (deduct down payments)

And combine them into a new one: "Standard invoice".

If there are any down payments to deduct, another checkbox field appears under this
one: "Deduct down payments".

This keeps all the invoicing features while simplifying the modal.

Spec
=======
* Remove "invoiceable lines, deduct down payment" and replace by a checkbox
  (checked by default, only visible if down payments to deduct)
* Rename "Invoiceable lines" into "Standard invoice"
* tooltip on radio buttons: A standard invoice is issued with all the order lines ready for invoicing,
  according to their invoicing policy (based on ordered quantity or on delivered quantity).
2019-02-11 08:04:29 +00:00
Aurélien Warnon f808f36f38 [REF] sale, repair: rename invoices creation method
Purpose
=======

The method named "action_invoice_create" in the sale_order model did not make sense:
  - this method is not an action (it returns the ids of created invoices)
  - it is not used as an action on any xml buttons
  - it has no reason to be private

This was probably a "real" action somewhere in the past but now it's just too confusing.

(The method in repair.order was also renamed for the same reasons).
2019-02-11 08:04:29 +00:00
Robot Odoo 50a41c9f87 [IMP] web: mobile calendar today button alignment
Improve the User Interface of the Calendar mobile view.

- The "today" button should be aligned (both size and position) with the
view switcher icon.
- Extract mobile calendar styling into dedicated SCSS file.

Task ID: 1891955

closes odoo/odoo#30592
2019-02-11 08:35:21 +01:00
Odoo Translation Bot 56c39dd784 [I18N] Update translation terms from Transifex 2019-02-10 06:03:40 +01:00
Christophe Simonis 728bb2a28e [MERGE] forward port branch 11.0 up to 9553240adc 2019-02-08 19:19:57 +01:00