-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[ADD] estate, awesome_dashboard, awesome_owl: tutorial chapters #852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 18.0
Are you sure you want to change the base?
Conversation
This commit initializes the estate module with base setup: - `__init__.py` and `__manifest__.py` - Core model: `estate.property` - Basic model structure and folder layout
Set up the foundational structure of the `estate` module to enable property management workflows. This setup ensures the module is installable and functional from the start with essential views, menus,action controls
Improves the estate property form with: - Tabs using <notebook> for Description and Sales info - many2many_tags widget for Tags Adds corresponding menu items and actions under a new Settings section.
Reordered XML files in to ensure is loaded before any views referencing it.\n\nPreviously, referred to before it was defined in , causing:\n External ID not found in the system: estate.estate_menu_settings\n\nThis update prevents that error by ensuring menu definitions are loaded first.
…elds, view This update covers Chapters 11 and 12 of the official Server Framework 101 tutorial: Added stat button to estate.property.type to show related offers - Introduced `property_type_id` related field on estate.property.offer - Computed `offer_count` on estate.property.type - Linked the stat button to open the offer tree view with filtered domain Inherited res.users to add property_ids field - Added a new Many2many relationship between users and properties - Created a notebook page in `base.view_users_form` using view inheritance - Extended the view cleanly via `inherit_id` and XPath logic Improved offer creation logic for batch safety - Replaced `@api.model` with `@api.model_create_multi` in `create()` method - Handled list of vals dicts and avoided duplicate state setting - Prevented offer creation with price lower than the current highest offer
- Implemented access control (record rules + ir.model.access.csv) - Added master data for property types using CSV - Defined demo data for properties and offers using XML - Used `eval` for dynamic values like availability and deadline dates - Used `ref` to link partners and properties in offers - Created inline One2many demo offers using `Command.create()` - Ensured offers respect existing business constraints via computed/inverse fields
- Created sub-template 'report_offer_table_template' for rendering property offers - Added salesman report 'report_estate_salesman_offer_document' bound to res.users - Ensured proper use of t-if/t-else to avoid QWeb rendering errors - Prepared base template structure for extension in estate_account (e.g. invoice info for sold properties)
This commit adds transaction-based unit tests in the estate module
…ange prop This commit adds a reusable Counter component to the awesome_owl module using OWL. - Maintains internal reactive state using `useState` - Increments count on button click - Accepts an optional `onChange` callback prop to notify parent components of state updates
…sed layout Added a new Owl-based dashboard to the awesome_dashboard module. - Implemented the main `AwesomeDashboard` client action using the standard Layout component. - Added control buttons at the top for quick access to Customers and Leads. - Displayed key statistics (new orders, total amount, average quantity, etc.) using styled dashboard cards. - A new statistics service using `memoize()` to avoid repeated RPC calls , data is fetched once and reused.
…rable - Added a PieChart card to visualize order distribution by size - Integrated real-time statistics via a dedicated service layer - Enabled lazy loading of the dashboard component using the `lazy_components` registry - Refactored the dashboard to use a registry-driven architecture - Registered all dashboard cards via the `awesome_dashboard_items` registry category - Introduced a settings dialog that allows users to enable or disable individual dashboard items - Stored user preferences in `localStorage` to preserve dashboard layout between sessions
Base should be 18.0.And commit message should be proper. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
i see many commented code in PR.You can remove this code.
'name': "Awesome Dashboard", | ||
|
||
'summary': """ | ||
"name": "Awesome Dashboard", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't make unnecessary changes.
@@ -8,8 +8,9 @@ | |||
|
|||
logger = logging.getLogger(__name__) | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary extra line.
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary changes.
|
||
} | ||
|
||
registry.category("lazy_components").add("awesome_dashboard.AwesomeDashboard", AwesomeDashboard); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should always be one blank line at the end of the file.
font-size: 48px; | ||
color: #228B22; | ||
font-weight: bold; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, add one blank line.
|
||
offer_ids = fields.One2many("estate.property.offer", "property_id", string="Offers") | ||
|
||
_sql_constraints = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be defined after all field declarations.
<field name="print_report_name">'Salesman Property Offers - %s' % (object.name)</field> | ||
</record> | ||
|
||
</odoo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be one blank line at the end of the file.
for offer in self: | ||
offer.status = "refused" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the user be able to refuse multiple offers at the same time?
self.garden_area = 10 | ||
self.garden_orientation = "north" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use .write() here.
string="Garden Orientation", | ||
) | ||
|
||
postcode = fields.Char(string="Postcode") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be Integer().
This pull request includes work done across three modules , estate, awesome_dashboard, and awesome_owl
estate module
awesome_dashboard module
awesome_owl module