Added sum total widget

This commit is contained in:
projectsodoo 2020-12-08 10:47:31 +05:30
parent 781c561e51
commit 5057288b39
3 changed files with 2 additions and 6 deletions

View File

@ -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

View File

@ -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>