Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
88181a3
[ADD] Chapter 2&3 (Estate)
sopat-odoo Mar 10, 2026
15ba5f8
[IMP] Estate:Fixed Issues and Completed Chapter-4
sopat-odoo Mar 11, 2026
1039a39
[IMP] Estate:Partially Completed Chapter-5
sopat-odoo Mar 12, 2026
aab2bd1
[IMP] Estate:Completed Chapter-5
sopat-odoo Mar 13, 2026
ae34671
[IMP] Estate:Errors Fixed & Completed Chapter-6
sopat-odoo Mar 16, 2026
2db9029
[IMP] Estate: Completed Chapter-7
sopat-odoo Mar 18, 2026
1f35744
[IMP] estate: Partially Completed Chapter-8
sopat-odoo Mar 30, 2026
f5e96ec
[IMP] estate: Completed Chapter-8
sopat-odoo Apr 3, 2026
228fe82
[IMP] estate: Completed Chapter-9
sopat-odoo Apr 4, 2026
7b7fa47
[IMP] estate: Completed Ch-10
sopat-odoo Apr 5, 2026
a51fbd7
[IMP] estate: Partially Completed Ch-11
sopat-odoo Apr 7, 2026
6228369
[IMP] estate: Completed Ch-11
sopat-odoo Apr 9, 2026
1cd13b4
[IMP] estate: Completed Ch-12
sopat-odoo Apr 13, 2026
b58584b
[IMP] estate: Completed Task of Scheduling Visits
sopat-odoo Apr 14, 2026
38b0320
[IMP] estate: Completed SLA Task
sopat-odoo Apr 16, 2026
176abb4
[ADD] estate: Completed Chapter-13
sopat-odoo Apr 16, 2026
1857156
[IMP] estate: Completed Chapter-14
sopat-odoo Apr 16, 2026
331f9b6
[IMP] estate: Coding Guidelines Improvements
sopat-odoo Apr 17, 2026
62b91ad
[ADD] awesome_owl:Implement core OWL components and reactivity features
sopat-odoo May 6, 2026
d290f4c
[IMP] estate:add chatter in form view and email template on sold
sopat-odoo May 6, 2026
6b3a11d
[ADD] estate_crm:auto generate crm lead on offer and update stage
sopat-odoo May 7, 2026
8879c0e
[ADD] awesome_dashboard:build a dynamic dashboard
sopat-odoo May 9, 2026
ca889d2
[IMP] estate: Added review task
sopat-odoo May 14, 2026
392f3a4
[ADD] bom_forecast: clean bom overview forecast view
sopat-odoo May 15, 2026
b87a1d1
[FIX] bom_forecast:improve BoM forecast status display
sopat-odoo May 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bom_forecast/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import model
15 changes: 15 additions & 0 deletions bom_forecast/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "bom_forecast",
"version": "1.0",
"depends": ["mrp", "purchase"],
"author": "soham",
"category": "Tutorials",
"license": "LGPL-3",
'installable': True,
'auto_install': True,
"assets": {
"web.assets_backend": [
"bom_forecast/static/src/**/*",
],
},
}
1 change: 1 addition & 0 deletions bom_forecast/model/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import report_mrp_bom_structure
40 changes: 40 additions & 0 deletions bom_forecast/model/report_mrp_bom_structure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from odoo import _, models


class ReportMrpReportBomStructure(models.AbstractModel):
_inherit = "report.mrp.report_bom_structure"

def _get_bom_data(self, *args, **kwargs):
result = super()._get_bom_data(*args, **kwargs)

self._set_ready_to_produce_status(result)
self._set_forecast_status_display(result)

return result

def _set_ready_to_produce_status(self, line):
if line.get("level") != 0:
return

qty = int(line.get("producible_qty") or 0)
line["status"] = _("%(qty)s Ready To Produce", qty=qty) if qty > 0 else False

def _set_forecast_status_display(self, line):
availability_display = line.get("availability_display") or ""
availability_state = line.get("availability_state")

line["forecast_status_display"] = availability_display

if availability_state in ("expected", "estimated") and availability_display:
display_parts = availability_display.split(" ", 1)
date_part = display_parts[1] if len(display_parts) > 1 else ""

label = _("Estimated") if line.get("level") == 0 else _("Expected")
line["forecast_status_display"] = _(
"%(label)s %(date)s",
label=label,
date=date_part,
)

for child_line in line.get("components", []) + line.get("operations", []):
self._set_forecast_status_display(child_line)
42 changes: 42 additions & 0 deletions bom_forecast/static/src/bom_overview_line.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-inherit="mrp.BomOverviewLine" t-inherit-mode="extension">

<xpath expr="//td[t[@t-if=&quot;data.hasOwnProperty('availability_state')&quot;]]"
position="replace"/>

<xpath expr="//td//div[hasclass('o_field_badge')]" position="replace">
<div class="o_field_badge">

<t t-set="statusClass"
t-value="data.availability_state === 'available'
? 'text-bg-success'
: data.availability_state === 'unavailable'
? 'text-bg-danger'
: ['expected', 'estimated'].includes(data.availability_state)
? data.level === 0
? 'text-bg-dark'
: 'border border-warning text-warning'
: 'text-bg-dark'"/>

<t t-if="data.type == 'operation'">
<span t-attf-class="badge rounded-pill o_mrp_overview_badge {{ statusClass }}"
t-out="data.forecast_status_display"/>
</t>

<t t-elif="data.level === 0 and data.status">
<span class="badge rounded-pill o_mrp_overview_badge text-bg-success"
t-on-click.prevent="goToForecast"
t-out="data.status"/>
</t>

<t t-else="">
<span t-attf-class="badge rounded-pill o_mrp_overview_badge {{ statusClass }}"
t-on-click.prevent="goToForecast"
t-out="data.forecast_status_display"/>
</t>

</div>
</xpath>
</t>
</templates>
14 changes: 14 additions & 0 deletions bom_forecast/static/src/mrp_bom_overview_table.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="mrp.change_forecast_view"
t-inherit="mrp.BomOverviewTable"
t-inherit-mode="extension">

<xpath expr="//div[hasclass('d-flex') and .//a[@t-on-click.prevent='goToProduct']]"
position="replace"/>

<xpath expr="//th[text()='Availability']"
position="replace"/>

</t>
</templates>