Commit Graph
109422 Commits
Author SHA1 Message Date
Christophe Matthieu 9da93dc232 [FIX] web: prevent record creation in M2O with option {'no_create': True}
before this fix, if you enter a random string and exit focus you'll be
prompted to create it.
2017-04-28 11:32:05 +02:00
Christophe Matthieu 76e6a0e356 [DOC] web: add documentation to use calendar
The calendar view was changed with the new view, but the documentation
was not updated.
2017-04-28 11:32:05 +02:00
Aaron Bohy 402a50cc95 [FIX] web: ListView: groupby selection field at level 2
Before this rev., there was a traceback when grouping a list view
by a, e.g., many2one field, and then by a selection field. It
crashed when formatting the title of the group, because the type
of the grouped field was incorrectly determined (it selected the
type of the inner grouping level, not the current one). For
instance, it tried to format a many2one like if it was a selection.
2017-04-28 10:33:58 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Aaron Bohy c5579ef89e [FIX] web: FormRenderer: notebook and invisible pages
When switching between records, the active tab of the previous
record is made active on the new record.

However, before this rev., this was done without checking that
this tab is still visible on the new record (there may be an
invisible attrs that makes it invisible), so it happened that
the active tab was actually invisible.

This was for instance the case when switching between stock
pickings, as the first tab ('Operations') is sometimes hidden.
2017-04-28 08:28:57 +02:00
Géry Debongnie 627da0503b [FIX] web: fix two issues when discarding records
This commit actually fixes a few problems:

1. the _visitChildren method in the basic model was not following the
changes, only the data, so it was not correct (for example, the isDirty
method was wrong for relational data, when no other change was done)

2. new records could not be discarded, because they had no data in their
data key. What we do here is to add a savePoint, so it is safe to
restore them (it caused a crash)

3. the save method was not properly following children when it was
called with the option savePoint=true

4. when the user tried to discard a form view, in an action with only a
form view, it was redirected to the previous url (via the history_back
action), instead of simply discarding the current form view
2017-04-27 22:00:20 +02:00
Pierre Masereel bac3eeb9e5 [IMP] maintenance: filter my_requests
We changed the field on which 'My requests' filter is applied from
'owner_user_id' to 'technician_user_id' because a normal employee who
has requests only see the ones he owns, and the responsible of
requests should be able to easily see the ones he's assigned to.
2017-04-27 17:38:15 +02:00
Pierre Masereel 12ca853392 [IMP] maintenance: reporting links and menu items
As the reporting on maintenances by team is already available through a
filter on requests and just show the pivot view, we added the the menu
item 'Reporting' and a link in kaban record of maintenance team to
redirect to the pivot view.
2017-04-27 17:38:15 +02:00
Haresh Shyara e55025f4bc [IMP] maintenance : views update
This commit modify the kanban card for maintenance requests/team:
For maintenance request:
Kanban view:
- Move the star priority from right to left
- Add the text 'request by' before the field owner_user_id
- Add the field for the technician with the text 'responsible'
- The image is the responsible and not the owner anymore
Forw view:
- Change the label for name from 'Subject' to 'Name'
- Change the placeholder for name from 'Maintenance Subject' to 'Maintenance Request'
- Request date field is read only and set to the date where the request is created
- Close date is read only and set when the request is in a done state
- Category is invisible if the related equipment has no category.
- Disable creation and opening maintenance team from the form view.
For maintenance team (dashboard):
- To Do button filter requests on their state
- Team name link to maintenance requests belonging to the corresponding team

Technically, there are just basic changes in the view.
2017-04-27 17:38:15 +02:00
Haresh Shyara 9e9d9e6490 [IMP] maintenance : team form and team members
This commit changes the maintenance team:
-In the form view -> replace Category name by Team name
-Replace the partner by a many2many with users
-Display the from view instead of editable list view of teams

In the model, the partner field is replaced by member_ids.
However this field is never used except in the form view.
2017-04-27 17:38:15 +02:00
Haresh Shyara e98f28671f [IMP] maintenance : add unscheduled maintenance
The feature added is a count of todo request that has no schedule date.
It will also add a link in the team dashboard that redirect to all
mainenance requests without a scheduled date.

