diff --git a/add_pricelist_price/__init__.py b/add_pricelist_price/__init__.py
new file mode 100644
index 00000000000..0650744f6bc
--- /dev/null
+++ b/add_pricelist_price/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/add_pricelist_price/__manifest__.py b/add_pricelist_price/__manifest__.py
new file mode 100644
index 00000000000..0ece82d7cdb
--- /dev/null
+++ b/add_pricelist_price/__manifest__.py
@@ -0,0 +1,15 @@
+{
+ 'name': 'Add pricelist price',
+ 'version': '0.1.0',
+ 'description': 'Add pricelist price field.',
+ 'depends': [
+ 'sale', 'account'
+ ],
+ 'data': [
+ 'views/sale_order_line_views.xml',
+ 'views/account_move_views.xml'
+ ],
+ 'author': 'Ishwar Goswami',
+ 'license': 'LGPL-3',
+ 'installable': True
+}
diff --git a/add_pricelist_price/models/__init__.py b/add_pricelist_price/models/__init__.py
new file mode 100644
index 00000000000..ea3d9579546
--- /dev/null
+++ b/add_pricelist_price/models/__init__.py
@@ -0,0 +1,2 @@
+from . import sale_order_line
+from . import account_move_line
diff --git a/add_pricelist_price/models/account_move_line.py b/add_pricelist_price/models/account_move_line.py
new file mode 100644
index 00000000000..5db4d5039d0
--- /dev/null
+++ b/add_pricelist_price/models/account_move_line.py
@@ -0,0 +1,31 @@
+from odoo import api, fields, models
+
+
+class AccountMoveLine(models.Model):
+ _inherit = 'account.move.line'
+
+ book_price = fields.Monetary(
+ string="Book Price",
+ compute="_compute_book_price",
+ readonly=True,
+ )
+
+ @api.depends('product_id', 'quantity', 'move_id.partner_id')
+ def _compute_book_price(self):
+ for line in self:
+ if not line.product_id:
+ line.book_price = 0.0
+ continue
+
+ if line.sale_line_ids:
+ pricelist = line.sale_line_ids[0].order_id.pricelist_id
+ else:
+ pricelist = line.move_id.partner_id.property_product_pricelist
+
+ if pricelist:
+ line.book_price = pricelist._get_product_price(
+ product=line.product_id,
+ quantity=line.quantity,
+ )
+ else:
+ line.book_price = line.product_id.list_price
diff --git a/add_pricelist_price/models/sale_order_line.py b/add_pricelist_price/models/sale_order_line.py
new file mode 100644
index 00000000000..66c3c551fa1
--- /dev/null
+++ b/add_pricelist_price/models/sale_order_line.py
@@ -0,0 +1,22 @@
+from odoo import api, fields, models
+
+
+class SaleOrderLine(models.Model):
+ _inherit = ["sale.order.line"]
+
+ book_price = fields.Monetary(compute="_compute_book_price", readonly=True)
+
+ @api.depends('order_id.pricelist_id', 'product_id', 'product_uom_qty')
+ def _compute_book_price(self):
+ for line in self:
+ if not line.product_id:
+ line.book_price = 0
+ continue
+ pricelist = line.order_id.pricelist_id
+ if line.product_id and pricelist:
+ line.book_price = pricelist._get_product_price(
+ product=line.product_id,
+ quantity=line.product_uom_qty,
+ )
+ else:
+ line.book_price = line.product_id.lst_price
diff --git a/add_pricelist_price/views/account_move_views.xml b/add_pricelist_price/views/account_move_views.xml
new file mode 100644
index 00000000000..3becdb35c55
--- /dev/null
+++ b/add_pricelist_price/views/account_move_views.xml
@@ -0,0 +1,13 @@
+
+
+
+ account.move.form
+ account.move
+
+
+
+
+
+
+
+
diff --git a/add_pricelist_price/views/sale_order_line_views.xml b/add_pricelist_price/views/sale_order_line_views.xml
new file mode 100644
index 00000000000..8b7202dfa61
--- /dev/null
+++ b/add_pricelist_price/views/sale_order_line_views.xml
@@ -0,0 +1,13 @@
+
+
+
+ sale.order.form.inherit.book.price
+ sale.order
+
+
+
+
+
+
+
+