[IMP] point_of_sale: improve serial number usuability.
This tasks allow to see serial numbers or lot numbers for each products on the order. It also add the same information on an invoice generated by the POS if the option is ticked in the pos config. closes odoo/odoo#42410 Task-id: 2154835 Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
committed by
Pierre Masereel
parent
f4b0e8097a
commit
a313db6fab
@@ -1781,6 +1781,10 @@ exports.Orderline = Backbone.Model.extend({
|
||||
}
|
||||
},
|
||||
|
||||
get_lot_lines: function() {
|
||||
return this.pack_lot_lines.models;
|
||||
},
|
||||
|
||||
get_required_number_of_lots: function(){
|
||||
var lots_required = 1;
|
||||
|
||||
@@ -1897,6 +1901,7 @@ exports.Orderline = Backbone.Model.extend({
|
||||
tax: this.get_tax(),
|
||||
product_description: this.get_product().description,
|
||||
product_description_sale: this.get_product().description_sale,
|
||||
pack_lot_lines: this.get_lot_lines()
|
||||
};
|
||||
},
|
||||
generate_wrapped_product_name: function() {
|
||||
|
||||
@@ -60,6 +60,15 @@
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
<t t-if="props.line.get_lot_lines()">
|
||||
<ul class="info-list">
|
||||
<t t-foreach="props.line.get_lot_lines()" t-as="lot">
|
||||
<li>
|
||||
SN <t t-esc="lot.attributes['lot_name']"/>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</t>
|
||||
</li>
|
||||
</t>
|
||||
|
||||
|
||||
@@ -90,6 +90,17 @@
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="line.pack_lot_lines">
|
||||
<div class="pos-receipt-left-padding">
|
||||
<ul>
|
||||
<t t-foreach="line.pack_lot_lines" t-as="lot">
|
||||
<li>
|
||||
SN <t t-esc="lot.attributes['lot_name']"/>
|
||||
</li>
|
||||
</t>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user