Commit Graph
1906 Commits
Author SHA1 Message Date
Rémy Baranx (bar) 4f805e2af1 [FIX]: hr_timesheet: allow_timesheet_timer wrongly set at project creation
The 'allow_timesheet_timer' field should not have a default value as it is
computed according to the 'allow_timesheets' field value.

Some tests have been added to check the coherency between 'allow_timesheets'
and 'allow_timesheet_timer' fields, at project creation and update.

closes odoo/odoo#46692

Taskid: 2206820
Related: odoo/enterprise#8923
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-03 12:37:27 +00:00
Rémy Baranx (bar) 880d0fc500 [IMP] hr_timesheet: clean duration format in the portal
The duration format for timesheet durations has been set to "00:00"

closes odoo/odoo#46289

Related: odoo/enterprise#8787
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-25 14:03:34 +00:00
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
Rushi Sathawar 90075be373 [IMP] hr_timesheet: improve the timesheet tree view.
Purpose of the task is to improve the list view of timesheet.
so the description(name) field should no longer be required in the
list view and move the Description(move) field to the right of
the task one in list view.

As field is required at python and display as _rec_name on
analytic line so if value is blank then we should fill the
value with the '/'.

task-2176065
closes #44101

Related: odoo/enterprise#8001
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-12 14:16:03 +00:00
Okan SUMER (osu) 3bcef3a050 [IMP] hr_timesheet: Adapt timer with new timer mixin
Purpose
=======

Now that we have a new timer mixin that offers more possibilities
than what was currently implemented, we can reuse it in the timesheet
management module.

TaskID: 2149450
2020-02-05 16:44:37 +01:00
Martin Trigaux 65530dfd6a [ADD] *: add ir.model.access on all transient models
Following changes needing ir.model.access on transient models too.
Remove groups declaration on the action to move it to ir.model.access
when possible.
Rules are strict by default with no unlink access by default and high
priviledge asked. Adaptations may be needed later.
Write access is given as a wizard may need to be modified in case the
action triggers an error and the user has to correct a value

account*: use account.group_account_user for all transient by default
	  remove account.print.journal relic
stock*: use stock.group_stock_user by default
survey: survey user can send invitations
mail: allow any employee to execute wizards
      additional verifications are made to ensure they are executed
      only on the documents the user has access to you
      give portal access to mail.compose.message as portal still does
      some actions like posting messages on the forum
      add ir.rule to avoid reading somebody else messages
      increase the query count because of undeterminist count
crm: saleman for lead2opp, manager for massmailing
     partner manager for actions linked to partners
     avoid a write in test_lead_lost
sms: any employee can send sms
mrp: mrp user can execute wizards
     give unlink access as making write during do_produce operation
base_import: employees can import files
delivery: stock user can deliver
event_sale: sale user can configure the wizards
	    event user inherit from  sale rights
gamification: employee can give badge
google_service: resolve FIXME
hr: add specific rights
    manager can set a plan according to group on button
    anyone who can write on an employee can register a departure
hr_expense: set rights based on buttons
hr_holidays: an approver can make a summary report
hr_recruitment: recruiter can refuse a candidate
hr_timesheet: can use the wizard if can create a timesheet
l10n_eu_service: managers can create fiscal positions
mass_mailing: same group as on mass.mailing.list
membership: accountant can create invoice from membership
payment: accountant can create a link
	 as the source is an account.move
	 keep the payment.acquirer.onboarding.wizard to system user
	 only as it is called during company configuration
point_of_sale: PoS manager only can use wizards
	       never create closing_balance_confirm_wizard records
product_expiry: stock user has rights on stock.picking
product_margin: access from accounting menus
repair: same rules as for above models
sale: set ir.rule for self wizard only
      add rule from model introduced in payment to add salesman group
sale_crm: saleman can create a quotation from a lead
sale_coupon: any saleman can generate coupon
	     add self ir.rule
sale_product_configurator: salesman can select product variants
snailmail: employee can send letters
website: designers can write on website
website_crm_partner_assign: same rule as group on action
website_sale: sale ACL as for payment.acquirer.onboarding.wizard
website_slides: anyone can send invitation

base: base.language.*: allow employee (cf lang_install)
      change.password.user: can not read change password wizard of
      other users
      test.*: no access is needed

