File tree Expand file tree Collapse file tree 4 files changed +72
-0
lines changed
Expand file tree Collapse file tree 4 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ # Part of Odoo. See LICENSE file for full copyright and licensing details.
2+
3+ from . import models
Original file line number Diff line number Diff line change 1+ # Part of Odoo. See LICENSE file for full copyright and licensing details.
2+ {
3+ "name" : "Real Estate Accounting" ,
4+ "author" : "Odoo" ,
5+ "category" : "Sales/Real Estate" ,
6+ "sequence" : 16 ,
7+ "summary" : "Integration between Real Estate and Accounting" ,
8+ "description" : """
9+ Real Estate Accounting Integration
10+ ===================================
11+ This module integrates the Real Estate module with Accounting:
12+ * Automatic invoice generation
13+ * Commission tracking
14+ * Financial reporting
15+ """ ,
16+ "depends" : ["estate" , "account" ],
17+ "data" : [],
18+ "application" : False ,
19+ "license" : "LGPL-3" ,
20+ }
Original file line number Diff line number Diff line change 1+ # Part of Odoo. See LICENSE file for full copyright and licensing details.
2+
3+ from . import estate_property
Original file line number Diff line number Diff line change 1+ # Part of Odoo. See LICENSE file for full copyright and licensing details.
2+
3+ from odoo import models
4+
5+
6+ class EstateProperty (models .Model ):
7+ _inherit = "estate.property"
8+
9+ def action_sold (self ):
10+ for property in self :
11+ self .env ['account.move' ].create (
12+ {
13+ 'partner_id' : property .buyer_id .id ,
14+ 'move_type' : 'out_invoice' ,
15+ 'invoice_line_ids' : [
16+ (
17+ 0 ,
18+ 0 ,
19+ {
20+ 'name' : 'Property price' ,
21+ 'quantity' : 1 ,
22+ 'price_unit' : property .selling_price ,
23+ },
24+ ),
25+ (
26+ 0 ,
27+ 0 ,
28+ {
29+ 'name' : 'Commission (6% of selling price)' ,
30+ 'quantity' : 1 ,
31+ 'price_unit' : property .selling_price * 0.06 ,
32+ },
33+ ),
34+ (
35+ 0 ,
36+ 0 ,
37+ {
38+ 'name' : 'Administrative fees' ,
39+ 'quantity' : 1 ,
40+ 'price_unit' : 100.00 ,
41+ },
42+ ),
43+ ],
44+ }
45+ )
46+ return super ().action_sold ()
You can’t perform that action at this time.
0 commit comments