OCA / pos

GNU Affero General Public License v3.0
273 stars 600 forks source link

Error at session load #60

Closed debaetsr closed 8 years ago

debaetsr commented 8 years ago

module: pos_pricelist version: 8.0 (downloaded from apps.odoo.com)

Steps to reproduce Open new session

Current behavior Loading product.product TypeError: this.compute_all is not a function at module.Orderline.module.Orderline.extend.get_all_prices (http://testsite.myfqdn.be/web/js/web.assets_backend/de8ad41:4632:239) at module.PosDB.module.PosDB.extend.add_products (http://testsite.myfqdn.be/web/js/web.assets_backend/de8ad41:4620:345) at prototype.(anonymous function) as add_products at Object.module.PosModel.Backbone.Model.extend.models.loaded (http://testsite.myfqdn.be/web/js/web.assets_backend/de8ad41:4388:3668) at Object. (http://testsite.myfqdn.be/web/js/web.assets_backend/de8ad41:4393:48) at Object. (http://testsite.myfqdn.be/web/js/web.assets_common/ece4115:249:688) at fire (http://testsite.myfqdn.be/web/js/web.assets_common/ece4115:243:299) at Object.self.fireWith as resolveWith at Object. (http://testsite.myfqdn.be/web/js/web.assets_common/ece4115:249:879) at fire (http://testsite.myfqdn.be/web/js/web.assets_common/ece4115:243:299) Ok

Expected behavior Working POS

SergioViteri commented 8 years ago

Same problem here

AdilHoumadi commented 8 years ago

Hello,

Can someone post further informations related this error. (modules installed, JS output in the debug mode) ...

Thanks.

SergioViteri commented 8 years ago

Hi,

This is the list of installed modules: https://www.dropbox.com/s/ocsh82x794mif7u/ir.module.module.xlsx?dl=0

and this is the output is: pos_pricelist_models/module.Orderline<.get_all_prices@http://odoo.zacatrus.es/web/js/web.assets_backend/4602669:4551:234 pos_pricelist_db/module.PosDB<.add_products@http://odoo.zacatrus.es/web/js/web.assets_backend/4602669:4539:335 declare/</openerp.Class.extend/</prototype[name]</<@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:1089:592 openerp_pos_models/module.PosModel<.models<.loaded@http://odoo.zacatrus.es/web/js/web.assets_backend/4602669:4307:3660 load_model/<@http://odoo.zacatrus.es/web/js/web.assets_backend/4602669:4312:42 .Deferred/promise.then/</</<@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:249:685 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:243:281 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:248:198 .Deferred/promise.then/</</<@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:249:856 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:243:281 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:248:198 jQuery.Callbacks/self.fire@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:249:31 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:243:281 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:248:198 .Deferred/promise.then/</</<@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:249:856 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:243:281 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:248:198 .Deferred/promise.then/</</<@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:249:856 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:243:281 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:248:198 done@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:682:86 .send/callback@http://odoo.zacatrus.es/web/js/web.assets_common/d535558:735:15

Thank you, Sergio.

AdilHoumadi commented 8 years ago

The output still minified. Please add this param to your URL while accessing to point of sale : debug the url should be like this : http://localhost:8069/pos/web/?debug#action=pos.ui

Thanks.

SergioViteri commented 8 years ago

mmm, same response with that url (see attach). Is there a log file or something I can check?

captura de pantalla de 2015-10-26 17 51 09

legalsylvain commented 8 years ago

@SergioViteri :

regards.

SergioViteri commented 8 years ago

I think everything is here: https://www.dropbox.com/s/4vwutai4b5dsn3z/ir.module.module-1.csv?dl=0

bests.

AdilHoumadi commented 8 years ago

@SergioViteri, Yeah, the last output in the image is better !! There, we can see exactly which line cause problems. Please update your issue with that one ?

Thanks

SergioViteri commented 8 years ago

Here we go:

pos_pricelist_models/module.Orderline<.get_all_prices@http://odoo.zacatrus.es/pos_pricelist/static/src/js/models.js:193:31 pos_pricelist_db/module.PosDB<.add_products@http://odoo.zacatrus.es/pos_pricelist/static/src/js/db.js:175:34 declare/</openerp.Class.extend/</prototype[name]</<@http://odoo.zacatrus.es/web/static/src/js/openerpframework.js:126:39 openerp_pos_models/module.PosModel<.models<.loaded@http://odoo.zacatrus.es/point_of_sale/static/src/js/models.js:282:17 load_model/<@http://odoo.zacatrus.es/point_of_sale/static/src/js/models.js:401:44 .Deferred/promise.then/</</<@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1129:88 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:974:38 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1084:49 .Deferred/promise.then/</</<@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1136:81 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:974:38 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1084:49 jQuery.Callbacks/self.fire@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1091:33 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:974:38 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1084:49 .Deferred/promise.then/</</<@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1136:81 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:974:38 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1084:49 .Deferred/promise.then/</</<@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1136:81 jQuery.Callbacks/fire@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:974:38 jQuery.Callbacks/self.fireWith@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:1084:49 done@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:7803:33 .send/callback@http://odoo.zacatrus.es/web/static/lib/jquery/jquery.js:8518:57

AdilHoumadi commented 8 years ago

I Still need a way to reproduce this bug. With a fresh DB I install pos_pricelist with the Spanish Localization, and I successfully start the point of sale. Can you describe exactly what you did ?

Thanks

select name, author, state from ir_module_module where state = 'installed' order by name;

         name         |                        author                         |   state   
----------------------+-------------------------------------------------------+-----------
 account              | OpenERP SA                                            | installed
 account_voucher      | OpenERP SA                                            | installed
 analytic             | OpenERP SA                                            | installed
 auth_crypt           | ['OpenERP SA', 'FS3']                                 | installed
 auth_signup          | OpenERP SA                                            | installed
 base                 | OpenERP SA                                            | installed
 base_iban            | OpenERP SA                                            | installed
 base_import          | OpenERP SA                                            | installed
 base_setup           | OpenERP SA                                            | installed
 base_vat             | OpenERP SA                                            | installed
 board                | OpenERP SA                                            | installed
 bus                  | OpenERP SA                                            | installed
 decimal_precision    | OpenERP SA                                            | installed
 edi                  | OpenERP SA                                            | installed
 email_template       | OpenERP SA                                            | installed
 fetchmail            | OpenERP SA                                            | installed
 im_chat              | OpenERP SA                                            | installed
 im_odoo_support      | OpenERP SA                                            | installed
 l10n_es              | Spanish Localization Team                             | installed
 mail                 | OpenERP SA                                            | installed
 payment              | OpenERP SA                                            | installed
 payment_transfer     | OpenERP SA                                            | installed
 point_of_sale        | OpenERP SA                                            | installed
 portal               | OpenERP SA                                            | installed
 portal_sale          | OpenERP SA                                            | installed
 portal_stock         | OpenERP SA                                            | installed
 pos_pricelist        | Adil Houmadi @Taktik,Odoo Community Association (OCA) | installed
 procurement          | OpenERP SA                                            | installed
 product              | OpenERP SA                                            | installed
 report               | OpenERP SA                                            | installed
 sale                 | OpenERP SA                                            | installed
 sales_team           | OpenERP SA                                            | installed
 sale_stock           | OpenERP SA                                            | installed
 share                | OpenERP SA                                            | installed
 stock                | OpenERP SA                                            | installed
 stock_account        | OpenERP SA                                            | installed
 web                  |                                                       | installed
 web_calendar         | OpenERP SA, Valentino Lab (Kalysto)                   | installed
 web_diagram          |                                                       | installed
 web_gantt            |                                                       | installed
 web_graph            |                                                       | installed
 web_kanban           |                                                       | installed
 web_kanban_gauge     |                                                       | installed
 web_kanban_sparkline |                                                       | installed
 web_tests            |                                                       | installed
 web_view_editor      |                                                       | installed
SergioViteri commented 8 years ago

Actually, we have been using Odoo much time with much data. What is new for us is pos and pos_pricelist. I can try to reproduce the error with a fresh database if it helps.

SergioViteri commented 8 years ago

With a fresh copy works just fine. Maybe we can leave a log or mark to know which product/element causes the issue...

AdilHoumadi commented 8 years ago

@SergioViteri, Thanks for your feedback.

SergioViteri commented 8 years ago

@AdilHoumadi Do you think you can fix it to work with our database?

debaetsr commented 8 years ago

It seems my module point_of_sales isn't the latest revision, missing the function compute_all. I'll try to update and let you know

SergioViteri commented 8 years ago

great :) Thank you!

