Skip to Content
Menu
This question has been flagged
2 Replies
1578 Views

I have an error in the Point of Sale of Odoo Saas, until yesterday it worked without problems, today we get the following error to generate an invoice from the post ,





Odoo saas 12.3+e

Odoo Server Error Traceback (most recent call last): File "/home/odoo/src/odoo/saas-12.3/odoo/http.py", line 628, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/odoo/src/odoo/saas-12.3/odoo/http.py", line 314, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/home/odoo/src/odoo/saas-12.3/odoo/tools/pycompat.py", line 14, in reraise raise value File "/home/odoo/src/odoo/saas-12.3/odoo/http.py", line 668, in dispatch result = self._call_function(**self.params) File "/home/odoo/src/odoo/saas-12.3/odoo/http.py", line 346, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/odoo/src/odoo/saas-12.3/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/home/odoo/src/odoo/saas-12.3/odoo/http.py", line 339, in checked_call result = self.endpoint(*a, **kw) File "/home/odoo/src/odoo/saas-12.3/odoo/http.py", line 911, in __call__ return self.method(*args, **kw) File "/home/odoo/src/odoo/saas-12.3/odoo/http.py", line 519, in response_wrap response = f(*args, **kw) File "/home/odoo/src/odoo/saas-12.3/addons/web/controllers/main.py", line 921, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/odoo/src/odoo/saas-12.3/addons/web/controllers/main.py", line 913, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/home/odoo/src/odoo/saas-12.3/odoo/api.py", line 751, in call_kw return _call_kw_model(method, model, args, kwargs) File "/home/odoo/src/odoo/saas-12.3/odoo/api.py", line 724, in _call_kw_model result = method(recs, *args, **kwargs) File "/home/odoo/src/odoo/saas-12.3/addons/point_of_sale/models/pos_order.py", line 779, in create_from_ui force_company=self.env.user.company_id.id, pos_picking_id=pos_order.picking_id File "/home/odoo/src/odoo/saas-12.3/addons/account/models/account_invoice.py", line 1073, in action_invoice_open return to_open_invoices.action_move_create() File "/home/odoo/src/odoo/saas-12.3/addons/stock_account/models/account_invoice.py", line 59, in action_move_create res = super(AccountInvoice, self).action_move_create() File "/home/odoo/src/odoo/saas-12.3/addons/account/models/account_invoice.py", line 1385, in action_move_create iml = inv.invoice_line_move_line_get() File "/home/odoo/src/odoo/saas-12.3/addons/purchase_stock/models/account_invoice.py", line 13, in invoice_line_move_line_get res = super(AccountInvoice, self).invoice_line_move_line_get() File "/home/odoo/src/odoo/saas-12.3/addons/stock_account/models/account_invoice.py", line 19, in invoice_line_move_line_get res.extend(self._anglo_saxon_sale_move_lines(i_line)) File "/home/odoo/src/odoo/saas-12.3/addons/stock_account/models/account_invoice.py", line 31, in _anglo_saxon_sale_move_lines price_unit = i_line._get_anglo_saxon_price_unit() File "/home/odoo/src/odoo/saas-12.3/addons/point_of_sale/models/account_invoice.py", line 19, in _get_anglo_saxon_price_unit average_price_unit = self._compute_average_price(0.0, quantity, moves) AttributeError: 'account.invoice.line' object has no attribute '_compute_average_price'

Avatar
Discard
Author Best Answer

Yes, the module "sales_stock" (sales and warehouse management) is installed.
When you deactivate Anglo-Saxon accounting, it works again.

Avatar
Discard
Best Answer

Make sure`sale_stock` (Sales and Warehouse Management) module installed.
Method `_compute_average_price` is define in sale_stock

Avatar
Discard