commit
1cb382fcfd
16 changed files with 659 additions and 0 deletions
@ -0,0 +1,4 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
|||
|
|||
from . import models |
@ -0,0 +1,32 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
|||
|
|||
{ |
|||
'name': 'Stock Quant Report with Cost, Sale Price and Gross profit', |
|||
'version': '1.0.1', |
|||
'category': 'Stock', |
|||
'icon': '/bb_stock_quant_report/static/description/icon.png', |
|||
'sequence': 20, |
|||
'author': 'Bayarbayasgalan MGL', |
|||
'summary': 'Stock Extra tools', |
|||
'description': """ |
|||
This module can show Stock available quantity details with Cost and Sales Price |
|||
============================================== |
|||
If you want to show Stock Balance with cost and Sale. |
|||
You should take Stock Administrator at the user. |
|||
Cost is comfortable Average cost and Standard cost. |
|||
""", |
|||
'depends': ['stock','product'], |
|||
'data': [ |
|||
'security/bb_stock_security.xml', |
|||
'security/ir.model.access.csv', |
|||
'views/stock_quant_view.xml', |
|||
'views/stock_quant_report_view.xml', |
|||
], |
|||
'qweb': [], |
|||
"images": ["static/description/images/stock_quant_report.gif","static/description/images/bb_stock_ss1.png","static/description/images/bb_stock_ss2.png","static/description/images/bb_stock_ss3.png"], |
|||
'website': 'https://www.linkedin.com/in/bayarbayasgalan-jagdal/', |
|||
'installable': True, |
|||
'auto_install': False, |
|||
'license': 'LGPL-3', |
|||
} |
@ -0,0 +1,221 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * bb_stock_quant_report |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 15.0\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2022-12-31 19:15+0000\n" |
|||
"PO-Revision-Date: 2022-12-31 19:15+0000\n" |
|||
"Last-Translator: \n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Available Stock" |
|||
msgstr "Үлдэгдэл" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.actions.act_window,name:bb_stock_quant_report.stock_quant_report_action |
|||
#: model:ir.ui.menu,name:bb_stock_quant_report.menu_stock_quant_report |
|||
msgid "Balance Details" |
|||
msgstr "Үлдэгдэл дэлгэрэнгүй" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__barcode |
|||
msgid "Barcode" |
|||
msgstr "Баркод" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__categ_id |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Category" |
|||
msgstr "Ангилал" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__default_code |
|||
msgid "Code" |
|||
msgstr "Код" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__company_id |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Company" |
|||
msgstr "Компани" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__display_name |
|||
msgid "Display Name" |
|||
msgstr "Дэлгэцийн нэр" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Filters" |
|||
msgstr "Шүүлт" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__forecast_quantity |
|||
msgid "Future On hand" |
|||
msgstr "Ирээдүйн Үлдэгдэл" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__bohir_ashig |
|||
msgid "Gross profit" |
|||
msgstr "Бохир ашиг" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Group by..." |
|||
msgstr "Бүлэглэх" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__id |
|||
msgid "ID" |
|||
msgstr "" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.view_stock_quant_report_pivot |
|||
msgid "Inventory" |
|||
msgstr "Агуулах" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.view_stock_quant_report_form |
|||
msgid "Inventory Valuation" |
|||
msgstr "Үлдэгдэл өртөг" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report____last_update |
|||
msgid "Last Modified on" |
|||
msgstr "Сүүлийн засвар" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__location_id |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Location" |
|||
msgstr "Байрлал" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__lot_id |
|||
msgid "Lot" |
|||
msgstr "Цуврал" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Lot/Serial Number" |
|||
msgstr "Цуврал дугаар" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Negative Stock" |
|||
msgstr "Сөрөг Үлдэгдэл" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__quantity |
|||
msgid "On hand" |
|||
msgstr "Үлдэгдэл" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model,name:bb_stock_quant_report.model_product_product |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__product_id |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Product" |
|||
msgstr "Бараа" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model,name:bb_stock_quant_report.model_product_template |
|||
msgid "Product Template" |
|||
msgstr "Барааны загвар" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__product_tmpl_id |
|||
msgid "Product template" |
|||
msgstr "Барааны загвар" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__product_uom_id |
|||
msgid "Product uom" |
|||
msgstr "Хэмжих нэгж" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__qaunt_id |
|||
msgid "Quant" |
|||
msgstr "Үлдэгдэл баримт" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.view_stock_quant_report_form |
|||
msgid "Quantity On Hand" |
|||
msgstr "Үлдэгдэл" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.view_stock_quant_report_form |
|||
msgid "Quantity Reserved" |
|||
msgstr "Үлдэгдэл Нөөцлөгдсөн" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model,name:bb_stock_quant_report.model_stock_quant |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "Quants" |
|||
msgstr "Нөөцийн бүртгэл" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__reserved_quantity |
|||
msgid "Reserved" |
|||
msgstr "Нөөцлөгдсөн" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.view_stock_quant_report_tree |
|||
msgid "SUM" |
|||
msgstr "Нийт" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__zarah_negj_price |
|||
msgid "Sale unit price" |
|||
msgstr "Зарах нэгж үнэ" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.stock_quant_report_view_graph |
|||
msgid "Stock Quant" |
|||
msgstr "Агуулах үлдэгдэл" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model,name:bb_stock_quant_report.model_stock_quant_report |
|||
msgid "Stock quant report bb" |
|||
msgstr "" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.quant_report_search_view |
|||
msgid "The cost is greater than the sale price" |
|||
msgstr "Өртөг зарах үнээс их" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__value_sum |
|||
msgid "Total cost" |
|||
msgstr "Нийт Өртөг" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__zarah_niit_price |
|||
msgid "Total sale price" |
|||
msgstr "Нийт зарах үнэ" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__tracking |
|||
msgid "Tracking" |
|||
msgstr "Мөшгөлт" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model:ir.model.fields,field_description:bb_stock_quant_report.field_stock_quant_report__value |
|||
msgid "Unit cost" |
|||
msgstr "Нэгж өртөг" |
|||
|
|||
#. module: bb_stock_quant_report |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.product_template_only_form_view_bb_sq |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.view_stock_quant_tree_editable_inh |
|||
#: model_terms:ir.ui.view,arch_db:bb_stock_quant_report.view_stock_quant_report_tree |
|||
msgid "View resverve" |
|||
msgstr "Нөөцлөлт харах" |
@ -0,0 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
|||
|
|||
from . import stock_quant |
|||
from . import stock_quant_report |
@ -0,0 +1,57 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import api, fields, models, tools, modules |
|||
|
|||
class StockQuant(models.Model): |
|||
_inherit = 'stock.quant' |
|||
|
|||
def view_bb_reserved_quantity(self): |
|||
sml_ids = self.env['stock.move.line'].search([ |
|||
('product_id','=',self.product_id.id), |
|||
('location_id','=',self.location_id.id), |
|||
('lot_id','=',self.lot_id.id), |
|||
('state','not in',['done','cancel']), |
|||
('product_qty','>',0) |
|||
]) |
|||
return self.view_bb_reserved_quantity_sml(sml_ids) |
|||
|
|||
def view_bb_reserved_quantity_sml(self, sml_ids): |
|||
context = {'create': False, 'edit': False} |
|||
tree_view_id = self.env.ref('stock.view_move_line_tree').id |
|||
form_view_id = self.env.ref('stock.view_move_line_form').id |
|||
action = { |
|||
'name': 'Reserved', |
|||
# 'view_mode': 'tree', |
|||
'res_model': 'stock.move.line', |
|||
'views': [(tree_view_id, 'tree'),(form_view_id,'form')], |
|||
'view_id': tree_view_id, |
|||
'domain': [('id','in',sml_ids.ids)], |
|||
'type': 'ir.actions.act_window', |
|||
'context': context, |
|||
'target': 'current' |
|||
} |
|||
return action |
|||
|
|||
class ProductTemplate(models.Model): |
|||
_inherit = 'product.template' |
|||
|
|||
|
|||
def view_bb_reserved_quantity_mw(self): |
|||
sml_ids = self.env['stock.move.line'].search([ |
|||
('product_id','in',self.product_variant_ids.ids), |
|||
('state','not in',['done','cancel']), |
|||
('product_qty','>',0) |
|||
]) |
|||
return self.env['stock.quant'].view_bb_reserved_quantity_sml(sml_ids) |
|||
|
|||
class ProductProduct(models.Model): |
|||
_inherit = 'product.product' |
|||
|
|||
def view_bb_reserved_quantity_mw(self): |
|||
sml_ids = self.env['stock.move.line'].search([ |
|||
('product_id','=',self.id), |
|||
('state','not in',['done','cancel']), |
|||
('product_qty','>',0) |
|||
]) |
|||
return self.env['stock.quant'].view_bb_reserved_quantity_sml(sml_ids) |
|||
|
|||
|
@ -0,0 +1,103 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
|||
|
|||
from odoo import api, fields, models, tools |
|||
|
|||
class StockQuantReport(models.Model): |
|||
_name = "stock.quant.report" |
|||
_description = "Stock quant report bb" |
|||
_auto = False |
|||
|
|||
qaunt_id = fields.Many2one('stock.quant', 'Quant',readonly=True) |
|||
product_id = fields.Many2one('product.product', 'Product',readonly=True) |
|||
product_tmpl_id = fields.Many2one('product.template', string='Product template', readonly=True) |
|||
categ_id = fields.Many2one('product.category', 'Category', readonly=True) |
|||
product_uom_id = fields.Many2one('uom.uom', 'Product uom', readonly=True) |
|||
company_id = fields.Many2one('res.company', string='Company', readonly=True) |
|||
location_id = fields.Many2one('stock.location', 'Location', readonly=True) |
|||
lot_id = fields.Many2one('stock.lot', 'Lot', readonly=True) |
|||
quantity = fields.Float('On hand', readonly=True, digits='Product Unit of Measure') |
|||
reserved_quantity = fields.Float('Reserved', readonly=True, digits='Product Unit of Measure') |
|||
forecast_quantity = fields.Float('Future On hand', readonly=True, digits='Product Unit of Measure') |
|||
tracking = fields.Char(string="Tracking", readonly=True) |
|||
barcode = fields.Char('Barcode', readonly=True) |
|||
default_code = fields.Char('Code', readonly=True) |
|||
|
|||
|
|||
# currency_id = fields.Many2one(related='product_id.currency_id', groups='stock.group_stock_manager') |
|||
value = fields.Float(string='Unit cost', groups='stock.group_stock_manager', group_operator='avg') |
|||
value_sum = fields.Float(string='Total cost', groups='stock.group_stock_manager') |
|||
|
|||
zarah_negj_price = fields.Float(string=u'Sale unit price', groups='stock.group_stock_manager') |
|||
zarah_niit_price = fields.Float(string=u'Total sale price', groups='stock.group_stock_manager') |
|||
bohir_ashig = fields.Float(string=u'Gross profit', groups='stock.group_stock_manager') |
|||
|
|||
def _select(self): |
|||
return """ |
|||
SELECT |
|||
sq.id as id, |
|||
sq.id as qaunt_id, |
|||
sq.product_id, |
|||
pp.product_tmpl_id, |
|||
pt.uom_id as product_uom_id, |
|||
sq.company_id, |
|||
sq.location_id, |
|||
sq.lot_id, |
|||
sq.quantity, |
|||
sq.reserved_quantity, |
|||
sq.quantity-sq.reserved_quantity as forecast_quantity, |
|||
pt.tracking, |
|||
pp.barcode, |
|||
pp.default_code, |
|||
pt.categ_id, |
|||
ip.value_float as value |
|||
,sq.quantity*ip.value_float as value_sum |
|||
,pt.list_price as zarah_negj_price |
|||
,sq.quantity*pt.list_price as zarah_niit_price |
|||
,(sq.quantity*pt.list_price)-(sq.quantity*ip.value_float) as bohir_ashig |
|||
""" |
|||
|
|||
def _from(self): |
|||
return """ |
|||
FROM stock_quant AS sq |
|||
LEFT JOIN product_product pp ON (pp.id=sq.product_id) |
|||
LEFT JOIN product_template pt ON (pp.product_tmpl_id=pt.id) |
|||
LEFT JOIN stock_location sl ON (sl.id=sq.location_id) |
|||
LEFT JOIN ir_property as ip on (ip.res_id = 'product.product,'||sq.product_id and ip.name = 'standard_price' and sq.company_id=ip.company_id) |
|||
""" |
|||
|
|||
def _group_by(self): |
|||
return """ |
|||
|
|||
""" |
|||
|
|||
def _having(self): |
|||
return """ |
|||
|
|||
""" |
|||
|
|||
def _where(self): |
|||
return """""" |
|||
|
|||
def init(self): |
|||
tools.drop_view_if_exists(self._cr, self._table) |
|||
self._cr.execute(""" |
|||
CREATE OR REPLACE VIEW %s AS ( |
|||
%s |
|||
%s |
|||
%s |
|||
%s |
|||
%s |
|||
) |
|||
""" % (self._table, self._select(), self._from(), self._where(), self._group_by(),self._having()) |
|||
) |
|||
|
|||
def view_bb_reserved_quantity(self): |
|||
sml_ids = self.env['stock.move.line'].search([ |
|||
('product_id','=',self.product_id.id), |
|||
('location_id','=',self.location_id.id), |
|||
('lot_id','=',self.lot_id.id), |
|||
('state','not in',['done','cancel']), |
|||
('product_qty','>',0) |
|||
]) |
|||
return self.env['stock.quant'].view_bb_reserved_quantity_sml(sml_ids) |
@ -0,0 +1,13 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<data noupdate="1"> |
|||
<record model="ir.rule" id="stock_quant_report_rule"> |
|||
<field name="name">stock_quant_report multi-company</field> |
|||
<field name="model_id" ref="model_stock_quant_report"/> |
|||
<field name="global" eval="True"/> |
|||
<field name="domain_force">['|',('company_id','=',False),('company_id', 'in', company_ids)]</field> |
|||
</record> |
|||
</data> |
|||
|
|||
</odoo> |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 899 KiB |
After Width: | Height: | Size: 657 KiB |
After Width: | Height: | Size: 12 MiB |
@ -0,0 +1,58 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<div class="col-md-12"> |
|||
<h2 class="oe_slogan" style="font-size: 35px;color:#875A7B;"><b>This module can display the following:</b></h2> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h4 class="oe_slogan"><b>Features</b></h4> |
|||
<div class="alert alert-info oe_mt32" style="padding:0.3em 0.6em; font-size: 150%;"> |
|||
<ul class="list-unstyled"> |
|||
<li> |
|||
<i class="fa fa-check-square-o text-primary"></i> |
|||
Usefull and Analyze columns |
|||
</li> |
|||
<li> |
|||
<i class="fa fa-check-square-o text-primary"></i> |
|||
Show stock quantity with cost and sale price |
|||
</li> |
|||
<li> |
|||
<i class="fa fa-check-square-o text-primary"></i> |
|||
Free module |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container"> |
|||
<h3 class="oe_slogan">If you want to show Stock Balance with cost and Sale.</h3> |
|||
<img style="width: 100%;border: 1px solid #BDBDBD; margin-bottom: 16px; margin-top: 16px;" src="images/bb_stock_ss1.png"> |
|||
</section> |
|||
<section class="oe_container"> |
|||
<h3 class="oe_slogan">Usefull and Analyze columns. Cost, Sale price and Gross profit</h3> |
|||
<img style="width: 100%;border: 1px solid #BDBDBD; margin-bottom: 16px; margin-top: 16px;" src="images/bb_stock_ss2.png"> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<h3 class="oe_slogan">You should take Stock Administrator at the user.</h3> |
|||
<img style="width: 100%;border: 1px solid #BDBDBD; margin-bottom: 16px; margin-top: 16px;" src="images/bb_stock_ss3.png"> |
|||
</section> |
|||
|
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_span12"> |
|||
<h2>Need our service?</h2> |
|||
<p class="oe_mt32">Contact us by <a href="mailto:bayarbayasgalan.j@gmail.com">bayarbayasgalan.j@gmail.com</a> </a></p> |
|||
<ul> |
|||
<li><a href="https://www.linkedin.com/in/bayarbayasgalan-jagdal/">https://www.linkedin.com/in/bayarbayasgalan-jagdal<i class="fa fa-envelope-o"></i></a></li> |
|||
</ul> |
|||
<img class="s_tooltip_tabs_tooltip_image" src="icon.png"> |
|||
</div> |
|||
</div> |
|||
</section> |
@ -0,0 +1,133 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record id="quant_report_search_view" model="ir.ui.view"> |
|||
<field name="name">stock.quant.report.search</field> |
|||
<field name="model">stock.quant.report</field> |
|||
<field eval="10" name="priority"/> |
|||
<field name="arch" type="xml"> |
|||
<search string="Quants"> |
|||
<field name="product_id"/> |
|||
<field name="location_id"/> |
|||
<field name="categ_id"/> |
|||
<field name="lot_id" groups="stock.group_production_lot"/> |
|||
<group expand='0' string='Filters'> |
|||
<filter name="negative" string="Negative Stock" domain="[('quantity', '<', 0.0)]"/> |
|||
<filter name="positive" string="Available Stock" domain="[('quantity', '>', 0.0)]"/> |
|||
<filter name="reserved" string="Reserved" domain="[('reserved_quantity', '>', 0.0)]"/> |
|||
<filter string="The cost is greater than the sale price" name="urtug_ih" domain="[('bohir_ashig','<',0)]"/> |
|||
</group> |
|||
<group expand='0' string='Group by...'> |
|||
<filter string='Product' name="productgroup" context="{'group_by': 'product_id'}"/> |
|||
<filter string='Location' name="locationgroup" domain="[]" context="{'group_by': 'location_id'}"/> |
|||
<filter string='Category' name="categgroup" domain="[]" context="{'group_by': 'categ_id'}"/> |
|||
<filter string='Lot/Serial Number' name="Lot_Serial_number" context="{'group_by': 'lot_id'}" groups="stock.group_production_lot"/> |
|||
<filter string='Company' name="company" domain="[]" context="{'group_by': 'company_id'}" groups="base.group_multi_company"/> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_stock_quant_report_form"> |
|||
<field name="name">stock.quant.report.form</field> |
|||
<field name="model">stock.quant.report</field> |
|||
<field eval="10" name="priority"/> |
|||
<field name="arch" type="xml"> |
|||
<form string="Inventory Valuation" create="false" edit="false" delete="false"> |
|||
<sheet> |
|||
<group> |
|||
<group> |
|||
<field name="product_id"/> |
|||
<field name="location_id" options="{'no_create': True}"/> |
|||
<field name="lot_id" groups="stock.group_production_lot"/> |
|||
</group> |
|||
<group> |
|||
<label for="quantity" string="Quantity On Hand"/> |
|||
<div class="o_row"> |
|||
<field name="quantity"/> |
|||
<field name="product_uom_id" groups="uom.group_uom"/> |
|||
</div> |
|||
<label for="reserved_quantity" string="Quantity Reserved"/> |
|||
<div class="o_row"> |
|||
<field name="reserved_quantity"/> |
|||
<field name="product_uom_id" groups="uom.group_uom"/> |
|||
</div> |
|||
</group> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_stock_quant_report_tree"> |
|||
<field name="name">stock.quant.report.tree</field> |
|||
<field name="model">stock.quant.report</field> |
|||
<field eval="10" name="priority"/> |
|||
<field name="arch" type="xml"> |
|||
<tree decoration-danger="quantity < 0" editable="bottom" |
|||
create="0" edit="0" import="0"> |
|||
<field name="barcode" optional="show"/> |
|||
<field name="default_code" optional="show"/> |
|||
<field name="product_id" optional="show"/> |
|||
<field name="product_tmpl_id" optional="show"/> |
|||
<field name="location_id" optional="show"/> |
|||
<field name="lot_id" groups="stock.group_production_lot" |
|||
optional="show"/> |
|||
<field name="quantity" optional="show" sum="SUM"/> |
|||
<field name="reserved_quantity" optional="show" sum="SUM"/> |
|||
<field name="forecast_quantity" optional="show" sum="SUM"/> |
|||
<field name="product_uom_id" groups="uom.group_uom" optional="show"/> |
|||
|
|||
<field name="value" optional="hide"/> |
|||
<field name="value_sum" optional="show" sum="SUM"/> |
|||
<field name="zarah_negj_price" optional="show"/> |
|||
<field name="zarah_niit_price" optional="show" sum="SUM"/> |
|||
<field name="bohir_ashig" optional="show" sum="SUM"/> |
|||
|
|||
<field name="categ_id" optional="show"/> |
|||
<field name='company_id' groups="base.group_multi_company" optional="show"/> |
|||
<field name="tracking" optional="hide"/> |
|||
<button name="view_bb_reserved_quantity" string="View resverve" type="object"/> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record model="ir.ui.view" id="view_stock_quant_report_pivot"> |
|||
<field name="name">stock.quant.report.pivot</field> |
|||
<field name="model">stock.quant.report</field> |
|||
<field name="arch" type="xml"> |
|||
<pivot string="Inventory"> |
|||
<field name="product_id" type="row"/> |
|||
<!-- <field name="location_id" type="col"/> --> |
|||
<field name="quantity" type="measure"/> |
|||
|
|||
<field name="value_sum" type="measure"/> |
|||
<field name="zarah_negj_price" type="measure"/> |
|||
<field name="zarah_niit_price" type="measure"/> |
|||
<field name="bohir_ashig" type="measure"/> |
|||
|
|||
</pivot> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="stock_quant_report_view_graph" model="ir.ui.view"> |
|||
<field name="name">stock.quant.report.graph</field> |
|||
<field name="model">stock.quant.report</field> |
|||
<field name="arch" type="xml"> |
|||
<graph string="Stock Quant"> |
|||
<field name="location_id"/> |
|||
<field name="quantity" type="measure"/> |
|||
</graph> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="stock_quant_report_action" model="ir.actions.act_window"> |
|||
<field name="name">Balance Details</field> |
|||
<field name="type">ir.actions.act_window</field> |
|||
<field name="res_model">stock.quant.report</field> |
|||
<field name="view_mode">tree,pivot,graph,form</field> |
|||
<field name="context">{'search_default_locationgroup': 1}</field> |
|||
<field name="domain">[('location_id.usage','=', 'internal')]</field> |
|||
</record> |
|||
|
|||
<menuitem id="menu_stock_quant_report" parent="stock.menu_warehouse_report" sequence="101" action="stock_quant_report_action"/> |
|||
</odoo> |
@ -0,0 +1,30 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<record model="ir.ui.view" id="view_stock_quant_tree_editable_inh"> |
|||
<field name="name">stock.quant.tree.editable.inh</field> |
|||
<field name="model">stock.quant</field> |
|||
<field name="inherit_id" ref="stock.view_stock_quant_tree_editable"/> |
|||
<field name="arch" type="xml"> |
|||
<field name="reserved_quantity" position="after"> |
|||
<button name="view_bb_reserved_quantity" string="View resverve" type="object"/> |
|||
|
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="product_template_only_form_view_bb_sq" model="ir.ui.view"> |
|||
<field name="name">product.template.product.form.mw.sq</field> |
|||
<field name="model">product.template</field> |
|||
<field name="inherit_id" ref="product.product_template_form_view"/> |
|||
<field name="arch" type="xml"> |
|||
<header position="inside" > |
|||
<button type="object" |
|||
name="view_bb_reserved_quantity_mw" |
|||
string="View resverve" |
|||
class="oe_stat_button" icon="fa-cubes"> |
|||
</button> |
|||
</header> |
|||
</field> |
|||
</record> |
|||
|
|||
</odoo> |
Loading…
Reference in new issue