Commit Graph
117283 Commits
Author SHA1 Message Date
Kishan Gajjar c1f04bef83 [IMP] hr_timesheet: make it easier to encode timesheets
In this commit, we do two small changes to make it easier to encode
timesheets.  The main issue is that we want to solve the following
situation: a user clicks on a cell in a timesheet grid view to open a
list view, then clicks on 'Create' to create a new timesheet. This will
open a form view, but some fields which could be prefilled are not
filled.

- do not reset task_id in some cases. This is important for the onchange
  call which comes after a default_get, when there is a default project
value set.
- do not set employee_id if there is default_employee_id in context
  This is useful when we open timesheets from the 'All Timesheets'
menu item, then add a new line, select a different employee, and open it
in the grid view (by clicking on the + icon from a cell).  This opens a
list view, which is editable, but when we create a new entry, it ignores
the employee value.

Note: a commit in enterprise adds support for properly passing contexts
in grid view, see
https://github.com/odoo/enterprise/commit/f23003917f18b52bb69483cdaac3cb2164230aa6

Task: #35414
2018-05-11 16:19:26 +02:00
Fabien Meghazi 02deb4a662 [FIX] server: fix typo introduced in 9ffb51e1c2 2018-05-11 15:42:29 +02:00
Viral Thakar d1c731e88c [IMP] pad: add mobile support for pad widget
In mobile devices, the pad widget did not behave in a satisfactory
manner.  Also, once it was in fullscreen mode, it was not possible to
come back to normal mode.

Task: #31545
PR: #15817
2018-05-11 14:36:57 +02:00
Ray Carnes 7ee2bfce9f [IMP] google_spreadsheet: Add widget="url" to the URL field on tree view
Users can now click this field, instead of having Odoo open the Form View to click it.

Benefits:
1. Saves the user from clicking TWICE (they only have to click ONCE with this PR)
2. Keeps the list view of all spreadsheets open (user has to GO BACK to see the list without this PR)
2018-05-11 11:55:05 +02:00
David f236b095cb [IMP] membership: Always display associate_member on members tree views
Whatever the state of the association the associate_member is
relevant in order to follow where the membership status of the partner
comes from.
2018-05-11 11:50:47 +02:00
Swapnesh Shah e293cdafb1 [IMP] project: Display tasks label on rating stat button
Added label_tasks in task form view for rating

closes #22895
2018-05-11 11:43:00 +02:00
Fabien Meghazi 9ffb51e1c2 [IMP] server: improve logging for ThreadedServer#server_bind 2018-05-11 11:37:16 +02:00
Romain Derie b65cb86697 [IMP] website: remove page creation in menu manager + menu container
This commit:
1. removed the possibility to create page from the menu manager.
   The usability of this feature wasn't great since create menu as a new page
   would redirect to that newly created page without saving the menu manager
   state.
   Plus, there is already the 'NEW' button on the navbar to create a new page,
   the menu manager should, as its name hint, only manage menus.
2. Handle a new case (officially at least) of menu: menu container.
   Those menu are simply menus with '#' as URL. It will be usefull to create a
   menu as a dropdown list container.
   Note: We should take care of a menu's URL being updated to '#' to avoid the
         menu's page URL to be also edited to '#'.

opw-1825883 & opw-1824263
2018-05-09 15:38:58 +02:00
Jairo Llopis 285ead28e3 [IMP] Handle XMLRPC calls from standard controllers
This way, XMLRPC calls can get request details form the standard
`odoo.http.request` system.

Move jsonrpc to the same controller while at it, for coherence.

Fix #24183
2018-05-09 09:46:15 +02:00
ppr-odoo e9e8fd24cf [IMP] mail: hide 'mark all read' buttton on mobile devices
This commit is related to task ID 1838321

PR #24412
Task #1838671
2018-05-08 15:26:06 +02:00
Samuel Piquet 2884f76488 [FIX] repair: remove useless rules
The manager had less rights than the user.
As the manager is also a user, this had no effect.