Courtesy of Damien Bouvy, William Andre and Antoine Prieëls for review
of acl
2020-02-04 17:54:18 +01:00
Lucas Lefèvre ac8c30beec [IMP] hr_timesheet, sale_timesheet: Set task analytic account
Purpose
=======

Currently, it is only possible to set an Analytic Account for a whole Project, there
is no distinction by task. However, if the user has 1 task per customer, he cannot
track the costs and revenues for that specific customer easily. He has to manually
change the AA of the timesheets' analytic lines. An option would be to set a
different AA on the SO generating the task, but the AA of the project takes over
anyway.

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

If the user sets an AA on the SO, it should bypass the one set on the project
Add an AA field below the Email cc one on tasks in debug mode
- should be related to the AA field from the SO
- it should also bypass the AA set on the project
All the timesheets from this task should be related to the AA field set on the SO/Task

closes odoo/odoo#40844

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-31 11:02:14 +00:00
Kevin BaptisteandYannick Tivisse 2ac06038dd [IMP] project, industry_fsm: Improve subtasks and configuration UX
Purpose
=======

In Project, the configuration has to be done twice: in the settings of the
app and on each project.

During the onboarding, the user won't understand that a feature has to be
enabled at both places and will think that the system just doesn't work.

If the user enabled a feature, he most likely intends on using it for most
of his projects. Therefore, having to do a double configuration for each
new project is annoying.

By the way, sub-tasks is the only global feature (it can't be enabled or
disabled by project), so we are breaking it down by project to remain
consistent with the rest.

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

1/ Enable subtasks per project
Before this commit, sub-tasks were a global feature (i.e. once enabled
they were enabled for all projects). This commit gives the ability to
enable/disable sub-tasks per project.

2/ Make project_id on planning required

3/ Change default rating status on new projects

4/ Default value for allow_subtasks

5/ Enable timesheets on existing projects

6/ Hide Total Hours if subtasks are disabled

7/ Create project in the company context.
Otherwise some records generation could use a default company which is not
the company for which we want to create a project.

8/ Default value for allow_forecast, is_fsm

9/ Change reference to timesheet product

10/ Fix tracback on industry_fsm_report.
Before this commit, there was a traceback when enabling "Worksheets"
(industry_fsm_report) after "Time and Material" (industry_fsm_sale).

11/ Convert some onchange method into computed editable stored fields

closes odoo/odoo#41218

Taskid: 2146474
Related: odoo/enterprise#6998
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2020-01-31 15:35:54 +00:00
jbm-odoo ffe324877d [IMP] timesheet: Improve timesheet report
Some small improvements in timesheet report view.
In measures of graph, take string attribute into account.

closes odoo/odoo#41348

Taskid: 2149371
Related: odoo/enterprise#7041
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-28 10:28:33 +00:00
laaandYannick Tivisse 7e09f931ff [IMP] hr_timesheet,industry_fsm: Display CTA buttons with computed fields
Purpose
=======

The various buttons in FSM are currently displayed based on a set
of attributes. As there are many different configurations possible
for projects, it makes a lot of conditions (= the code is a living
nightmare). This task aims at replacing these attributes by computed
fields in order to gain clarity and to avoid the various bugs we
recently faced + add python tests to ensure their robustness.

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

START/STOP/PAUSE/RESUME
-----------------------

- should not be visible if the task is marked as done
- should be visible in non-primary if Time > 0
- should be visible in primary if Time = 0
- when the timer is running, do not display the following
  buttons: Create Sales Order, Mark as done, Create Invoice,
  Sign report, Send report
- only visible if the 'Timesheet Timer' feature is enabled
  on the project

SIGN REPORT
-----------

- should not be visible
    - if Time = 0 AND Worksheet = 0 AND Products = 0
    - OR if the report already is signed
- should be visible in non primary if Time > 0 OR
  Worksheet > 0 OR Products > 0
- should be visible in primary if Time > 0 AND Worksheet > 0
  AND Products > 0
- once the report is signed, display an 'fa-globe Customer Preview'
  stat button redirecting to the webpage with the report
- only visible if the 'worksheets' feature is enabled on the project

SEND REPORT
-----------

- should not be visible if Time = 0 AND Worksheet = 0 AND
  Products = 0
- should be visible in non primary if Time > 0 OR Worksheet > 0
  OR Products > 0 OR if the report was already sent
