cth-odoo

Untitled

Jun 17th, 2021
643
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Erreur:
  2. Odoo Server Error
  3.  
  4. Traceback (most recent call last):
  5.   File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
  6.     result = request.dispatch()
  7.   File "/home/odoo/src/odoo/odoo/http.py", line 683, in dispatch
  8.     result = self._call_function(**self.params)
  9.   File "/home/odoo/src/odoo/odoo/http.py", line 359, in _call_function
  10.     return checked_call(self.db, *args, **kwargs)
  11.   File "/home/odoo/src/odoo/odoo/service/model.py", line 94, in wrapper
  12.     return f(dbname, *args, **kwargs)
  13.   File "/home/odoo/src/odoo/odoo/http.py", line 347, in checked_call
  14.     result = self.endpoint(*a, **kw)
  15.   File "/home/odoo/src/odoo/odoo/http.py", line 912, in __call__
  16.     return self.method(*args, **kw)
  17.   File "/home/odoo/src/odoo/odoo/http.py", line 531, in response_wrap
  18.     response = f(*args, **kw)
  19.   File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1393, in call_button
  20.     action = self._call_kw(model, method, args, kwargs)
  21.   File "/home/odoo/src/odoo/addons/web/controllers/main.py", line 1381, in _call_kw
  22.     return call_kw(request.env[model], method, args, kwargs)
  23.   File "/home/odoo/src/odoo/odoo/api.py", line 396, in call_kw
  24.     result = _call_kw_multi(method, model, args, kwargs)
  25.   File "/home/odoo/src/odoo/odoo/api.py", line 383, in _call_kw_multi
  26.     result = method(recs, *args, **kwargs)
  27.   File "/home/odoo/src/odoo/addons/sale_timesheet/wizard/sale_make_invoice_advance.py", line 49, in create_invoices
  28.     return super(SaleAdvancePaymentInv, self).create_invoices()
  29.   File "/home/odoo/src/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 159, in create_invoices
  30.     sale_orders._create_invoices(final=self.deduct_down_payments)
  31.   File "/home/odoo/src/odoo/addons/sale_timesheet/models/sale_order.py", line 73, in _create_invoices
  32.     moves = super(SaleOrder, self)._create_invoices(grouped, final)
  33.   File "/home/odoo/src/odoo/addons/sale/models/sale.py", line 788, in _create_invoices
  34.     moves.sudo().filtered(lambda m: m.amount_total < 0).action_switch_invoice_into_refund_credit_note()
  35.   File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 2746, in action_switch_invoice_into_refund_credit_note
  36.     move.write({
  37.   File "/home/odoo/src/odoo/addons/purchase/models/account_invoice.py", line 117, in write
  38.     res = super(AccountMove, self).write(vals)
  39.   File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 1884, in write
  40.     if self._move_autocomplete_invoice_lines_write(vals):
  41.   File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 1833, in _move_autocomplete_invoice_lines_write
  42.     invoice.write(values)
  43.   File "/home/odoo/src/odoo/addons/purchase/models/account_invoice.py", line 117, in write
  44.     res = super(AccountMove, self).write(vals)
  45.   File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 1888, in write
  46.     res = super(AccountMove, self.with_context(check_move_validity=False, skip_account_move_synchronization=True)).write(vals)
  47.   File "/home/odoo/src/odoo/addons/mail/models/mail_thread.py", line 322, in write
  48.     result = super(MailThread, self).write(values)
  49.   File "/home/odoo/src/odoo/addons/mail/models/mail_activity.py", line 788, in write
  50.     return super(MailActivityMixin, self).write(vals)
  51.   File "/home/odoo/src/odoo/odoo/models.py", line 3663, in write
  52.     field.write(self, vals[fname])
  53.   File "/home/odoo/src/odoo/odoo/fields.py", line 3046, in write
  54.     return self.write_batch([(records, value)])
  55.   File "/home/odoo/src/odoo/odoo/fields.py", line 3067, in write_batch
  56.     return self.write_real(records_commands_list, create)
  57.   File "/home/odoo/src/odoo/odoo/fields.py", line 3239, in write_real
  58.     flush()
  59.   File "/home/odoo/src/odoo/odoo/fields.py", line 3199, in flush
  60.     comodel.browse(to_delete).unlink()
  61.   File "/home/odoo/src/odoo/addons/account/models/account_move.py", line 4084, in unlink
  62.     res = super(AccountMoveLine, self).unlink()
  63.   File "/home/odoo/src/odoo/odoo/models.py", line 3421, in unlink
  64.     self.flush()
  65.   File "/home/odoo/src/odoo/odoo/models.py", line 5436, in flush
  66.     self.recompute()
  67.   File "/home/odoo/src/odoo/odoo/models.py", line 5895, in recompute
  68.     process(field)
  69.   File "/home/odoo/src/odoo/odoo/models.py", line 5879, in process
  70.     field.recompute(recs)
  71.   File "/home/odoo/src/odoo/odoo/fields.py", line 1153, in recompute
  72.     self.compute_value(recs)
  73.   File "/home/odoo/src/odoo/odoo/fields.py", line 1175, in compute_value
  74.     records._compute_field_value(self)
  75.   File "/home/odoo/src/odoo/odoo/models.py", line 4061, in _compute_field_value
  76.     getattr(self, field.compute)()
  77.   File "/home/odoo/src/odoo/addons/sale/models/sale.py", line 1223, in _get_to_invoice_qty
  78.     line.qty_to_invoice = line.qty_delivered - line.qty_invoiced
  79.   File "/home/odoo/src/odoo/odoo/fields.py", line 967, in __get__
  80.     self.recompute(record)
  81.   File "/home/odoo/src/odoo/odoo/fields.py", line 1153, in recompute
  82.     self.compute_value(recs)
  83.   File "/home/odoo/src/odoo/odoo/fields.py", line 1175, in compute_value
  84.     records._compute_field_value(self)
  85.   File "/home/odoo/src/odoo/odoo/models.py", line 4061, in _compute_field_value
  86.     getattr(self, field.compute)()
  87.   File "/home/odoo/src/user/connect-erp/connect_pos/models/sale_order.py", line 44, in _get_invoice_qty
  88.     sale_line.qty_invoiced += sum([self._convert_qty(sale_line, pos_line.qty, 'p2s') for pos_line in sale_line.pos_order_line_ids], 0)
  89.   File "/home/odoo/src/user/connect-erp/connect_pos/models/sale_order.py", line 44, in <listcomp>
  90.     sale_line.qty_invoiced += sum([self._convert_qty(sale_line, pos_line.qty, 'p2s') for pos_line in sale_line.pos_order_line_ids], 0)
  91. Exception
  92.  
  93. The above exception was the direct cause of the following exception:
  94.  
  95. Traceback (most recent call last):
  96.   File "/home/odoo/src/odoo/odoo/http.py", line 639, in _handle_exception
  97.     return super(JsonRequest, self)._handle_exception(exception)
  98.   File "/home/odoo/src/odoo/odoo/http.py", line 315, in _handle_exception
  99.     raise exception.with_traceback(None) from new_cause
  100. AttributeError: 'sale.order.line' object has no attribute '_convert_qty'
RAW Paste Data