Browse Source

Jul 31 [FIX] : Bug Fixed 'pos_kitchen_screen_odoo'

pull/268/head
AjmalCybro 2 years ago
parent
commit
11993d327d
  1. 2
      pos_kitchen_screen_odoo/models/pos_orders.py
  2. 4
      pos_kitchen_screen_odoo/static/src/js/pos_js.js
  3. 46
      pos_kitchen_screen_odoo/static/src/xml/dashboard_templates.xml

2
pos_kitchen_screen_odoo/models/pos_orders.py

@ -37,6 +37,8 @@ class PosOrder(models.Model):
help='Reference of the order')
is_cooking = fields.Boolean(string="Is Cooking",
help='To identify the order is kitchen orders')
order_time = fields.Char(string="Order Time", readonly=True,
help='To set the time of each order')
def write(self, vals):
"""Super the write function for adding order status in vals"""

4
pos_kitchen_screen_odoo/static/src/js/pos_js.js

@ -28,6 +28,7 @@ odoo.define('pos_kitchen_screen_odoo.SubmitOrderButtons', function(require) {
'id': 29,
'pack_lot_ids': [],
'full_product_name': orders.product.display_name,
'note': orders.note,
'price_extra': orders.price_extra,
'name': 'newsx/0031',
'is_cooking': true
@ -44,7 +45,8 @@ odoo.define('pos_kitchen_screen_odoo.SubmitOrderButtons', function(require) {
'is_cooking': true,
'order_status': 'draft',
'company_id': this.env.pos.company.id,
'pricelist_id': this.env.pos.pricelists[0].id
'pricelist_id': this.env.pos.pricelists[0].id,
'order_time': new Date().toLocaleString()
}]
self.rpc({
model: 'pos.order',

46
pos_kitchen_screen_odoo/static/src/xml/dashboard_templates.xml

@ -149,6 +149,7 @@
<a class="btn btn-transparent mt c_white">
<t t-esc="order.name"/>
</a>
<t t-esc="order.order_time"/>
</div>
</div>
<div class="right">
@ -174,6 +175,14 @@
x
</span>
<t t-esc="line.full_product_name"/>
<br/>
<t t-if="line.note">
<i class="fa fa-tag"
role="img"
aria-label="Note"
title="Note"/>
<t t-esc="line.note"/>
</t>
</button>
</ul>
</t>
@ -241,6 +250,7 @@
<a class="btn btn-transparent mt c_blue">
<t t-esc="order.name"/>
</a>
<t t-esc="order.order_time"/>
</div>
</div>
<div class="right">
@ -280,6 +290,14 @@
x
</span>
<t t-esc="line.full_product_name"/>
<br/>
<t t-if="line.note">
<i class="fa fa-tag"
role="img"
aria-label="Note"
title="Note"/>
<t t-esc="line.note"/>
</t>
</button>
</t>
<t t-elif="order.order_status=='waiting' and line.order_status=='ready'">
@ -293,6 +311,15 @@
x
</span>
<t t-esc="line.full_product_name"/>
<br/>
<t t-if="line.note">
<i class="fa fa-tag"
role="img"
aria-label="Note"
title="Note"/>
<t t-esc="line.note"/>
</t>
</button>
</t>
@ -337,6 +364,7 @@
<a class="btn btn-transparent mt">
<t t-esc="order.name"/>
</a>
<t t-esc="order.order_time"/>
</div>
</div>
<div class="right">
@ -361,6 +389,15 @@
x
</span>
<t t-esc="line.full_product_name"/>
<br/>
<t t-if="line.note">
<i class="fa fa-tag"
role="img"
aria-label="Note"
title="Note"/>
<t t-esc="line.note"/>
</t>
</button>
</t>
</t>
@ -412,6 +449,7 @@
<a class="btn btn-transparent mt">
<t t-esc="order.name"/>
</a>
<t t-esc="order.order_time"/>
</div>
</div>
<div class="right">
@ -436,6 +474,14 @@
x
</span>
<t t-esc="line.full_product_name"/>
<br/>
<t t-if="line.note">
<i class="fa fa-tag"
role="img"
aria-label="Note"
title="Note"/>
<t t-esc="line.note"/>
</t>
</button>
</t>
</t>

Loading…
Cancel
Save