File tree Expand file tree Collapse file tree 4 files changed +52
-0
lines changed
Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ 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+ {
4+ 'name' : 'Estate Account' ,
5+ 'version' : '1.0' ,
6+ 'category' : 'Sales/Estate' ,
7+ 'sequence' : 15 ,
8+ 'description' : """
9+ This module is here to help you manage your real estate business.
10+ """ ,
11+ 'summary' : 'Track all the properties you own' ,
12+ 'website' : 'https://www.odoo.com/app/estate_account' ,
13+ 'depends' : [
14+ 'estate' ,
15+ 'account' ,
16+ ],
17+ 'data' : [
18+ ],
19+ 'demo' : [
20+ ],
21+ 'installable' : True ,
22+ 'application' : False ,
23+ 'author' : 'Odoo S.A.' ,
24+ 'license' : 'LGPL-3' ,
25+ }
Original file line number Diff line number Diff line change 1+ from . import estate_property
Original file line number Diff line number Diff line change 1+ from odoo import models , Command
2+
3+ class EstateProperty (models .Model ):
4+ _inherit = 'estate.property'
5+
6+ def action_sold_property (self ):
7+ invoice_vals = {
8+ "name" : "INV° " + str (self .id ),
9+ 'partner_id' : self .buyer_id .id ,
10+ 'move_type' : 'out_invoice' ,
11+ "line_ids" : [
12+ Command .create ({
13+ "name" : "6% of the selling price" ,
14+ "quantity" : "1" ,
15+ "price_unit" : self .selling_price * 0.06 ,
16+ }),
17+ Command .create ({
18+ "name" : "administrative fees" ,
19+ "quantity" : 1 ,
20+ "price_unit" : 100.00 ,
21+ })
22+ ],
23+ }
24+ self .env ['account.move' ].create (invoice_vals )
25+ return super ().action_sold_property ()
You can’t perform that action at this time.
0 commit comments