debaetsr commented 8 years ago

going to latest revision of odoo/8.0 fixes the problem.

Regards, Ruben

SergioViteri commented 8 years ago

@debaetsr Not for me :-(

debaetsr commented 8 years ago

Can you verify if file point_of_sale/static/src/js/models.js contains:

get_tax_details: function(){ return this.get_all_prices().taxDetails; }, compute_all: function(taxes, price_unit) { var self = this; var res = []; var currency_rounding = this.pos.currency.rounding;

around line 861?

Missing this function throws the execption.

SergioViteri commented 8 years ago

Yes, it contains this lines. This is my models.js: https://www.dropbox.com/s/gc5vclzahm03obu/models.js?dl=0

AdilHoumadi commented 8 years ago

@SergioViteri, If possible to give the commit number of your Odoo code ?

SergioViteri commented 8 years ago

@AdilHoumadi I just download de nightly version of today and still happens: odoo_8.0.20151027_all.deb

AdilHoumadi commented 8 years ago

@SergioViteri , The issue is related to your instance, something is missing, check taxes on the product. Maye be if you give me an access to your pos, I can check for you.

Thanks

SergioViteri commented 8 years ago

@AdilHoumadi What kind of access do you need? Can I send you an email or chat?

AdilHoumadi commented 8 years ago

@SergioViteri, you can send me an email, You can check my github profile.

AdilHoumadi commented 8 years ago

@SergioViteri, @debaetsr, we can close this issue ?

SergioViteri commented 8 years ago

@AdilHoumadi @debaetsr Yes, finally upgrading Odoo resolved the issue. Thank you very much for your help!