Browse Source

[FIX] : access to db differently, context is much important !

pull/6/head
Adil Houmadi 10 years ago
parent
commit
3bff8f1c4f
  1. 2
      pos_pricelist/static/src/js/models.js
  2. 2
      pos_pricelist/static/src/js/screens.js

2
pos_pricelist/static/src/js/models.js

@ -113,7 +113,7 @@ function pos_pricelist_models(instance, module) {
var qty = this.compute_qty(options.order, options.product);
var partner = options.order.get_client();
var product = options.product;
var db = self.posmodel.db;
var db = this.pos.db;
var price = this.compute_price_all(db, product, partner, qty);
if (price !== false && price !== 0.0) {
this.price = price;

2
pos_pricelist/static/src/js/screens.js

@ -27,7 +27,7 @@ function pos_pricelist_screens(instance, module) {
var line = orderLines[i];
var partner = currentOrder.get_client();
var product = line.product;
var db = self.posmodel.db;
var db = this.pos.db;
var quantity = line.quantity;
var price = line.compute_price_all(db, product, partner, quantity);
if (price !== false && price !== 0.0) {

Loading…
Cancel
Save