i have try to add custom filed in sale order line
Here is my .PY
class CustomSaleOrderLine(models.Model):
_inherit = 'sale.order.line'
_totalweight = fields.Float(string="Total Weight",compute='_totalweight')
@api.multi
def _totalweight(self):
self._totalweight = 15.00
What i am trying to achieve is that i take the value order of product qty and multiply it by 5
I am doing it right way ? but how ever i expected to see this
File "/odoo/odoo-server/addons/sale_order_line_custom/models/models.py", line 8 _totalweight = fields.Float(string="Total Weight",compute='_totalweight') ^ IndentationError: unexpected indent
But i think in my code i dont think there is anything wrong with indentation
Please help