Closes #24523
2018-05-08 13:24:47 +02:00
Samuel Piquet 08cd80a315 [CLA] signature for Sa3m
Done at #24523
2018-05-08 13:24:42 +02:00
xmo-odoo 0767d35805 [IMP] base_automation: warn when using on_change trigger w/o "code" type
Task 37742

closes #21446
2018-05-07 13:31:45 +02:00
Thibault Delavallée 324ae5ed8f [REF] mail: get rid of thread_model context key
message_post and various mail.thread related code still support a thread_model
context key allowing to redirect message post on another model. Purpose of
this commit is to get rid of that context key and support model / res_id
fields coming from either the record on which we run, either parameters of
message_post. Indeed those parameter match the one used as fields on mail
message. It makes sense to support them for customization if necessary
instead of using a context key.

This context key exists since a lot of time. It is difficult to find the
source as history is quite complex when the mail was refactored in 2012.
See notably 6aa4f80b2d and 2c4ed841b9 for example.
2018-05-07 11:00:03 +02:00
Thibault Delavallée 282733cf8d [REF] mail: make notification methods semi-generic
mail.thread mixing class defines several methods used in notification process
that are not specific to mail.thread enabled models. It means some models
could override it while some other models do not even have a direct access
to that method.

When calling those methods we have to manually check for method being
available on a record or call a default implementation from mail.thread
even if the model does not inherit from the mixin.

In this commit we propose to hide this check in generic wrappers located
in mail.thread class. It checks for method existence on record and call
the model-specific implementation or falls back on standard behavior. It
allows to be sure the right method is called.

Functionally behavior should stay globally the same. However when updating
some addons code has been updated. Previous code could lead to records not
having correct alias which should not be the case anymore. This commit is
linked to task ID 47934.
2018-05-07 10:58:54 +02:00
Yannick Tivisse 6cb5052e85 [FIX] fleet: Fix the _name_search override on fleet.vehicle
Actually _search return a list of ids, not a browse record.
2018-05-07 10:11:58 +02:00
Yannick Tivisse 9e261d0f7d [IMP] l10n_be_hr_payroll: Store the Employee Budget 2018-05-07 10:11:58 +02:00
Yannick Tivisse 5731c10a69 Revert "[IMP] hr_contract: Improve the contract tree views"
This reverts commit ec929342eb.

This wasn't the expected result :)
2018-05-07 10:11:58 +02:00
Fabien Pinckaers a5c614db57 [IMP] account: name_search / name_get symetry on account.account
That way, pressing down on a many2one already filled will not propose
to create a new account: "20000 Sales Account" should name_search it.
2018-05-05 08:56:30 +02:00
dip-odoo 362613a2fa [IMP] auth_signup: change email invitation condition
Currently if a user has already been invited you cannot invite him again
via the web_settings_dashboard as it automatically tries to create a new
user.
This commit changes that behaviour in case you have the mail app
installed odoo will now send an invitation email to the invited user as
long as this user has never connected.

1) Mail app not installed:
   - if user is active     > display error (this email is already in use)
   - if user not active    > activate the user
   - if user doesn't exist > create new user

2) Mail app installed:
   - if user is active && state confirmed > display popup (this email is
   already in use)
   - if user is active && never connected > resend invitation mail
   - if user is inactive > activate the user
   - if user doesn't exist > create new user and send invitation mail

This commit is related to task #54023
Closes #23081
2018-05-04 18:07:31 +02:00
Yannick Tivisse 2f15a5fa64 [IMP] base: Add support for private addresses
Purpose
=======

Add the possibility to create private addresses, only accessible for a subset
of users.

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

- Add a new 'Private' partner type
- Add a res.groups in base 'Access to Private Addresses'
- Add ir.rules for the following behavior:
    - Every employees/internal users can read non-private addresses
    - Only users in group_private_addresses can access private addresses
