diff --git a/custom_addons/costing_mrp_bom/views/bom_view.xml b/custom_addons/costing_mrp_bom/views/bom_view.xml
index bc465b96f..f847d8e21 100644
--- a/custom_addons/costing_mrp_bom/views/bom_view.xml
+++ b/custom_addons/costing_mrp_bom/views/bom_view.xml
@@ -22,7 +22,7 @@
-
+
diff --git a/custom_addons/grn_picking_automate/__init__.py b/custom_addons/grn_picking_automate/__init__.py
new file mode 100644
index 000000000..5305644df
--- /dev/null
+++ b/custom_addons/grn_picking_automate/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+from . import models
\ No newline at end of file
diff --git a/custom_addons/grn_picking_automate/__manifest__.py b/custom_addons/grn_picking_automate/__manifest__.py
new file mode 100644
index 000000000..96dbe3d8d
--- /dev/null
+++ b/custom_addons/grn_picking_automate/__manifest__.py
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+{
+ 'name': 'Grn Picking Automate',
+ 'summary': ' Auto receive stock from grn',
+ 'description': '''
+ Auto receive stock from grn
+ ''',
+ 'author': 'Raman Marikanti',
+ 'depends': ['base', 'mail', 'grn'],
+ 'data': [
+ 'views/grn_picking_automate_views.xml',
+ ],
+ 'license': 'LGPL-3',
+ 'installable': True,
+ 'application': False,
+ 'auto_install': False,
+}
\ No newline at end of file
diff --git a/custom_addons/grn_picking_automate/models/__init__.py b/custom_addons/grn_picking_automate/models/__init__.py
new file mode 100644
index 000000000..e5acbe33a
--- /dev/null
+++ b/custom_addons/grn_picking_automate/models/__init__.py
@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+
+from . import grn_picking_automate
\ No newline at end of file
diff --git a/custom_addons/grn_picking_automate/models/grn_picking_automate.py b/custom_addons/grn_picking_automate/models/grn_picking_automate.py
new file mode 100644
index 000000000..dbc11d8dc
--- /dev/null
+++ b/custom_addons/grn_picking_automate/models/grn_picking_automate.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+
+from odoo import _,api, fields, models
+
+
+class GRN(models.Model):
+ _inherit = "grn"
+
+ def button_action_confirm_validate_picking(self):
+ for grn in self:
+ grn.button_action_confirm()
+ grn.button_create_transfer()
+ picking = grn.picking_id
+ if picking.state == 'cancel':
+ continue
+ for move in picking.move_ids:
+ move.quantity = move.product_qty
+ picking._autoconfirm_picking()
+ picking.button_validate()
+ for move_line in picking.move_ids_without_package:
+ move_line.quantity = move_line.product_uom_qty
+
+ for mv_line in picking.move_ids.mapped('move_line_ids'):
+ # if not mv_line.button_validate and mv_line.reserved_qty or mv_line.reserved_uom_qty:
+ mv_line.quantity = mv_line.quantity_product_uom # .reserved_qty or mv_line.reserved_uom_qty
+
+ picking._action_done()
+
+
diff --git a/custom_addons/grn_picking_automate/views/grn_picking_automate_views.xml b/custom_addons/grn_picking_automate/views/grn_picking_automate_views.xml
new file mode 100644
index 000000000..a69f8c9e5
--- /dev/null
+++ b/custom_addons/grn_picking_automate/views/grn_picking_automate_views.xml
@@ -0,0 +1,14 @@
+
+
+
+
+ grn.form.inherit
+ grn
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/custom_addons/sale_picking_validate/__init__.py b/custom_addons/sale_picking_validate/__init__.py
new file mode 100644
index 000000000..9a7e03ede
--- /dev/null
+++ b/custom_addons/sale_picking_validate/__init__.py
@@ -0,0 +1 @@
+from . import models
\ No newline at end of file
diff --git a/custom_addons/sale_picking_validate/__manifest__.py b/custom_addons/sale_picking_validate/__manifest__.py
new file mode 100644
index 000000000..821fcc105
--- /dev/null
+++ b/custom_addons/sale_picking_validate/__manifest__.py
@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+{
+ 'name': 'Sale Picking Automate',
+ 'summary': ' Auto delivery stock from sale',
+ 'description': '''
+ Auto delivery stock from sale
+ ''',
+ 'author': 'Raman Marikanti',
+ 'depends': ['sale_management', 'stock'],
+ 'data': [
+ 'views/sale_picking_validate.xml',
+ ],
+ 'license': 'LGPL-3',
+ 'installable': True,
+ 'application': False,
+ 'auto_install': False,
+}
\ No newline at end of file
diff --git a/custom_addons/sale_picking_validate/models/__init__.py b/custom_addons/sale_picking_validate/models/__init__.py
new file mode 100644
index 000000000..4e08cea20
--- /dev/null
+++ b/custom_addons/sale_picking_validate/models/__init__.py
@@ -0,0 +1 @@
+from . import sale_picking_validate
\ No newline at end of file
diff --git a/custom_addons/sale_picking_validate/models/sale_picking_validate.py b/custom_addons/sale_picking_validate/models/sale_picking_validate.py
new file mode 100644
index 000000000..16f8c33d8
--- /dev/null
+++ b/custom_addons/sale_picking_validate/models/sale_picking_validate.py
@@ -0,0 +1,41 @@
+
+from odoo import api, fields, models, _
+from odoo.exceptions import UserError, AccessError, ValidationError
+
+
+class SaleOrder(models.Model):
+ _inherit = "sale.order"
+
+ invoice_no = fields.Char(string='Invoice No')
+ invoice_date = fields.Datetime(string='Invoice Date')
+
+ def action_confirm_validate_picking(self):
+ for order in self:
+ order.action_confirm()
+ if order.picking_ids:
+ for picking in order.picking_ids.filtered(lambda x:x.state not in ('cancel','done','draft')):
+ if picking.products_availability_state == 'available':
+ for move in picking.move_ids:
+ move.quantity = move.product_qty
+ # picking._autoconfirm_picking()
+ picking.button_validate()
+ for move_line in picking.move_ids_without_package:
+ move_line.quantity = move_line.product_uom_qty
+
+ for mv_line in picking.move_ids.mapped('move_line_ids'):
+ mv_line.quantity = mv_line.quantity_product_uom
+ picking._action_done()
+ order._create_invoices()
+ else:
+ raise ValidationError(_('Some products are not Available'))
+ def _create_invoices(self):
+ res = super(SaleOrder, self)._create_invoices()
+ if res and not self.invoice_no:
+ raise ValidationError(_('Please add Invoice No'))
+ if res and not self.invoice_date:
+ raise ValidationError(_('Please add Invoice Date'))
+ res.name = self.invoice_no
+ res.invoice_date = res.delivery_date = res.invoice_date_due = res.date = self.invoice_date
+ res.action_post()
+
+
diff --git a/custom_addons/sale_picking_validate/views/sale_picking_validate.xml b/custom_addons/sale_picking_validate/views/sale_picking_validate.xml
new file mode 100644
index 000000000..bd6984b63
--- /dev/null
+++ b/custom_addons/sale_picking_validate/views/sale_picking_validate.xml
@@ -0,0 +1,17 @@
+
+
+
+ sale.order.form.picking.inherit
+ sale.order
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file