The count is computed in the existing function '_compute_todo_requests'.
It will count requests that are not done and have no scheduled date.

This commit also modify the view and add the default filter 'unscheduled'
(created by a previous commit) for the action
'hr_equipment_todo_request_action_from_dashboard' which opens the maintenance
request for the active team.
2017-04-27 17:38:15 +02:00
Haresh Shyara 441f934d41 [IMP] maintenance : responsible added as follower
This commit add the following feature :
Add the responsible and the owner of the maintenance request as
follower.

This commit creates a new method that adds as follower the responsible and/or
the owner. This method is triggered in the create and in the write if they
are modified.

It will not remove old responsible or owner from the chatter.
2017-04-27 17:38:14 +02:00
Martin Geubelle 1690f317ba [FIX] mrp: adapt mrp_time_counter fields widget
This widget behaviour hadn't correctly implemented with the new views.
This commit also introduces some tests.
2017-04-27 16:56:48 +02:00
Martin Geubelle 5a78f4bad7 [FIX] mrp: adapt bullet_state field widget
This field widget has been adapted to the new views.
This commit also introduces some tests.
2017-04-27 16:56:47 +02:00
Martin Geubelle 5ec62a0b31 [FIX] mrp: reintroduce pdf_viewer field widget
This field widget has been adapted to the new views.
This commit also introduces some tests.
2017-04-27 16:56:47 +02:00
Martin Geubelle 67d7cbd06b [FIX] web: pass bin_size in context
When fetching record, `bin_size` needs to be passed in the context
to notify the server to send the `bin_size` and not the whole base64
of binary fields.
2017-04-27 16:56:47 +02:00
Martin Geubelle e4ac74450f [FIX] web, calendar: reintroduce many2manyattendee fields widget
This widget behaviour hadn't been correctly implemented with the new views.
This commit also introduces some tests.
2017-04-27 16:56:47 +02:00
Martin Geubelle 776cd64aa3 [FIX] web: BasicField: use getSession
`session` is not an field widget attribute anymore.
One should use `getSession` instead.

This commit also introduces tests for the `binary` field.
2017-04-27 16:56:46 +02:00
Martin Geubelle 0b3b34ae4c [FIX] web: rename supported_field_types
This key has been renamed `supportedFieldTypes` since the new views
but has been wrongly forward-ported in 2e540eb.
2017-04-27 16:56:46 +02:00
Martin Geubelle 9eb4f1e017 [FIX] web: Kanban: reload record after call_button
The callback function of `execute_action` is called `on_closed` (and not
`on_close` as previously written).
2017-04-27 16:56:46 +02:00
Aaron Bohy 33de67a011 [REF] web: FormRenderer: extract _renderHeaderButtons
... function to ease extensions and overrides (especially, an
override in web_enterprise).
2017-04-27 15:53:16 +02:00
Aaron Bohy 790206d12c [FIX] mail: followers: don't list followers twice
Before this rev., if concurrent calls to 'read_follower' were
performed, it might happen that the read followers appearead twice
in the follower dropdown.

This was for example the case when validating an invoice: the
customer was listed twice as follower.

Note: in this particular case, the record shouldn't be reloaded
twice: this is another bug to adress.
2017-04-27 15:53:16 +02:00
Aaron Bohy 7dab370a06 [REF] web: relational fields: FieldStatus
Moves back the mobile rendering part of the FieldStatus to
enterprise, alongside all other tweaks to improve the UX in mobile.

This part had been moved to community inadvertendly in the new
views branch.
2017-04-27 15:53:16 +02:00
Christophe Simonis dd6a071dbf [FIX] account: use compat module to comparing integer types 2017-04-27 15:36:22 +02:00
xmo-odoo fdaf967bb0 [FIX] forgot a bit of version checking 2017-04-27 15:03:28 +02:00
Christophe Simonis 22e50c66f1 [MERGE] forward port branch saas-15 up to f265359187 2017-04-27 14:56:21 +02:00
Christophe Simonis f9897492e1 [FIX] payment_ogone: ogone expect the amount to be an integer
Oversight of python3 compat changes made at 2e6a589f41
2017-04-27 14:35:01 +02:00
Thibault Delavallée a7eeba30f9 [IMP] hr: ease search and use of department full name
Like product categories.
2017-04-27 14:13:09 +02:00
Thibault Delavallée b1a8cf2e27 [IMP] product: ease manipulation of categories full name
This commit proposes to store the complete name of a product category.
It is formatted like parent.name / name, recursively. Storing it and
using it as a rec_name allows to search products belonging to a category
or its child categories without having to rely on a strange hack of
name_get and name_search.

