change field string

This commit is contained in:
Pawan Kumar 2020-12-30 12:22:06 +05:30
parent 801e5d8b58
commit f109ecf82d
2 changed files with 12 additions and 9 deletions

View File

@ -37,17 +37,20 @@ class Project(models.Model):
"- Invited portal and all internal users: employees may see everything."
" Portal users may see project and tasks followed by\n"
" them or by someone of their company.")
allow_billable = fields.Boolean("Billable", default=True, help="Invoice your time and material from tasks.")
class InheritProjectProductEmployeeMap(models.Model):
_inherit = 'project.sale.line.employee.map'
employee_price = fields.Monetary(string="Consultant Price", related="employee_id.timesheet_cost", readonly=True)
budgeted_qty = fields.Float(string='Budgeted Qty', related='sale_line_id.product_uom_qty', readonly=True, store=True)
budgeted_qty = fields.Float(string='Budgeted Hours', related='sale_line_id.product_uom_qty', readonly=True, store=True)
budgeted_uom = fields.Many2one('uom.uom', string='Budgeted UOM', related='sale_line_id.product_uom', readonly=True)
#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')
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)
sale_line_id = fields.Many2one('sale.order.line', "Service", domain=[('is_service', '=', True)])
def _compute_timesheet_hour(self):
for val in self:

View File

@ -57,22 +57,22 @@
<tree editable="top">
<field name="company_id" invisible="1"/>
<field name="project_id" invisible="1"/>
<field name="employee_id" options="{'no_create': True}" string="Consultant"/>
<field name="timesheet_product_id"
<field name="employee_id" options="{'no_create': True}" string="Consultant Name"/>
<field name="timesheet_product_id"
attrs="{'column_invisible': [('parent.sale_order_id', '!=', False)]}"/>
<field name="sale_line_id" options="{'no_create': True}"
attrs="{'column_invisible': [('parent.sale_order_id', '=', False)]}"
domain="[('order_id','=',parent.sale_order_id), ('is_service', '=', True)]"/>
<field name="budgeted_qty" attrs="{'column_invisible': [('parent.sale_order_id', '=', False)]}"/>
<field name="budgeted_uom" attrs="{'column_invisible': [('parent.sale_order_id', '=', False)]}"/>
<!--<field name="budgeted_uom"
attrs="{'column_invisible': [('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="budgeted_qty"
attrs="{'column_invisible': [('parent.sale_order_id', '=', False)]}"/>
<field name="timesheet_hour"/>
<field name="employee_price" widget="monetary" options="{'currency_field': 'currency_id'}"/>
<!--<field name="employee_price" widget="monetary" options="{'currency_field': 'currency_id'}"/>-->
<field name="currency_id" invisible="1" readonly="1"/>
<field name="budgeted_hour_week"/>
</tree>
</field>
</page>