- Add in base a simplified form view for private addresses
- A HR Officer is automatically granted in group_private_addresses
- Use the simplified form view to open the address_home_id form on employees
2018-05-04 13:17:25 +02:00
Yannick Tivisse ec929342eb [IMP] hr_contract: Improve the contract tree views
Remove useless/redundant information and add the department_id.
2018-05-04 11:17:59 +02:00
Yannick Tivisse ef721eb9af [IMP] hr_contract: Remove the field 'vehicle_distance'
The field 'km_home_work' already exists in the hr module for the same purpose.
2018-05-04 09:59:52 +02:00
Yannick Tivisse a696f84f1f [IMP] hr: Add private information fields on the employees
Add some private information on the employees like:
- Certificate: Bachelor, Master, Other
- Place/Date of birth
- KM Home/Work
- Emergency Number/Contact
- ...

Also move some already existing private information from hr_contract to hr.
2018-05-04 09:59:24 +02:00
Yannick Tivisse 20c967ed19 [MERGE] hr_contract, l10n_be_hr_payroll: Improve employee contracts and payroll
1/ fleet: Improve stages demo data

    Remove the old one and defined stages that are more realistic.

2/ hr_contract: Add a access right group on contracts

    Some private information are on the contracts. Add a special group to display the
    contracts, independant of the other HR access rights.

3/ hr_contract: Add 'reported_to_secretariat' field on contracts

    Informative field to be greened when the related information is sent to
    the secretariat or the government.

4/ l10n_be_hr_payroll: Use the adapted wage as basic salary on payslips

    It's possible to take more holidays days than the allowed legal days.

    In that case the effective wage is the 'wage_with_holidays'.

    This specific wage should be used as basic salary when computing the payslip.

5/ l10n_be_hr_payroll: Track visibility onchange on wage_with_holidays

6/ l10n_be_hr_payroll: Remove cars domain on contracts

    Doesn't make sense to restrict the available cars on backend.

    A HR user is supposed to know what he does.

7/ l10n_be_hr_payroll: Rename 'Total Employer Cost' into 'Employee Budget'

8/ hr_contract: Add 'active' field on contracts

    Add the possibility to archive contracts.

9/ l10n_be_hr_payroll: Remove unnecessary field dependencies

    Since https://github.com/odoo/odoo/commit/2304edd46cc12aaef4fddaa22887ff51f51581bc,
    the total_depreciated_cost field on the fleet.vehicle is stored.

    This commit removes the field dependencies that are not useful anymore.

10/ l10n_be_hr_payroll: Allow to use several transport mode

    It should be possible to use several transport mode between
    - A company car
    - A public transportation
    - Another transport mode

    This commit split the selection field into 3 boolean fields.

    The payroll rules have to be modified too to take all the costs into account
    on payslips.

11/ hr_contract: Rename 'Contract Type' into 'Employee Category'

12/ l10n_be_hr_payroll: Introduce a new 'Intellectual Property' advantage

    Intellectual property rights guarantee their holders a temporary and territorially
    restricted, exclusive exploitation of their intellectual property. This monopoly
    stimulates innovations that are indispensable for economic growth, but can go against
    the right of free competition which is indispensable for the free market economy.

13/ l10n_be_hr_payroll_fleet: Add company car information on employee contracts

    It makes sense to display this piece of information on the employee contract.

    It allows HR users to see users information about the employee company car without
    having access to the whole fleet module.

14/ hr_contract: Add next activities on contracts

    It makes sense to plan activities on contracts like renewals, signatures, ask missing information,...
2018-05-04 09:54:28 +02:00
Yannick Tivisse 348447923a [IMP] fleet: Improve stages demo data
Remove the old one and defined stages that are more realistic.
2018-05-04 09:47:05 +02:00
Yannick Tivisse 9edc477b31 [IMP] hr_contract: Add a access right group on contracts
Some private information are on the contracts. Add a special group to display the
contracts, independant of the other HR access rights.
2018-05-04 09:47:00 +02:00
Yannick Tivisse 4117f346af [IMP] hr_contract: Add 'reported_to_secretariat' field on contracts
Informative field to be greened when the related information is sent to
the secretariat or the government.
2018-05-04 09:46:22 +02:00
Yannick Tivisse 60527f9b6d [IMP] l10n_be_hr_payroll: Use the adapted wage as basic salary on payslips
It's possible to take more holidays days than the allowed legal days.

