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
…
2019-10-03 12:48:09 +00:00
…
2015-09-08 17:58:38 +02:00
2019-11-08 11:24:04 +00:00
2019-10-03 12:48:09 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%