Searching on products having a category containing "all" will get results
from "all" category as well as "all / saleable", and so on.
2017-04-27 14:13:09 +02:00
Goffin Simon 76824f53a2 [FIX] base: Sequences in multicompany
The sequence set by function next_by_code for a company must be
either defined for this company or witn company specified on it.
In the other cases, the sequence "NEW" is used.
With courtesy of @odony

opw:728554
2017-04-27 14:08:56 +02:00
Yannick Tivisse 6a6f804f32 [FIX] l10n_be_hr_payroll: Only count car atn if company car selected
Yes, it makes sense
2017-04-27 14:05:26 +02:00
xmo-odoo 2e6a589f41 [FIX] builtins removed from Python 3
* Reverse wrapper courtesy of @rco-odoo's original P3 branch
* thin compat module stripped down from werkzeug (to augment as needed)

issue 8530
2017-04-27 13:59:33 +02:00
Christophe Simonis f265359187 [MERGE] forward port branch saas-14 up to bf23946e3d 2017-04-27 13:50:20 +02:00
Martin Trigaux de4a2216b9 [IMP] mail: change smiley
Critical improvement, 
`:)` was making a laughing guy that could be considered as mockery.
This smiley is way more friendly and should improve support feedback by at
least an order of magnitude better, maybe two.

Closes #16672
2017-04-27 12:29:47 +02:00
Christophe Simonis bf23946e3d [FIX] point_of_sale: do not read undefined fields
Oversight of previous forward-port.
2017-04-27 12:00:55 +02:00
Christophe Simonis 595b38fbdc [MERGE] forward port branch 10.0 up to 1faa4a74aa 2017-04-27 11:22:56 +02:00
Thibault Delavallée 14e74ca436 [MERGE] (hr_, sale_)timesheet: ease time tracking on employees (part I)
This commit merges various usability and business flow improvements
in time tracking application. Please refer to under-commits for more
details. Main changes are

 * simplify user experience when logging timesheets through UX, filters
   and menus improvements
 * log timesheets on employees instead of users

All tribute goes to @jem-odoo .
2017-04-27 10:40:56 +02:00
Jérome Maes 1113b951cb [IMP] hr_timesheet, sale: improve timesheet-related settings
Sale module now installs sale_timesheet module and not its auto-install
enterprise bridge. It seems more intuitive to installe real applications
and let bridges automatically install themselves.

Some wording is also improved to ease user experience through the various
timesheet related blocks of settings.
2017-04-27 10:35:52 +02:00
Thibault Delavallée 5d6090f718 [MOV] hr_timesheet: move department view inheritance in its view file 2017-04-27 10:34:51 +02:00
Jérome Maes 5f997fc2ef [IMP] hr_timesheet, sale_timesheet: log timesheet on employee
This commits mainly switches the semantic of timesheeting from users
to employees. Main points of this commit are :

 * add an employee_id field on timesheet;
 * replace user_id field by employee_id on timesheet views;
 * provide a stat button on employee form view to access its timesheets;
 * use timesheet cost as a real monetary field and handle currency
   conversion;

The purpose is to allow timesheet manager to record timesheet for
employees that are not users. All employees do not necessarily have an
user account in the system. Now you can record timesheet for your employee.
Hooray !

In sale_timesheet timesheet_cost is now a monetary field. Currency convertion
is also better taken into account when computing UPDATE ME

Timesheet details

 * add an invisible timesheet group on employee form view allowing to
   hook on it. Indeed sale_timesheet and timesheet_grid modules override
   this view to add information but have no other common module that
   hr_timesheet. Using an invisible group set as visible in those modules
   eases inheritance.

