Skip to content

Commit

Permalink
[IMP] pos_disable_pricelist_selection: selectable pricelists
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyasProgrammer committed Dec 15, 2023
1 parent 9402898 commit 0ecc31b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions pos_disable_pricelist_selection/static/src/js/PosModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ odoo.define("pos_disable_pricelist_selection.PosModel", function (require) {

models.PosModel = models.PosModel.extend({
domain: function (self) {
if (self.config.use_pricelist) {
if (self.config.hide_pricelist_button) {
return [["id", "in", self.config.available_pricelist_ids]];
}
return [["id", "in", self.config.selectable_pricelist_ids]];
}
// if (self.config.use_pricelist) {
// if (self.config.hide_pricelist_button) {
// return [["id", "in", self.config.available_pricelist_ids]];
// }
// return [["id", "in", self.config.selectable_pricelist_ids]];
// }
return [["id", "=", self.config.pricelist_id[0]]];
},
load_server_data: function () {
Expand Down
8 changes: 4 additions & 4 deletions pos_disable_pricelist_selection/views/assets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
type="text/javascript"
src="/pos_disable_pricelist_selection/static/src/js/ProductScreen.js"
/>
<!-- <script-->
<!-- type="text/javascript"-->
<!-- src="/pos_disable_pricelist_selection/static/src/js/PosModel.js"-->
<!-- />-->
<script
type="text/javascript"
src="/pos_disable_pricelist_selection/static/src/js/PosModel.js"
/>
</xpath>
</template>
</odoo>

0 comments on commit 0ecc31b

Please sign in to comment.