- should be visible in primary if
    - Time > 0 AND Worksheet > 0 AND Products > 0
    - AND the report is signed
- only visible if the 'worksheets' feature is enabled on the project

MARK AS DONE
------------

- should not be visible if the task is marked as done
- should be visible in non primary if
    - Time > 0 OR Worksheet > 0 OR Products > 0
    - OR if Time = 0 OR Worksheet = 0 OR Products = 0
- should be visible in primary if Time > 0 AND Worksheet > 0 AND
  Products > 0
- only visible if is_fsm is true on the project

CREATE INVOICE
--------------

- should not be visible if the task is not marked as done OR if
  the SO linked to the task has the 'Fully invoiced' invoice status
- should be visible in non primary if the SO linked to the task has
  the 'Nothing to invoice' invoice status
- should be visible in primary if the SO linked to the task has one
  of the following invoice status: To Invoice, Upselling
- only visible if the Bill from tasks feature is enabled on
  the project

EXTRA QUOTATION + CREATE SALES ORDER
------------------------------------

no change of behavior

closes odoo/odoo#42508

Taskid: 2126857
Related: odoo/enterprise#6918
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2020-01-24 13:16:07 +00:00
Lucas Lefèvre 7bce19fa88 [IMP] sale_timesheet: Improve project overview UI
1)  Add the following stat buttons on the right of the Tasks one:
- (fa-tasks) Late Tasks: tasks whose deadline is exceeded (do not include tasks that
  don't have a deadline set)
- (fa-tasks) Tasks in Overtime: tasks whose Effective hours are strictly greater than
  their Planned hours (if the latter is stricly greater than 0)

2) Remove the sheet view (should be like financial reports)

3) Add an 'Other Revenues' metric under the Profitability section below 'To Invoice'
- It should represent all the revenues other than from timesheets linked to the analytic
  account of the project.
- Only visible if greater than 0

Task 2119567
2020-01-21 13:16:58 +01:00
Barad Mahendra d16aa4cd39 [IMP] (hr, sale)_timesheet, pad(_project): improve project general UX
Purpose fo the task is to improve the UX of timesheet, project and task.

Done the chages for below point:
  - improve the stage demo data to unified the project stage
  - on the task timesheet 'sub-tasks hours spent' should be clickable
and on click, it will display the list of subtask timesheet.
  - display in warning tasks for which Remaining Hours < 0 if Planned Hours > 0 in task list view
  - improve the settings of collabrative pad and planning and project form view

Task-2129052

closes odoo/odoo#41092

Closes: #41092
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-16 10:56:05 +00:00
Lucas Lefèvre 7059b177ee [IMP] project: Following a private project no longer required
=======
Purpose
=======

Currently for a user to be allowed to see a private project they must follow the
project. This means that they will be added as a follower of all new tasks in the
project which causes them to receive 1000000 notifications, especially if there are a
lot of tasks in a project.

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

1) Add an Employee m2m field on project next to 'Invited Employees'
    - only visible if the 'Invited Employees' option is selected
    - the project should only be visible to employees selected there (regardless if they
      are followers or not)
2) Add an Employee m2m field on tasks below the 'Email cc' one in debug mode
    - only visible if the 'Invited Employees' option is selected on the related project
    - should be pre-filled with what is set on the project
    - the task should be visible to employees selected there (regardless if they are
      followers or not)
3) Add a Portal users m2m field on project next to 'Portal users and all employees'
    - only visible if the 'Portal users and all employees' option is selected
    - the project should only be visible to portal users selected there (regardless if
      they are followers or not)
    - rename the option into 'Invited portal users and all employees'
4) Add a Portal users m2m field on tasks below the 'Email cc' one in debug mode
    - only visible if the 'Portal users and all employees' option is selected
    - should be pre-filled with what is set on the project
    - the task should be visible to portal users selected there (regardless if they are
      followers or not)
5) Following a project/task should not grant the user/employee the ability to see the
   project/task

Task 2031527

closes odoo/odoo#40505

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-14 16:26:32 +00:00
jdoutreloux 52ed0be17e [IMP] uom : remove 'measure_type' field
This removes the measure_type field which has become unused and
causes issues when users try to add new uom categories.

Task-2043927

closes odoo/odoo#41056

