hi all iam using this module https://apps.odoo.com/apps/modules/10.0/manufacturing_indent/ in odoo 11 , it was working fine for some time but now its showing some errors when iam trying to approve indents in the module
Error:
Odoo Server Error
Traceback (most recent call last):
File "/odoo/intrans/odoo/http.py", line 653, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo/intrans/odoo/http.py", line 312, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/odoo/intrans/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/odoo/intrans/odoo/http.py", line 695, in dispatch
result = self._call_function(**self.params)
File "/odoo/intrans/odoo/http.py", line 344, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo/intrans/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo/intrans/odoo/http.py", line 337, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo/intrans/odoo/http.py", line 939, in __call__
return self.method(*args, **kw)
File "/odoo/intrans/odoo/http.py", line 517, in response_wrap
response = f(*args, **kw)
File "/odoo/intrans/addons/web/controllers/main.py", line 938, in call_button
action = self._call_kw(model, method, args, {})
File "/odoo/intrans/addons/web/controllers/main.py", line 926, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/intrans/odoo/api.py", line 699, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/odoo/intrans/odoo/api.py", line 690, in call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/intrans/addons/manufacturing_indent/models/manufacturing_indent.py", line 99, in action_assign
move_to_assign.action_assign()
AttributeError: 'stock.move' object has no attribute 'action_assign'
the function:
class MrpIndent(models.Model):
_name = "mrp.indent"
@api.multi
def action_assign(self):
for production in self:
move_to_assign = production.move_lines.filtered(lambda x: x.state in ('confirmed', 'waiting', 'assigned'))
move_to_assign.action_assign()
if self.origin.availability == 'assigned':
self.issued_date = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
self.state = 'done'
self.origin.write({'indent_state': 'done'})
return True
move_lines = fields.One2many('stock.move', 'mrp_indent_id', string='Moves', copy=False, readonly=True)
Someone tell me whats the issue with this code please !
anyone