[ADD] estate: add initial module structure - #1366
Conversation
|
I see you have a lot of files leftover from when you were using PyCharm, let's try to remove them! |
2ebe8ce to
41367ac
Compare
1bad78c to
1f717c8
Compare
|
Enjoy |
1f717c8 to
caea9be
Compare
09fb758 to
ab1e0d4
Compare
SaddemAmine
left a comment
There was a problem hiding this comment.
Very good stuff, thank you for the PR Tony!
I see that in older commits, the ci/style issues pop up again, usually you would need to make sure every commit passes CI on its own. For the purposes of this tutorial, I'll leave that up to you to decide if you want to go back and fix the styling errors.
| @@ -0,0 +1,21 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <odoo> | |||
|
|
|||
There was a problem hiding this comment.
No need for the extra lines here and at L20 btw!
| name="Property Tags" | ||
| parent="estate_menu_settings" | ||
| action="estate_property_tag_action"/> | ||
|
|
There was a problem hiding this comment.
Nitpicking but this is an unnecessary line break
There was a problem hiding this comment.
Same in this file about the line breaks. Again, mostly my style of coding and not a blocking thing per se
| @@ -0,0 +1,75 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
| <odoo> | |||
| <!-- 1. Action --> | |||
There was a problem hiding this comment.
| <!-- 1. Action --> | |
| <!-- 1. Actions --> |
| { | ||
| 'name': 'Real Estate', | ||
| 'version': '1.0', | ||
| 'author': 'tomic', |
| "partner_id": record.buyer_id.id, | ||
| "move_type": "out_invoice", | ||
| "invoice_line_ids": [ | ||
| Command.create({ | ||
| "name": f"Commission (6%) - {record.name}", | ||
| "quantity": 1, | ||
| "price_unit": 0.06 * record.selling_price, | ||
| }), | ||
| Command.create({ | ||
| "name": "Administrative fees", | ||
| "quantity": 1, | ||
| "price_unit": 100.00, | ||
| }), | ||
| ], |
There was a problem hiding this comment.
Btw a nice convention we started adopting in my team recently in using single quotes for technical strings and double quotes for the user facing ones. Feel free to start doing that too if it speaks to you. The idea is to be able to tell at a glance if a string is meant to be visible by the user.
| "move_type": "out_invoice", | ||
| "invoice_line_ids": [ | ||
| Command.create({ | ||
| "name": f"Commission (6%) - {record.name}", |
| "price_unit": 0.06 * record.selling_price, | ||
| }), | ||
| Command.create({ | ||
| "name": "Administrative fees", |
| }) | ||
|
|
||
| if invoices_vals: | ||
| self.env["account.move"].with_context(default_move_type="out_invoice").create(invoices_vals) |
There was a problem hiding this comment.
Why are we using default_move_type here?
|
BTW your commit messages' titles cannot all be ADD, we use that one only for adding a new module. Subsequent ones are improvements to /estate do they're IMP. Except for the one where you add estate_account! Read more here https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html |
ab1e0d4 to
e152b6f
Compare
| <div class="oe_button_box" name="button_box"> | ||
| <button name="%(estate_property_offer_action)d" | ||
| type="action" | ||
| class="oe_stat_button" | ||
| icon="fa-money"> | ||
| <field name="offer_count" widget="statinfo" string="Offers"/> | ||
| </button> | ||
| </div> |
There was a problem hiding this comment.
I think we're missing a domain here btw
3034697 to
19b4dc8
Compare

No description provided.