Browse Source

Jan 17: [FIX] Bug Fixed 'mrp_order_from_multiple_sale_order'

pull/309/head
Cybrosys Technologies 3 months ago
parent
commit
f6d229d977
  1. 2
      mrp_order_from_multiple_sale_order/README.rst
  2. 4
      mrp_order_from_multiple_sale_order/__manifest__.py
  3. 2
      mrp_order_from_multiple_sale_order/data/ir_actions_server_data.xml
  4. 4
      mrp_order_from_multiple_sale_order/doc/RELEASE_NOTES.md
  5. 6
      mrp_order_from_multiple_sale_order/models/sale_order.py
  6. 4
      mrp_order_from_multiple_sale_order/static/description/index.html
  7. 4
      mrp_order_from_multiple_sale_order/views/sale_order_views.xml

2
mrp_order_from_multiple_sale_order/README.rst

@ -2,7 +2,7 @@
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
MRP Order from Multiple Sale Order
MRP ORDER FROM MULTIPLE SALE ORDER
==================================
This module allows users to Create MRP order by selecting multiple sale orders in the sales module.

4
mrp_order_from_multiple_sale_order/__manifest__.py

@ -20,8 +20,8 @@
#
###############################################################################
{
'name': "MRP Order from Multiple Sale Order",
'version': '17.0.1.0.0',
'name': "MRP ORDER FROM MULTIPLE SALE ORDER",
'version': '17.0.1.0.1',
'category': 'Sales',
'summary': """Create MRP Order by choosing multiple Sale Order.""",
'description': 'This module allows users to Create MRP order by selecting '

2
mrp_order_from_multiple_sale_order/data/ir_actions_server_data.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record id="action_mrp_order" model="ir.actions.server">
<!--Add a button within the action on the sale order list view-->
<field name="name">Create MRP Order</field>
@ -10,5 +9,4 @@
<field name="state">code</field>
<field name="code">action = records.action_mrp_order()</field>
</record>
</data>
</odoo>

4
mrp_order_from_multiple_sale_order/doc/RELEASE_NOTES.md

@ -1,6 +1,6 @@
## Module <mrp_order_from_multiple_sale_order>
#### 10.09.2024
#### 21.08.2024
#### Version 17.0.1.0.0
#### ADD
- Initial commit for MRP Order from Multiple Sale Order
- Initial commit for MRP ORDER FROM MULTIPLE SALE ORDER

6
mrp_order_from_multiple_sale_order/models/sale_order.py

@ -31,7 +31,7 @@ class SaleOrder(models.Model):
mrp_count = fields.Integer(compute='_compute_mrp_count',
string="MRP Count",
help="Get total count of mrp order")
mrp_production_ids = fields.Many2many("mrp.production",
mrp_order_ids = fields.Many2many("mrp.production",
string="MRP Orders",
help="Get MRP order in sale order")
@ -46,7 +46,7 @@ class SaleOrder(models.Model):
"""Button action for generating Manufacturing Orders while
selecting Sale Orders."""
for order in self:
if order.mrp_production_ids:
if order.mrp_order_ids:
raise ValidationError(
"The sale order has already a manufacturing order.!")
if order.state == "draft":
@ -57,7 +57,7 @@ class SaleOrder(models.Model):
'product_id': line.product_id.id,
'sale_order_id': order.id,
})
order.mrp_production_ids = self.env['mrp.production'].search(
order.mrp_order_ids = self.env['mrp.production'].search(
[('sale_order_id', '=', order.id)])
else:
raise ValidationError("Choose the draft sale order.!")

4
mrp_order_from_multiple_sale_order/static/description/index.html

@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MRP Order from Multiple Sale Order</title>
<title>MRP ORDER FROM MULTIPLE SALE ORDER</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
@ -224,7 +224,7 @@
style="font-weight: 500;background-color: #fff; border-radius: 4px; padding: 1rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);">
<div class="d-flex mb-3" style="font-size: 0.8rem; font-weight: 500;"><span>Version
17.0.1.0.0</span><span class="px-2">|</span><span
style="color: #714B67;font-weight: 600;">Released on:10 Sep 2024</span>
style="color: #714B67;font-weight: 600;">Released on:21 Aug 2024</span>
</div>
<p class="m-0"
style=" color:#718096!important; font-size:1rem !important;line-height: 28px;">

4
mrp_order_from_multiple_sale_order/views/sale_order_views.xml

@ -29,7 +29,7 @@
Sale Order tree view for displays MRP Orders.-->
<field name="arch" type="xml">
<xpath expr="//field[@name='team_id']" position="after">
<field name="mrp_production_ids" widget="many2many_tags"/>
<field name="mrp_order_ids" widget="many2many_tags"/>
</xpath>
</field>
</record>
@ -43,7 +43,7 @@
Quotation tree view for displays MRP Orders.-->
<field name="arch" type="xml">
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="mrp_production_ids" widget="many2many_tags"/>
<field name="mrp_order_ids" widget="many2many_tags"/>
</xpath>
</field>
</record>

Loading…
Cancel
Save