Browse Source

Nov 13: [FIX] Bug Fixed 'pos_mrp_order'

18.0
Risvana Cybro 1 week ago
parent
commit
57e9042de9
  1. 2
      pos_mrp_order/__manifest__.py
  2. 5
      pos_mrp_order/doc/RELEASE_NOTES.md
  3. 8
      pos_mrp_order/models/mrp_production.py
  4. 24
      pos_mrp_order/static/description/index.html

2
pos_mrp_order/__manifest__.py

@ -21,7 +21,7 @@
##############################################################################
{
'name': 'Make MRP Orders from POS',
'version': '18.0.1.0.0',
'version': '18.0.1.1.0',
'category': 'Point of Sale',
'summary': """Generate Automatic MRP orders from POS.""",
'description': """This module enables to create automatic MRP orders after

5
pos_mrp_order/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 18.0.1.0.0
##### ADD
- Initial commit for Make MRP Orders from POS
#### 12.11.2025
#### Version 18.0.1.1.0
##### ADD
- Commit for MRP order not created when creating an order from POS

8
pos_mrp_order/models/mrp_production.py

@ -45,11 +45,12 @@ class MrpProduction(models.Model):
product_ids.append(product)
for prod in product_ids:
if prod['qty'] > 0:
product_template_id = self.env['product.product'].browse(prod['id']).product_tmpl_id.id
bom_count = self.env['mrp.bom'].search([
('product_id', '=', prod['id'])])
('product_tmpl_id', '=',product_template_id)])
if bom_count:
bom_temp = self.env['mrp.bom'].search([
('product_id', '=', prod['id']),
('product_tmpl_id', '=', product_template_id),
('product_id', '=', False)])
bom_prod = self.env['mrp.bom'].search([
('product_id', '=', prod['id'])])
@ -63,6 +64,7 @@ class MrpProduction(models.Model):
vals = {
'origin': 'POS-' + prod['pos_reference'],
'state': 'confirmed',
'product_tmpl_id': product_template_id,
'product_id': prod['id'],
'product_uom_id': prod['uom_id'],
'product_qty': prod['qty'],
@ -76,7 +78,7 @@ class MrpProduction(models.Model):
'name': mrp_order.name,
'product_id': bom_line.product_id.id,
'product_uom': bom_line.product_uom_id.id,
'product_uom_qty': (bom_line.product_qty * mrp_order.product_qty)/self.env['mrp.bom'].search([("product_id", "=", prod['id'])]).product_qty,
'product_uom_qty': (bom_line.product_qty * mrp_order.product_qty)/self.env['mrp.bom'].search([("product_tmpl_id", "=", product_template_id)]).product_qty,
'picking_type_id': mrp_order.picking_type_id.id,
'location_id': mrp_order.location_src_id.id,
'location_dest_id': bom_line.product_id.with_company(self.company_id.id).property_stock_production.id,

24
pos_mrp_order/static/description/index.html

@ -165,7 +165,29 @@
>Email Us</span
>
</a>
<a href="skype:cybroopenerp?chat"
target="_blank"
style="
background-color: #7f289b;
font-family: Montserrat;
display: inline-block;
padding: 7px 33px;
border: 1px solid #7f289b;
border-radius: 35px;
text-decoration: none;
"
class="mx-1 mb-2 deep-1 deep_hover">
<img
class="img"
style="width: 24px"
src="./assets/icons/skype-fill.svg"
/>
<span
class="pl-2"
style="color: #fff; font-size: 16px; vertical-align: middle"
>Skype Us</span
>
</a>
</div>
<div class="d-flex justify-content-center mt-2">
<img src="./assets/icons/hero.gif"

Loading…
Cancel
Save