Sale timesheet details

 * timesheet_cost is now a monetary field
 * better display of timesheet_cost on employee form view, notably telling
   it is per hour
 * remove account_id field on employee as its only use was buggy and was
   mixing account.account and analytic.account records.
2017-04-27 10:34:51 +02:00
Jérome Maes a806f96fa2 [IMP] hr_timesheet: ease time tracking use of timesheets
Purpose of timesheet module is to track user time. This commit applies
various improvements and tweaking to better reflect this purpose.

This commit provides some UI improvements

 * improve views : user_id field is not displayed on 'My Timesheet'
   action, since it will always be the same user;
 * simplify menus : 'My timesheet' only for current user's timesheets
   and 'All timesheet' for everyone's. The latter one allows creating
   timesheets for someone else, if you have the required access rights;
 * add calendar views for timesheets
 * some filters are added to ease time-based filtering of timesheets

This commit also reorganizes user groups. Groups are now

 * new 'timesheet user' group (different from base.group_employee). Users
   can record their own timesheet. New access rights were added to perform
   the same operations as before.
 * 'timesheet manager' (hr_timesheet.group_manager). Users can record
   timesheets for other users, access to settings and reporting tools.
2017-04-27 10:34:51 +02:00
Jérome Maes b6beff86b7 [IMP] project: remove doc count on project kanban view and optimize task count
This commit removes document count on project kanban view. Indeed it
does not add much valuable information and bloats the kanban cards.

In order to keep the kanban card order, it was required to adapt all
inherited views. The order is 'task', 'issue', 'rating', 'timesheet'
and 'forecast'.

It also uses a read_group to better compute task count, by the way.
2017-04-27 10:34:51 +02:00
Jérome Maes aab2dc1431 [IMP] hr_timesheet: add name on res.config views to hook other views 2017-04-27 10:34:50 +02:00
Jérome Maes 8cda7998ed [IMP] resource: add 35 and 38h/week working hours calendars
This commit proposes to add 35 and 38 hours/week resource calendars.
Those are considered as standard for a lot of countries. This helps
users starting with odoo time tracking.
2017-04-27 10:34:50 +02:00
Sanjay Jamod afb3311059 [IMP] point_of_sale: allow to resume in cash control
When closing a session with cash control enabled, the session is no longer
directly closed and allows to resume selling.
This allow to have the same behaviour with cash control enabled or disabled
when clicking on the close button of the pos dashboard.

#15919
2017-04-27 10:22:23 +02:00
Géry Debongnie 51e9aba2cb [FIX] web: do_action should properly resolves when complete
We changed the do_action method recently: before, it was calling
recursively its parent, now it simply triggers up an event.  We also
moved it to the 'services' mixin.  However, we did not properly connect
the 'on_success' option: it is not an option for the view manager, but
for the abstract web client.  As such, it should not be in the options
parameter, but it should simply be a key in the event payload.

This commit was found by solving the two following issues:
- open sale application, click on 'Inbox' icon to go to discuss,
  Discuss is opened, but the navbar stays with sales application
- after installing module website_crm_partner_assign in kanban view for apps,
  it does not reload...

Both of these were caused by the need to do something after a do_action,
and the deferred was not resolved at all.
2017-04-27 09:24:59 +02:00
Nicolas Lempereur 1faa4a74aa Revert "[FIX] mass_mailing: revert typo forward port ed0233f"
This reverts commit 75d9674d4 and revert well 551719a81e which wass done
on mail.mass_mailing instead of mail.template (on which it should not be
done).
2017-04-27 08:34:33 +02:00
Nicolas Lempereur 75d9674d45 [FIX] mass_mailing: revert typo forward port ed0233f
This commit revert the change of 551719a8 forward ported in ed0233f.

The file and feature modified is not present after saas-11.
2017-04-27 08:15:37 +02:00
Christophe Simonis ed0233fb8a [MERGE] forward port branch saas-11 up to 3d35aef5b0 2017-04-26 20:07:32 +02:00
Christophe Simonis 3d35aef5b0 [MERGE] forward port branch 9.0 up to 283b648c18 2017-04-26 19:46:46 +02:00