In that case the effective wage is the 'wage_with_holidays'.

This specific wage should be used as basic salary when computing the payslip.
2018-05-04 09:44:59 +02:00
Yannick Tivisse df532c52b3 [IMP] l10n_be_hr_payroll: Track visibility onchange on wage_with_holidays 2018-05-04 09:44:53 +02:00
Yannick Tivisse a29b86e74c [IMP] l10n_be_hr_payroll: Remove cars domain on contracts
Doesn't make sense to restrict the available cars on backend.

A HR user is supposed to know what he does.
2018-05-04 09:44:22 +02:00
Yannick Tivisse 66f2a240e2 [IMP] l10n_be_hr_payroll: Rename 'Total Employer Cost' into 'Employee Budget' 2018-05-04 09:44:21 +02:00
Yannick Tivisse 10b4b54a52 [IMP] hr_contract: Add 'active' field on contracts
Add the possibility to archive contracts.
2018-05-04 09:44:04 +02:00
Yannick Tivisse ddecb3ef8a [IMP] l10n_be_hr_payroll: Remove unnecessary field dependencies
Since https://github.com/odoo/odoo/commit/2304edd46cc12aaef4fddaa22887ff51f51581bc,
the total_depreciated_cost field on the fleet.vehicle is stored.

This commit removes the field dependencies that are not useful anymore.
2018-05-04 09:44:01 +02:00
Yannick Tivisse cc60a3677b [IMP] l10n_be_hr_payroll: Allow to use several transport mode
It should be possible to use several transport mode between
- A company car
- A public transportation
- Another transport mode

This commit split the selection field into 3 boolean fields.

The payroll rules have to be modified too to take all the costs into account
on payslips.
2018-05-04 09:43:18 +02:00
Yannick Tivisse 951eebb26c [IMP] hr_contract: Rename 'Contract Type' into 'Employee Category' 2018-05-04 09:43:15 +02:00
Yannick Tivisse 0e7828151d [IMP] l10n_be_hr_payroll: Introduce a new 'Intellectual Property' advantage
Intellectual property rights guarantee their holders a temporary and territorially
restricted, exclusive exploitation of their intellectual property. This monopoly
stimulates innovations that are indispensable for economic growth, but can go against
the right of free competition which is indispensable for the free market economy.
2018-05-04 09:40:44 +02:00
Yannick Tivisse f9b7079b95 [IMP] l10n_be_hr_payroll_fleet: Add company car information on employee contracts
It makes sense to display this piece of information on the employee contract.

It allows HR users to see users information about the employee company car without
having access to the whole fleet module.
2018-05-04 09:40:07 +02:00
Yannick Tivisse f63f0d410c [IMP] hr_contract: Add next activities on contracts
It makes sense to plan activities on contracts like renewals, signatures, ask missing information,...
2018-05-04 09:39:36 +02:00
Yannick Tivisse 97889d20c4 [IMP] base: Add a new module category 'Document Signatures' 2018-05-02 15:03:25 +02:00
Thibault Delavallée 635932fe09 [MERGE][REF] mail: optimize a bit notification process and lessen query count
This merge cleans a bit code called during notification process to avoid
browsing / prefetching unnecessary data and optimize a bit performances.
Please see sub-commits for more details.

All performance tests in test_mail are improved. On overall community
runbot about 13K queries are gained with this merge.

