Skip to content

Commit

Permalink
[IMP] estate: enhance invoice creation and update Kanban view
Browse files Browse the repository at this point in the history
- Added functionality to create a customer invoice when a property is marked as
 'Sold'.
- Set `partner_id` from the estate property and invoice type to 'Customer
  Invoice'.
- Included two invoice lines: 6% of selling price and an additional 100.00 in
  fees.
- Enhanced Kanban view to display expected price, best price, selling price, and
  tags.
- Applied conditional logic and default grouping by property type; disabled
  drag-and-drop.
  • Loading branch information
yasp-odoo committed Aug 22, 2024
1 parent 576fb56 commit ede8d3e
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions estate/views/estate_property_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,40 @@
<field name="name">estate.property.kanban</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<kanban>
<kanban
default_group_by="property_type_id"
records_draggable='False'>
<field name="property_type_id"/>
<field name="state"/>
<field name="best_price"/>
<field name="selling_price"/>
<field name="expected_price"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<field name="name" />
<div class="oe_kanban_global_click oe_kanban_card">
<div class="oe_kanban_title">
<strong><field name="name" /></strong>
</div>
<div class="oe_kanban_prices">
<div t-if="record.state.raw_value == 'offer_received'" class="oe_kanban_best_price">
<strong>Best Price:</strong> <field name="best_price" />
</div>
<div t-if="record.state.raw_value == 'offer_accepted'" class="oe_kanban_selling_price">
<strong>Selling Price:</strong> <field name="selling_price" />
</div>
<div class="oe_kanban_expected_price">
<strong>Expected Price:</strong> <field name="expected_price" />
</div>
</div>
<div class="oe_kanban_tags">
<field name="tag_ids" widget="many2many_tags" />
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
</record>
<record id="estate_property_list" model="ir.ui.view">
<field name="name">estate.property.list</field>
<field name="model">estate.property</field>
Expand Down

0 comments on commit ede8d3e

Please sign in to comment.