Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion construction/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
'name': 'Construction Builder',
'version': '1.7',
'version': '1.8',
'category': 'Construction',
'depends': [
'base_industry_data',
Expand Down
26 changes: 16 additions & 10 deletions construction/data/sale_order_template.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="sale_order_template_1" model="sale.order.template">
<field name="name">Renovation Project</field>
<field name="note"><![CDATA[<div data-oe-version="2.0"><strong>Terms</strong></div>
<div>30% deposit, 70% on completion</div>
<record id="sale_order_template_1" model="sale.order.template">
<field name="name">Renovation Project</field>
<field name="note"><![CDATA[<div data-oe-version="2.0"><strong>Terms</strong></div>
<div>30% deposit, 20% down payments up to completion</div>
<div>All work guaranteed 10 years</div>
<div>Insurance certificate attached</div>
]]></field>
<field name="number_of_days">60</field>
<field name="require_signature" eval="True"/>
<field name="prepayment_percent">1.0</field>
<field name="spreadsheet_template_id" ref="sale_order_spreadsheet_1"/>
</record>
]]></field>
<field name="number_of_days">60</field>
<field name="require_signature" eval="True"/>
<field name="prepayment_percent">1.0</field>
<field name="spreadsheet_template_id" ref="sale_order_spreadsheet_1"/>
</record>
<record id="sale_order_template_2" model="sale.order.template">
<field name="name">Window Opening Retrofit in Existing Wall</field>
<field name="template_type">section</field>
<field name="require_signature" eval="True"/>
<field name="prepayment_percent">1.0</field>
</record>
</odoo>
815 changes: 430 additions & 385 deletions construction/data/sale_order_template_line.xml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions construction/demo/hr_employee.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<field name="work_contact_id" ref="base.partner_admin"/>
<field name="work_email">bill.ding@yourcompany.example.com</field>
<field name="user_id" ref="base.user_admin"/>
<field name="hourly_cost">40.0</field>
</record>
<record id="hr_employee_4" model="hr.employee">
<field name="image_1920" type="bytes" file="construction/static/src/binary/hr_employee/2-image_1920"/>
Expand All @@ -23,6 +24,7 @@
<field name="timesheet_manager_id" ref="base.user_admin"/>
<field name="planning_role_ids" eval="[(4, ref('planning_role_4')), (4, ref('planning_role_6')), (4, ref('planning_role_7'))]"/>
<field name="default_planning_role_id" ref="planning_role_7"/>
<field name="hourly_cost">40.0</field>
</record>
<record id="hr_employee_5" model="hr.employee">
<field name="image_1920" type="bytes" file="construction/static/src/binary/hr_employee/3-image_1920"/>
Expand All @@ -36,6 +38,7 @@
<field name="coach_id" ref="hr.employee_admin"/>
<field name="timesheet_manager_id" ref="base.user_admin"/>
<field name="planning_role_ids" eval="[(4, ref('planning_role_5'))]"/>
<field name="hourly_cost">50.0</field>
</record>
<record id="hr_employee_3" model="hr.employee">
<field name="image_1920" type="bytes" file="construction/static/src/binary/hr_employee/4-image_1920"/>
Expand All @@ -50,6 +53,7 @@
<field name="parent_id" ref="hr.employee_admin"/>
<field name="coach_id" ref="hr.employee_admin"/>
<field name="timesheet_manager_id" ref="base.user_admin"/>
<field name="hourly_cost">35.0</field>
</record>
<record id="hr_employee_6" model="hr.employee">
<field name="image_1920" type="bytes" file="construction/static/src/binary/hr_employee/5-image_1920"/>
Expand All @@ -64,6 +68,7 @@
<field name="timesheet_manager_id" ref="base.user_admin"/>
<field name="planning_role_ids" eval="[(4, ref('planning_role_4')), (4, ref('planning_role_6'))]"/>
<field name="default_planning_role_id" ref="planning_role_4"/>
<field name="hourly_cost">35.0</field>
</record>
<record id="hr_employee_2" model="hr.employee">
<field name="image_1920" type="bytes" file="construction/static/src/binary/hr_employee/6-image_1920"/>
Expand All @@ -78,5 +83,6 @@
<field name="timesheet_manager_id" ref="base.user_admin"/>
<field name="planning_role_ids" eval="[(4, ref('planning_role_4')), (4, ref('planning_role_6'))]"/>
<field name="default_planning_role_id" ref="planning_role_4"/>
<field name="hourly_cost">35.0</field>
</record>
</odoo>
2 changes: 1 addition & 1 deletion construction/demo/project_project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<field name="favorite_user_ids" eval="[Command.link(ref('base.user_admin'))]"/>
</record>
<record id="project_project_7" model="project.project">
<field name="name">S00002 - Davis / Old Farm renovation in guest house</field>
<field name="name">S00002 - Davis / Padel club cafeteria</field>
<field name="allow_billable" eval="True"/>
<field name="type_ids" eval="[(6, 0, [ref('planning_project_stage_0'), ref('planning_project_stage_1'), ref('planning_project_stage_2'), ref('planning_project_stage_3'), ref('planning_project_stage_4')])]" />
<field name="user_id" ref="base.user_admin"/>
Expand Down
8 changes: 6 additions & 2 deletions construction/demo/project_update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
</record>
<record id="project_update_2" model="project.update">
<field name="name">Review</field>
<field name="status">at_risk</field>
<field name="progress">15</field>
<field name="status">on_track</field>
<field name="progress">50</field>
<field name="project_id" ref="project_project_7"/>
<field name="user_id" eval="ref('base.user_admin')"/>
<field name="date" eval="DateTime.now() + relativedelta(weeks=-2)"/>
<field name="description"><![CDATA[
<h2>1. Executive Summary &amp; Schedule Health</h2><ul><li><p><b>Key Focus Area:</b> Structural frame sign-off, early facade glazing completion, and exterior terrace pergola assembly.</p></li><li><p><b>General Summary:</b> Main civil and structural milestones for Phase 1 are progressing according to schedule. Early quality control walkthroughs on completed zones (Cafeteria bay &amp; upper terrace) have identified two non-blocking material defects. Corrective actions have been issued via Odoo Site Remarks without impacting the critical path.</p></li></ul><h2>2. Work Progress &amp; Phase Breakdown (15% Completion)</h2><ul><li><p><b>Phase 1: Foundations &amp; Heavy Structure</b> — 100% Completed</p></li><li><p><b>Phase 2: Building Envelope &amp; Glazing (Cafeteria Zone)</b> — 65% Completed</p></li><li><p><b>Phase 3: Outdoor Terraces &amp; Pergola Structures</b> — 40% Completed</p></li><li><p><b>Phase 4: MEP Rough-Ins &amp; Interior Finishes</b> — 0% Completed (Scheduled for Next Month)</p></li></ul><h2>3. Quality Control &amp; Site Remarks Log</h2><p>2 defect items were logged during the pre-delivery walkthrough of the Cafeteria sector and are accounted for in the current phase tracking.</p><h2>4. Financials &amp; Change Management Overview</h2><ul><li><p><b>Budget Status:</b> On Budget.</p></li><li><p><b>Contract Variations / Change Orders:</b></p><ul><li><p>Both logged defect repairs are classified under <b>Subcontractor Liability / Warranty</b>; zero impact on the project contingency fund or main contract value.</p></li></ul></li></ul>
]]></field>
</record>
</odoo>
5 changes: 5 additions & 0 deletions construction/demo/purchase_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@
<field name="project_id" ref="project_project_7"/>
<field name="user_id" ref="base.user_admin" />
</record>
<record id="purchase_order_4" model="purchase.order">
<field name="partner_id" ref="base_industry_data.res_partner_34"/>
<field name="project_id" ref="project_project_7"/>
<field name="user_id" ref="base.user_admin" />
</record>
</odoo>
31 changes: 28 additions & 3 deletions construction/demo/purchase_order_confirm.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,39 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<function model="purchase.order" name="button_confirm" eval="[[ref('purchase_order_1'), ref('purchase_order_2'), ref('purchase_order_3')]]"/>
<function model="purchase.order" name="button_confirm" eval="[[ref('purchase_order_1'), ref('purchase_order_2'), ref('purchase_order_3'), ref('purchase_order_4')]]"/>
<function name="button_validate" model="stock.picking">
<value model="stock.picking" eval="
(
obj().env.ref('construction.purchase_order_1') +
obj().env.ref('construction.purchase_order_2') +
obj().env.ref('construction.purchase_order_3')
obj().env.ref('construction.purchase_order_3') +
obj().env.ref('construction.purchase_order_4')
).reference_ids.picking_ids.ids"/>
</function>

<function model="purchase.order" name="action_create_invoice" eval="[[ref('purchase_order_2')]]"/>
<!-- Create and validates invoices-->
<function model="purchase.order" name="action_create_invoice" eval="[[ref('purchase_order_2'), ref('purchase_order_3'), ref('purchase_order_4')]]"/>
<function model="account.move" name="write">
<value model="account.move" eval="obj().env.ref('construction.purchase_order_4').invoice_ids.ids"/>
<value eval="{'invoice_date': DateTime.now()}"/>
</function>
<function model="account.move" name="action_post">
<value model="account.move" eval="
obj().env.ref('construction.purchase_order_2').invoice_ids.ids +
obj().env.ref('construction.purchase_order_3').invoice_ids.ids +
obj().env.ref('construction.purchase_order_4').invoice_ids.ids
"/>
</function>

<!-- Confirm stock.picking for SO and create backorder of not in stock products -->
<function name="action_split_transfer" model="stock.picking">
<value model="stock.picking" eval="obj().env.ref('construction.sale_order_6').picking_ids.ids"/>
</function>
<function name="button_validate" model="stock.picking">
<value model="stock.picking" eval="obj().search([('sale_id', '=', obj().env.ref('construction.sale_order_6').id), ('backorder_id', '=', False)], limit=1).id"/>
</function>
<function name="write" model="stock.picking">
<value model="stock.picking" eval="obj().search([('sale_id', '=', obj().env.ref('construction.sale_order_6').id), ('backorder_id', '=', False)], limit=1).id"/>
<value eval="{'date_done': DateTime.now() - relativedelta(months=1)}"/>
</function>
</odoo>
66 changes: 66 additions & 0 deletions construction/demo/purchase_order_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,70 @@
<field name="product_qty">6.0</field>
<field name="price_unit">120.0</field>
</record>
<record id="purchase_order_line_15b" model="purchase.order.line">
<field name="product_id" ref="product_product_42"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">2.0</field>
<field name="price_unit">1080.0</field>
</record>
<record id="purchase_order_line_16" model="purchase.order.line">
<field name="product_id" ref="product_product_45"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">120.0</field>
<field name="price_unit">22.5</field>
</record>
<record id="purchase_order_line_17" model="purchase.order.line">
<field name="product_id" ref="product_product_15"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">1.0</field>
<field name="price_unit">564.0</field>
</record>
<record id="purchase_order_line_18" model="purchase.order.line">
<field name="product_id" ref="product_product_49"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">150.0</field>
<field name="price_unit">18.0</field>
</record>
<record id="purchase_order_line_19" model="purchase.order.line">
<field name="product_id" ref="product_product_50"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">10.0</field>
<field name="price_unit">336.0</field>
</record>
<record id="purchase_order_line_20" model="purchase.order.line">
<field name="product_id" ref="product_product_51"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">4.0</field>
<field name="price_unit">2010.0</field>
</record>
<record id="purchase_order_line_21" model="purchase.order.line">
<field name="product_id" ref="product_product_31"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">30.0</field>
<field name="price_unit">26.5</field>
</record>
<record id="purchase_order_line_22" model="purchase.order.line">
<field name="product_id" ref="product_product_27"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">1.0</field>
<field name="price_unit">2240.0</field>
</record>
<record id="purchase_order_line_23" model="purchase.order.line">
<field name="product_id" ref="product_product_26"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">6.0</field>
<field name="price_unit">122.5</field>
</record>
<record id="purchase_order_line_24" model="purchase.order.line">
<field name="product_id" ref="product_product_55"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">1.0</field>
<field name="price_unit">1060.0</field>
</record>
<record id="purchase_order_line_25" model="purchase.order.line">
<field name="product_id" ref="product_product_54"/>
<field name="order_id" ref="purchase_order_4"/>
<field name="product_qty">120.0</field>
<field name="price_unit">11.0</field>
</record>
</odoo>
5 changes: 5 additions & 0 deletions construction/demo/sale_order_confirm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
</record>
<function name="create_invoices" model="sale.advance.payment.inv" eval="[ref('sale_advance_payment_inv_2')]"/>

<!-- Validate invoices -->
<function model="account.move" name="action_post">
<value model="account.move" eval="obj().env.ref('construction.sale_order_6').invoice_ids.ids"/>
</function>

<!-- Assign sale order 1's tasks and Tasks progress-->
<function name="write" model="project.task">
<value model="project.task" eval="obj().search([('sale_line_id', 'in', [ref('sale_order_line_4'), ref('sale_order_line_5')])]).ids"/>
Expand Down
1 change: 1 addition & 0 deletions construction_developer/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
'demo/stock_location.xml',
'demo/res_company.xml',
'demo/sale_order_post.xml',
'demo/project_project.xml',
],
'assets': {
'web.assets_backend': [
Expand Down
44 changes: 44 additions & 0 deletions construction_developer/demo/project_project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1" context="{'mail_auto_subscribe_no_notify': True}">
<record id="construction.project_project_3" model="project.project" forcecreate="0">
<field name="user_id" ref="base.user_admin"/>
</record>
<record id="construction.project_project_4" model="project.project" forcecreate="0">
<field name="partner_id" ref="base_industry_data.res_partner_25"/>
<field name="user_id" ref="base.user_admin"/>
</record>
<record id="construction.project_project_7" model="project.project" forcecreate="0">
<field name="user_id" ref="base.user_admin"/>
</record>
<function name="write" model="res.users.settings.embedded.action">
<value model="res.users.settings.embedded.action" eval="obj().search([('res_id', '=', obj().env.ref('construction.project_project_7').id)], limit=1).id"/>
<value model="res.users.settings.embedded.action" eval="{
'embedded_actions_order': ','.join([
'false',
str(obj().env.ref('sale_project.project_embedded_action_project_actual_margin').id),
str(obj().env.ref('sale_project_margin.project_embedded_action_project_projected_margin').id),
str(obj().env.ref('hr_timesheet.project_embedded_action_timesheets').id),
str(obj().env.ref('project_forecast.project_embedded_action_planning').id),
str(obj().env.ref('documents_project.project_embedded_action_documents').id),
str(obj().env.ref('sale_project.project_embedded_action_sales_orders').id),
str(obj().env.ref('sale_project.project_embedded_action_invoices').id),
str(obj().env.ref('project_purchase.project_embedded_action_purchase_orders').id),
str(obj().env.ref('sale_project.project_embedded_action_vendor_bills').id),
str(obj().env.ref('project.project_embedded_action_project_updates').id),
]),
'embedded_actions_visibility': ','.join([
'false',
str(obj().env.ref('sale_project.project_embedded_action_project_actual_margin').id),
str(obj().env.ref('sale_project_margin.project_embedded_action_project_projected_margin').id),
str(obj().env.ref('hr_timesheet.project_embedded_action_timesheets').id),
str(obj().env.ref('project_forecast.project_embedded_action_planning').id),
str(obj().env.ref('documents_project.project_embedded_action_documents').id),
str(obj().env.ref('sale_project.project_embedded_action_sales_orders').id),
str(obj().env.ref('sale_project.project_embedded_action_invoices').id),
str(obj().env.ref('project_purchase.project_embedded_action_purchase_orders').id),
str(obj().env.ref('sale_project.project_embedded_action_vendor_bills').id),
str(obj().env.ref('project.project_embedded_action_project_updates').id),
]),
}"/>
</function>
</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.