This merge is linked to task ID 1838693. Closes #24374. Please also refer
to commit https://github.com/odoo/enterprise/commit/0a3ba658f18e03fd76caba86cba7be32d047f0a9 done in enterprise
that cleans a bit mobile notification code.
2018-05-02 11:46:06 +02:00
Thibault Delavallée c5c369355d [IMP] mail, mass_mailing: clean mail body processing and mail sent post processing
Purpose is to lessen query count by avoiding to browse and/or fetch data when
not necessary. This commit does two main things

 * first one is to avoid checking for existing statistics in mass_mailing
   where only checking existing of a mass_mailing on a mail to send is
   sufficient. It allows to avoid fetching data from statistics table;
 * second one is to rewrite part of the post_process code called after sending
   emails. Using list comprehension and mailing_id existence on mail_mail
   allows to save several queries on standard post flows;

Most tests benefit from this code update. On overall community runbot about
3K queries are saved with those small optimizations.
2018-05-02 11:42:24 +02:00
Thibault Delavallée 0603dab655 [IMP] test_mail: update top counters due to enterprise update.
mail_push module in enterprise was adding too much extra queries. mail_push
being auto-install in enterprise mail performance tests were done with its
overhead taken into account. Commit done in enterprise cleaned a bit the code
to lessen mail_push impact allowing to lessen some top counters. Community
runbot counters are now nearer enterprise-based counters.

This commit is related to enterprise commit https://github.com/odoo/enterprise/commit/0a3ba658f18e03fd76caba86cba7be32d047f0a9 .
2018-05-02 11:41:27 +02:00
Thibault Delavallée 058d2fd4f6 [REF] mail: shortcut chat notification if no one to notify
Well, it seems we gain a lot of query when avoiding to format a message we
actually don't have to send on any bus. Cheers.

Formatting message for bus notification is quite costly as it has to fetch
data from message, partner, attachments, subtypes, ... meaning a lot of
queries. With this commit we avoid calling that method when not necessary.

It allows a gain of queries in simple cases when no-one has to be notified
as shown in the performance counters. On overall community runbot about 9K
queries are saved which is not bad for a 2-lines commit.
2018-05-02 11:39:57 +02:00
Thibault Delavallée c832452590 [IMP] mail: update subscription instead of unlink / create new followers
In some cases when subscribing followers code may ask to force subtypes
of the subscription. It means existing followers should have only asked
subtypes independently from existing subtypes. Previously it was done
by unlinking and creating new followers for same partner or channel.
This commit proposes to instead update missing subtypes and remove extra
subtypes.

It has a small impact in real life as forcing subtype is not done often.
Some tests are improved thanks to this commit. This commit is linked to
task ID 1839043. Closes #24417.
2018-05-02 11:18:22 +02:00
Vincent Schippefilt 151594af05 [DOC] web: client actions must be AbstractAction 2018-05-02 09:26:50 +02:00
Jaykishan Solanki b34f26406f [IMP] sale_order_dates, sale_stock: change dates computation
In order to make the module more userfriendly:
  - Some labels have been changed/added
  - The Commitement date is now called the Expected date
  - The Requested date becomes the Commitement date
  - The Effective date is now related to the picking `date_done`

Task #34343
Closes #18325
2018-04-30 17:41:53 +02:00
jem-odoo 2ebf703420 [MOV] purchase: split code in right file to fit guidelines
No code changes, simply move them to the right places,
the place where they should be.
This will ease the split between stock and purchase
addons.
2018-04-30 17:19:38 +02:00
Kishan Gajjar 28d763f4b3 [FIX] website_sale: properly compute scss files
In LESS, writing `100% / 4` gives `25%`.
In SCSS, to get `25%` the operation must be wrapped with parenthesis.
This commit is even using a better method: using the `percentage`
function.

Closes https://github.com/odoo/odoo/pull/24501
2018-04-30 15:46:18 +02:00
Sanjay Jamod 7862b2b71c [IMP] website_event: quick add to Outlook/Google Calendar
In order for the user to easily add the date of the events to his
calendar we need to facilitate the integration with Outlook/ Google
Calendar.

For this we add two buttons at the end of the subscription phase (one
for Google Calendar and one for Outlook [ics file download])

Task ID: 39315
Closes #21854
2018-04-30 10:58:20 +02:00