[IMP] sale_timesheet: show prices with currency.

This commit is contained in:
Victor Feyens
2020-03-26 08:46:57 +00:00
parent a30cfee04e
commit efc2d0e2cc
2 changed files with 3 additions and 1 deletions
@@ -18,6 +18,7 @@ class ProjectProductEmployeeMap(models.Model):
employee_id = fields.Many2one('hr.employee', "Employee", required=True)
sale_line_id = fields.Many2one('sale.order.line', "Sale Order Item", domain=[('is_service', '=', True)], required=True)
price_unit = fields.Float(related='sale_line_id.price_unit', readonly=True)
currency_id = fields.Many2one(related="sale_line_id.currency_id")
_sql_constraints = [
('uniqueness_employee', 'UNIQUE(project_id,employee_id)', 'An employee cannot be selected more than once in the mapping. Please remove duplicate(s) and try again.'),
@@ -21,7 +21,8 @@
<tree editable="top">
<field name="employee_id" options="{'no_create': True}"/>
<field name="sale_line_id" options="{'no_create': True}" domain="[('order_id','=',parent.sale_order_id), ('is_service', '=', True)]"/>
<field name="price_unit"/>
<field name="price_unit" widget="monetary"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</page>