Related: odoo/enterprise#6945
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-13 11:19:17 +00:00
Xavier Morel b0d690ee7c [FIX] hr_timesheet: re-remove onchange-with-domain
Had been removed in 6c4ac28f33 but
re-introduced in 15e41f59c7 likely due
to an improper conflict resolution.

Task 2115472
2020-01-06 10:35:46 +00:00
Kevin Baptiste b7856d6ea7 [IMP] project: display remaining hours on tasks
The remaining hours on a task are now displayed unless there are no
planned hours defined.

 - Between 0 and 79%: green border
 - Between 80 and 100%: yellow border
 - Above 100%: red border

closes odoo/odoo#41222

Taskid: 2150121
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 07:45:13 +00:00
Siddarth Gajjar 23a5e99453 [IMP] hr_timesheet: rename Timer.js to timer_mixin.js.
- Before this commit file name is Timer.js which create issue in macOS
due to non case-sensitive harddisk partition. So file renamed to timer_mixin.js

closes #42232

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-20 09:06:36 +00:00
Yannick Tivisse 1bf2bfd2a1 [IMP] hr_timesheet: Small cleaning and linting 2019-12-19 17:21:17 +01:00
Xavier Bol (xbo) 954e428fc9 [MOV] hr_timesheet: move timer from timesheet_grid to hr_timesheet 2019-12-19 10:20:28 +01:00
Xavier Bol (xbo) 9a8aad356f [IMP] hr_timesheet: add empty list tooltip
TaskID: 2088586

In 'My Timesheet' menu, in grid view when there is no record, the view
displays an empty list tooltip. With this commit, the 'All Timesheets'
menu, the empty list tooltip is also used when no record is displayed.
2019-12-19 10:20:28 +01:00
Xavier Bol (xbo) d7d980b58b [FIX] hr_timesheet: unit_amount not editable when timer is running
TaskID: 2088586
2019-12-19 10:20:28 +01:00
Xavier Bol (xbo) 2d3a44e6bd [FIX] hr_timesheet: problem desynchronization time between server and client
TaskID: 2088586

When we launch the timer, if the clock of the client isn't correctly synchronize
with internet, we can't correctly display the timer,
because the clock of the server can be in advance.

The solution is to call the server to have this time and use the timer
only with the time of the server.
2019-12-19 10:20:27 +01:00
Xavier Bol (xbo) 15e41f59c7 [MOV] hr_timesheet: move timer from timesheet_grid to hr_timesheet
TaskID: 2088586

The timer use in project > task can be usable in community and not only in enterprise.

move timer constraint from sale_timesheet_enterprise to hr_timesheet
2019-12-19 10:20:27 +01:00
Xavier Bol (xbo) 2ace7893f0 [IMP] hr_timesheet: add by default "See own timesheets" group to user demo
TaskID: 2088586
2019-12-19 10:20:27 +01:00
Xavier Bol (xbo) 68851c0530 [IMP] sale_timesheet: improve project overview to match with the access rights of hr_timesheet module
TaskID: 2088586

Some changement in project overview to match with the access rights
in Timesheet.

When the user has the lowest access right, the user may not see the
timesheets of other users in the project overview. The total of hours
spent must be equal to the number of recorded hours. But the
remaining hour of the sale order must be corresponded to the reality
and not only depending of the record that the user may see.

Move the _domain_employee_id method from timesheet_grid into this
module. Because this method is used for project overview into
sale_timesheet module.
2019-12-19 10:20:27 +01:00
Xavier Bol (xbo) c9da157149 [IMP] hr_timesheet: add timer into list and kanban views for timesheets
TaskID: 2088586

Timer in the list and kanban views :
----------------------------------
In kanban and list views, It's possible to update the 'unit_amount'
field with a timer. The user can easily launch the timer in these views
for one of his timesheets.
One timesheet can be launched at the same time, when the user start a
timer for a timesheet and start another timer for another timesheet, the
first timer stop and the new timer start.

The timer is usable only if the encoding unit is 'Hours' and the
timesheet is not validated. To do this : a new computed field 'display_timer'
is created in account.analytic.line, this field is set to True is the
encoding unit is 'Hours'. With this field, we can easily hide and display
the timer in different views.

The user can only use the timer for his timesheets. Because the user
with the access rights to see all timesheets might launch and/or stop a timer of a
timesheet of other user. That is the timer must be accessed only in 'My Timesheets' menu.

