mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[ADD] timesheet_exception: timesheet created should not exceed 8 in spent hours
H11047
This commit is contained in:
22
timesheet_exception/demo/timesheet_exception_demo.xml
Normal file
22
timesheet_exception/demo/timesheet_exception_demo.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="except_unit_amount_over_eight_hours" model="exception.rule">
|
||||
<field name="name">Unit amount exceeds 8 hrs</field>
|
||||
<field name="description">Unit amount over 8 hrs</field>
|
||||
<field name="sequence">50</field>
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="code">if timesheet.unit_amount > 8: failed=True</field>
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="except_unit_amount_over_ordered_quantity" model="exception.rule">
|
||||
<field name="name">SO delivered qty plus unit amount exceeds ordered qty</field>
|
||||
<field name="description">SO delivered qty plus unit amount exceeds ordered qty</field>
|
||||
<field name="sequence">50</field>
|
||||
<field name="model">account.analytic.line</field>
|
||||
<field name="code">if timesheet.so_line.product_template_id.service_policy == 'ordered_timesheet' and timesheet.so_line.qty_delivered + timesheet.unit_amount > timesheet.so_line.product_uom_qty: failed=True</field>
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user