Browse Source

Aug 30: [FIX] Bug Fixed 'warehouse_reports'

pull/332/merge
Cybrosys Technologies 8 months ago
parent
commit
1c88f24b55
  1. 2
      warehouse_reports/__manifest__.py
  2. 5
      warehouse_reports/doc/RELEASE_NOTES.md
  3. 0
      warehouse_reports/static/description/assets/screenshots/hero.gif
  4. 0
      warehouse_reports/static/description/assets/screenshots/warehouse_report_10.png
  5. 0
      warehouse_reports/static/description/assets/screenshots/warehouse_report_13.png
  6. 0
      warehouse_reports/static/description/assets/screenshots/warehouse_report_14.png
  7. 0
      warehouse_reports/static/description/assets/screenshots/warehouse_report_15.png
  8. 0
      warehouse_reports/static/description/assets/screenshots/warehouse_report_16.png
  9. 0
      warehouse_reports/static/description/assets/screenshots/warehouse_report_20.png
  10. 69
      warehouse_reports/wizards/stock_valuation_report.py

2
warehouse_reports/__manifest__.py

@ -21,7 +21,7 @@
#############################################################################
{
'name': "Warehouse Reports",
"version": "16.0.1.0.0",
"version": "16.0.1.0.1",
"category": "Warehouse",
"summary": "All warehouse related PDF and Excel reports",
"description": "User is able to print Pdf and Excel report of Stock move,"

5
warehouse_reports/doc/RELEASE_NOTES.md

@ -4,3 +4,8 @@
#### Version 16.0.1.0.0
#### ADD
- Initial commit for Warehouse Reports
#### 22.08.2024
#### Version 16.0.1.0.1
#### FIX
- Bug fix for not updating the latest valuation in the Stock Valuation Reports

0
warehouse_reports/static/description/assets/screenshots/hero.gif

Before

Width:  |  Height:  |  Size: 593 KiB

After

Width:  |  Height:  |  Size: 593 KiB

0
warehouse_reports/static/description/assets/screenshots/warehouse_report_10.png

Before

Width:  |  Height:  |  Size: 307 KiB

After

Width:  |  Height:  |  Size: 307 KiB

0
warehouse_reports/static/description/assets/screenshots/warehouse_report_13.png

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 199 KiB

0
warehouse_reports/static/description/assets/screenshots/warehouse_report_14.png

Before

Width:  |  Height:  |  Size: 257 KiB

After

Width:  |  Height:  |  Size: 257 KiB

0
warehouse_reports/static/description/assets/screenshots/warehouse_report_15.png

Before

Width:  |  Height:  |  Size: 230 KiB

After

Width:  |  Height:  |  Size: 230 KiB

0
warehouse_reports/static/description/assets/screenshots/warehouse_report_16.png

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 198 KiB

0
warehouse_reports/static/description/assets/screenshots/warehouse_report_20.png

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 121 KiB

69
warehouse_reports/wizards/stock_valuation_report.py

@ -23,6 +23,7 @@ import io
import json
import xlsxwriter
from odoo import fields, models
from odoo.exceptions import ValidationError
from odoo.tools import date_utils
@ -75,31 +76,31 @@ class StockValuationReport(models.TransientModel):
if self.product_id and self.company_id:
self.env.cr.execute(
"""{}where product_product.id='{}' and stock_valuation_layer.company_id
='{}' and stock_valuation_layer.create_date >='{}'
and stock_valuation_layer.create_date<'{}'""".format(
='{}'""".format(
query, product_id, company_id,
from_date,
to_date))
))
elif self.product_id and self.company_id:
self.env.cr.execute(
"""{}where product_product.id='{}' and
stock_valuation_layer.company_id ='{}' and
stock_valuation_layer.create_date >='{}' and
stock_valuation_layer.create_date<'{}'""".format(
query, product_id, company_id, from_date,
to_date))
stock_valuation_layer.company_id ='{}'""".format(
query, product_id, company_id))
elif self.product_id:
self.env.cr.execute(
"""{}where product_product.id='{}' and
stock_valuation_layer.create_date >='{}' and
stock_valuation_layer.create_date<'{}'""".format(
query, product_id, from_date, to_date))
"""{}where product_product.id='{}'""".format(
query, product_id))
elif self.company_id:
self.env.cr.execute(
"""{} where stock_valuation_layer.company_id='{}' and
stock_valuation_layer.create_date >='{}' and
stock_valuation_layer.create_date<'{}'""".format(
query, company_id, from_date, to_date))
"""{} where stock_valuation_layer.company_id='{}' """.format(
query, company_id))
elif self.from_Date:
self.env.cr.execute(
"""{} where stock_valuation_layer.create_date >= '{}' """.format(query, from_date))
elif self.to_date:
self.env.cr.execute(
"""{} where stock_valuation_layer.create_date <= '{}' """.format(query, to_date))
if from_date and to_date:
if to_date < from_date:
raise ValidationError('Sorry, To Date Must be greater Than From Date...')
else:
self.env.cr.execute("""{}""".format(query))
stock_valuation = self.env.cr.dictfetchall()
@ -146,31 +147,31 @@ class StockValuationReport(models.TransientModel):
if self.product_id and self.company_id:
self.env.cr.execute(
"""{}where product_product.id='{}' and stock_valuation_layer.company_id
='{}' and stock_valuation_layer.create_date >='{}'
and stock_valuation_layer.create_date<'{}'""".format(
='{}'""".format(
query, product_id, company_id,
from_date,
to_date))
))
elif self.product_id and self.company_id:
self.env.cr.execute(
"""{}where product_product.id='{}' and
stock_valuation_layer.company_id ='{}' and
stock_valuation_layer.create_date >='{}' and
stock_valuation_layer.create_date<'{}'""".format(
query, product_id, company_id, from_date,
to_date))
stock_valuation_layer.company_id ='{}'""".format(
query, product_id, company_id))
elif self.product_id:
self.env.cr.execute(
"""{}where product_product.id='{}' and
stock_valuation_layer.create_date >='{}' and
stock_valuation_layer.create_date<'{}'""".format(
query, product_id, from_date, to_date))
"""{}where product_product.id='{}'""".format(
query, product_id))
elif self.company_id:
self.env.cr.execute(
"""{} where stock_valuation_layer.company_id='{}' and
stock_valuation_layer.create_date >='{}' and
stock_valuation_layer.create_date<'{}'""".format(
query, company_id, from_date, to_date))
"""{} where stock_valuation_layer.company_id='{}' """.format(
query, company_id))
elif self.from_Date:
self.env.cr.execute(
"""{} where stock_valuation_layer.create_date >= '{}' """.format(query, from_date))
elif self.to_date:
self.env.cr.execute(
"""{} where stock_valuation_layer.create_date <= '{}' """.format(query, to_date))
if from_date and to_date:
if to_date < from_date:
raise ValidationError('Sorry, To Date Must be greater Than From Date...')
else:
self.env.cr.execute("""{}""".format(query))
stock_valuation = self.env.cr.dictfetchall()

Loading…
Cancel
Save