Add pivot view for 'All timesheets' menu.

Creation a timer_mixin :
----------------------
With this timer mixin, we can have a generic timer to use in other
models that they need to use a timer like account.analytic.line and
project.task models
The timer in account.analytic.line model has changed to use the timer
mixin.

Specific behaviour of the timer :
-------------------------------
When the user use the timer and the minutes spent with the timer is less
than 1 minute, we don't add in unit_amount of timesheet. If the
unit_amount is equals to 0 and minutes spent of timer is less than 0.
Then the timesheet created by the timer is deleted because it is useless to
have a timesheet with unit_amount set on 0.

Misc :
----
Add some styles for the timer button and for the 'unit_amount' field when the
timer is running.

remove duplicated fields in tree view (record
id='timesheet_view_tree_user')
2019-12-19 10:20:27 +01:00
Xavier Bol (xbo) 2f20b9437a [IMP] hr_timesheet: Improve access rights
TaskID: 2088586

The low level access right is now "See my timesheets".
This access disallow to a user to view and manage the timesheets of others users.

When the visibility of a project is set on "Invited employees",
the users with the access rules : 'See my timesheet' and
'See all timesheets' can show the timesheets, if these users
follow the project.
2019-12-19 10:20:27 +01:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
MaxLarue 028768f288 [IMP] hr_timesheet,helpdesk: Display remaining hours on a task
Show the remaining hours to timesheet on tasks. Allows to quickly evaluate
task's state.

This  is done in the name_get of a task through a context key, because we
need this different name on some views, not all.

related task #1856139

closes odoo/odoo#33586

Related: odoo/enterprise#4400
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-10 09:15:17 +00:00
laa 9cfb6c05a4 [FIX] Portal : missing url args
on the portal:
- in Timesheets, when search something, the text of the search must remain displayed
- in Tasks, when search something, the text of the search must remain displayed
- in Purchase Orders, "Sort By" and "Filter By" selectors shouldn't change when going to next page
- in Timesheets, the "Group By" selector shouldn't change when going to next page

closes odoo/odoo#40278

Related: odoo/enterprise#6787
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 15:39:03 +00:00
Yannick Tivisse 4efe0e3b16 [IMP] hr_timesheet, project, hr_expense: Introduce multi-edit lists
closes odoo/odoo#40048

Taskid: 2078161
Related: odoo/enterprise#6633
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 11:29:18 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Yenthe666 78ae3da902 [IMP] *: set name element on main containers in configuration views
This will improve the extendibility of view inheritance

closes odoo/odoo#41398

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-09 10:38:59 +00:00
jbm-odoo 9f7c8d305e [FIX] project timesheet: Open task without timesheet rights
Before this commit:
If you have not at least the timesheet user right, you can't open
project task as a field in not present in the view.

After this commit:
You can open the task view

closes odoo/odoo#41229

Taskid: 2148606
Related: odoo/enterprise#6984
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-03 09:21:27 +00:00
Damien Bouvy d2b02cab29 [FIX] web,(various): don't pollute session_info for portal users
The `session_info` dictionnary is used to bootstrap some JS code client
side (usually in the backend). It includes relevant information, such
as some parameters key for the OdooBot onboarding, the Enterprise
subscription expiration alert, etc. to avoid triggering a lot of RPC
calls upon webclient start.

`session_info` is also called by the remote authentication mechanism
located at `/web/session/authenticate`, which can be used by external
mechanism to obtain a valid session remotely.

Revision odoo/odoo@8a28cc2 introduced the concept of cache keys for
some oft-requested data (such as menus, translations and dynamic qweb
templates) to avoid requesting them on each webclient start, since they
tend not to change often. Unfortunately, it introduced a read on the
ir.ui.menu model that raised an `AccessError` if the authenticating user
was not a member of the `base.group_user` group ('Internal' user type).

While fixing that issue, it became apparent that `session_info`
returns a whole lot of information through this remote connection route
which is entirely unnecessary if not used in the context of a webclient
start, such a currencies, the state of the enterprise subscription, etc.

This commit fixes the access right issue by removing this non-relevant
information from the returned dict (including cache keys) if the user
is not an internal one.

closes odoo/odoo#40770

