Added sum total widget
This commit is contained in:
parent
781c561e51
commit
5057288b39
Binary file not shown.
|
@ -16,10 +16,6 @@ class ProjectMainenence(models.Model):
|
|||
name = fields.Char('Maintenance', required=True, ondelete="restrict")
|
||||
maintenance_type_id = fields.Many2one('project.maintenance.type', 'Manintenance Type', required=True, readonly=True, ondelete='cascade')
|
||||
|
||||
@api.model
|
||||
def default_get(self, fields):
|
||||
res = super(ProjectMainenence, self).default_get(fields)
|
||||
print("self._context.get('active_model')>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", res, self._context)
|
||||
return res
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<tree>
|
||||
<field name="maintenance_type_id"/>
|
||||
<field name="line_ids"/>
|
||||
<field name="total_amount" widget="monetary"/>
|
||||
<field name="total_amount" sum="Total" widget="monetary"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</tree>
|
||||
<form>
|
||||
|
|
Loading…
Reference in New Issue