remove readonly after sale order confirm
This commit is contained in:
parent
240a35a227
commit
893481b6e2
|
@ -92,7 +92,9 @@ class InheritProjectProductEmployeeMap(models.Model):
|
|||
# budgeted_uom = fields.Many2one('uom.uom', string='Budgeted UOM', related='timesheet_product_id.uom_id', readonly=True)
|
||||
timesheet_hour = fields.Float("Timesheet Hour", compute='_compute_timesheet_hour', default=0.0)
|
||||
budgeted_hour_week = fields.Float("Budgeted Hours per week", compute='_compute_budgeted_hour_week')
|
||||
price_unit = fields.Float("Hourly rate", compute='_compute_price_unit', store=True, readonly=True)
|
||||
price_unit = fields.Float("Hourly rate")
|
||||
currency_id = fields.Many2one('res.currency', string="Currency", compute='_compute_price_unit', store=True,
|
||||
readonly=False)
|
||||
sale_line_id = fields.Many2one('sale.order.line', "Service", domain=[('is_service', '=', True)])
|
||||
cost = fields.Float("Cost", compute='_compute_total_cost')
|
||||
|
||||
|
|
|
@ -41,11 +41,8 @@
|
|||
widget="radio"/>
|
||||
<field name="budgeted_revenue"
|
||||
attrs="{'invisible': [('pricing_type','=','fixed_rate')], 'required': [('pricing_type','!=','fixed_rate')]}"/>
|
||||
<field name="expenses_per" attrs="{'invisible': [('pricing_type','=','fixed_rate')]}"/>
|
||||
<field name="expenses_amt" attrs="{'invisible': [('pricing_type','=','fixed_rate')]}"/>
|
||||
<field name="budgeted_hours"
|
||||
attrs="{'invisible': [('pricing_type','=','fixed_rate')], 'readonly': [('project_type','=','hours_in_consultant')],
|
||||
'required': [('pricing_type','!=','fixed_rate')]}"/>
|
||||
<field name="expenses_per" attrs="{'invisible': [('pricing_type','=','fixed_rate')]}"/>
|
||||
<field name="expenses_amt" attrs="{'invisible': [('pricing_type','=','fixed_rate')]}"/>
|
||||
<div class="o_td_label"
|
||||
attrs="{'invisible': ['|', '|', ('allow_timesheets', '=', False), ('sale_order_id', '!=', False), '&', ('pricing_type', '!=', 'fixed_rate'), ('bill_type', '!=', 'customer_task')]}">
|
||||
<label for="timesheet_product_id" string="Default Service"
|
||||
|
@ -72,14 +69,13 @@
|
|||
domain="[('order_id','=',parent.sale_order_id), ('is_service', '=', True)]"/>
|
||||
<field name="price_unit" widget="monetary" options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'readonly': [('parent.sale_order_id', '!=', False)]}"/>-->
|
||||
<field name="price_unit" widget="monetary" options="{'currency_field': 'currency_id'}"
|
||||
attrs="{'readonly': [('parent.sale_order_id', '!=', False)]}"/>
|
||||
<field name="price_unit" readonly="0"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="budgeted_qty"
|
||||
attrs="{'readonly': [('parent.project_type', '=', 'hours_no_limit')]}"/>
|
||||
<field name="cost"/>
|
||||
<field name="timesheet_hour"/>
|
||||
<field name="budgeted_hour_week"/>
|
||||
<field name="currency_id" invisible="1" readonly="1"/>
|
||||
<!--<field name="timesheet_product_id"
|
||||
attrs="{'column_invisible': [('parent.sale_order_id', '!=', False)]}"/>-->
|
||||
<!--<field name="budgeted_uom"
|
||||
|
@ -89,17 +85,31 @@
|
|||
<!--<field name="employee_price" widget="monetary" options="{'currency_field': 'currency_id'}"/>-->
|
||||
</tree>
|
||||
</field>
|
||||
<!--<field name="sale_line_employee_ids" attrs="{'invisible': ['|', ('bill_type', '!=', 'customer_project'), ('pricing_type', '!=', 'employee_rate')]}">
|
||||
<tree editable="top">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="project_id" invisible="1"/>
|
||||
<field name="employee_id" options="{'no_create': True}"/>
|
||||
<field name="timesheet_product_id" attrs="{'column_invisible': [('parent.sale_order_id', '!=', False)]}" invisible="1"/>
|
||||
<field name="sale_line_id" attrs="{'required': True}" options="{'no_create': True}" domain="[('order_id','=',parent.sale_order_id), ('is_service', '=', True)]"/>
|
||||
<field name="price_unit" widget="monetary" force_save="1" options="{'currency_field': 'currency_id'}"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>-->
|
||||
<group attrs="{'invisible': [('pricing_type','=','fixed_rate')]}">
|
||||
<group>
|
||||
<field name="total_expenses"/>
|
||||
<field name="profit_amt"/>
|
||||
<field name="profit_per"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cost"/>
|
||||
<field name="hourly_rate"/>
|
||||
<field name="budgeted_hour_week"/>
|
||||
</group>
|
||||
<field name="budgeted_hours"
|
||||
attrs="{'invisible': [('pricing_type','=','fixed_rate')], 'readonly': [('project_type','=','hours_in_consultant')],
|
||||
'required': [('pricing_type','!=','fixed_rate')]}"/>
|
||||
<field name="total_expenses"/>
|
||||
<field name="profit_amt"/>
|
||||
<field name="profit_per"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cost"/>
|
||||
<field name="hourly_rate"/>
|
||||
<field name="budgeted_hour_week"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
|
|
Loading…
Reference in New Issue