X-original-commit: 6e99ac2c6cd5ca9af87b4fc7a3a1394359e30b02
Related: odoo/enterprise#6860
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-12-02 09:21:32 +00:00
Xavier Morel 6c4ac28f33 [FIX] hr_timesheet: remove onchange domain
Fixes issues where static multi-company filtering would get squashed /
replaced by dynamic domains not having those filters.

The conditional could be replicated in two ways: one would be to use a
python-level conditional expression:

    a if cond else b

this is easier for users to interpret, but harder to analyze: python
expressions are currently opaque to view analysis (and possibly
eventually to domain edition).

The alternative here is to leverage domain simplification:

    (OR (= (not cond) 1) section)

if `cond` is true becomes

    (OR (= 0 1) section)

and thus `section` itself, while if `cond` is false it becomes

    (OR (= 1 1) section)

and thus `true` (so the section doesn't apply).

It works OK though the inversion of the condition itself is a bit
bizarre.

And in this specific case since we need both branches the negated
condition requires explicitly converting the condition to a boolean if
it might not be one: the expression compiler recognizes specifically
`(= 0 1)` and `(= 1 1)` (`(= False 1)` and `(= True 1)` also work for
Python reasons).

[REM] dynamic domain from hr_timesheet

closes odoo/odoo#40945

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-29 12:02:57 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Yannick Tivisse f3f75068c1 [IMP] hr_timesheet: Add demo data
Add a bunch of timesheets for the 2 main demo projects in the project module
+ for one of the billable projects in sale_timesheet

closes odoo/odoo#40280

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-22 09:13:52 +00:00
laa 70c370b01e [IMP] project,hr_expense,hr_timeshee: Add optional fields in list view
Add and modify multiple fields in tree view for next next model:
- hr.expense
- hr.expense.sheet
- project.project
- planning.slot
- Field Service project.task

closes odoo/odoo#39441

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-18 12:56:10 +00:00
Odoo's Mergebot cfc65bd1b7 [MERGE] various: Make the test suite demo data independant
Purpose
=======

This is the first huge step to improve the test suite in several ways:

- Make them demo data independent, allowing to modify the demo data without having to adapt the tests depending on it. It also allows to have a beautiful + convenient demo dataset to make a demonstration, and to configure complex data in the tests to manage the corner cases.
- Improve the test performances by converting them into SavepointCase. Each test will be rollbacked to it's initial state, after the setUpClass call. That way the different data are not re-created at each test for nothing.
- Introduce several test classes in base/tests/common.py to launch a TransactionCase, HttpCase or SavepointCase test with an available demo user, portal user or a large set of partners.
- This is the first step to tend to a rolling release process, allowing to execute the tests (or a subset of the tests) on a migrated base, for example.

closes odoo/odoo#39868

Taskid: 2075739
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-07 08:37:12 +01:00
Yannick Tivisse f9381e0f36 [IMP] hr_timesheet: Adapt tests to work with/without demo data 2019-11-05 13:08:03 +01:00
Parth Choksi 6b67174063 [IMP] hr_timesheet: records creation in batches
*: hr_timesheet
   project_timesheet_holidays
   account

Creation of analytic lines will be done in batches instead of creating single
record by iteration. This optimization is done in order to speed up the creation.

task-1971460

closes odoo/odoo#34481

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-06 10:24:25 +00:00
Dharmraj Jhala 30b1af7937 [IMP] * : enable static string edition using report editor
*:
	delivery
	hr_timesheet
	mrp
	sale
	sale_coupon
	stock

This commit makes the static strings / labels editable with studio
by wrapping them in appropriate tag (mostly span) whenever needed.

Task-Id 2030430

closes odoo/odoo#34685

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-17 09:39:01 +00:00
Martin Trigaux 3a7bb6aefd [I18N] *: export 13.0 source terms
closes odoo/odoo#39118

X-original-commit: cfc887dc2032aac4f5894ade017dadab7a413557
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-21 12:12:48 +00:00
Jinal Patel 5288816bae [IMP] hr_timesheet: improve 'Timesheet Entries' Report
- If the Timesheet entries all belong to the same project, the report
  title should be
  "Timesheet Entries for the name of the project Project" and here in
  this case no need to show the project column.
- Split the Project - Task column into two separate ones: one for the
  Project and one for the Task

task-2027729

closes odoo/odoo#38684

X-original-commit: 96d3bd7560f43847c758d149eaab14ecc9206058
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-10-14 09:08:52 +00:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00