Skip to content

18.0 - Technical Onboarding - AHSL #364

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

Open
wants to merge 35 commits into
base: 18.0
Choose a base branch
from

Conversation

AhmedGamal2212
Copy link
Member

No description provided.

apply the instructions by which I declare a new app. add the necessary configurations in manifest to let it show up in the apps list without further filtering.
@robodoo
Copy link

robodoo commented Feb 17, 2025

Pull request status dashboard

…chapter-2

change the version to refer to mdoule's version instead of Odoo's version. add a license as it was missing.
added the estate.property model to manage properties in the estate
module. it includes all the essential fields like name, price, bedrooms,
.. etc, with some options for the user to choose the garden orientation.

chapter-3
add access security access rules under the security directory to make
the module accessible. add the idea config files to gitignore not to be
included in the upcoming commits.

chapter-4
create action to add the basic functionality of viewing and adding
estate properties. implement menus to better visualize and access the
properties. Add attributes to previously set fields to prevent copying,
set default values, and prevent modifications. Add more predefined
reserved fields to enable more functionalities (state, active).

chapter-5
@AhmedGamal2212 AhmedGamal2212 force-pushed the 18.0-technical-onboarding-ahsl branch from 3f0897f to 1545697 Compare February 18, 2025 18:01
add file end empty line in __init__ files to align with coding style
conventions. add a comma after the last record in lists for better
extensibility options. remove .idea ignore from local .gitignore and
move it to global ignore file. fix alignment in estate_menus.
add empty missing empty lines in xml and csv files to align with coding
style conventions.
create a custom form for properties for better visuals and to suit
business needs. create a notebook to be able to separate related fields
together in one page. add a custom search bar to better search in
relevant fields related to properties, group properties by postcode, or
filter them depending on availability or active status. set a new
suitable title for the action.

chapter-6
add a new model enabling users to specify a tag for each property.
implement menus to simplify accessing property tags represented in
settings and property tags. create access rules for the new model. add a
views file describing the related action, and list and form views.
link the model to the __init__ file for the module. add views file to
__manifest__ to be recognized and loaded. add two new fields for the
estate.property model to be able to access the buyer and seller in the
form, and search.

chapter-7
create an estate property tag model to be added to properties specifying
more context about them. create a new menu to simplify accessing tags.
add a field to estate.property to show and add related tags to the
property. create some views and an action to suite viewing, creating and
accessing tags. add new views file to __manifest__ to be loaded when the
server starts.

chapter-7
create a new estate.property.offer model to manage offers for specific
properties. create list, and form views for the offer to manage how it
looks. add offer_ids field to estate.property model to be able to view
offers from inside the property form. create a new page in the notebook
form view for the estate.property for simplifying accessing the offers.
link views file to manifest to be loaded when starting the server. add
access rules for the new model. rename estate_property_tag file to
estate_property_tag_views to meet the convention.

chapter-7
create computed fields to estate.property to compute the total area
automatically when the user changes one of the two summed values. add a
onchange behavior for the garden toggling that changes garden_rea and
garden_orientation's values either by resetting them when toggled off
and putting a default value when toggled on. implement a computed field
and inverse method in property offer model to be able to see the
validity days when changing the deadline while updating the validity
when changing the deadline as well. change the form and list views for
offers to reflect the changes.

chapter-8
create two buttons for selling and canceling a property and automtaing
the process of changing the state. handle the logic of not selling a
cancelled property and not canceling a sold property. add two buttons
for offers to accept and refuse them, handle setting the buyer and
selling price for the property upon acceptance. handle the logic of not
accepting more than one offer at the same time for the same property.
implement logic for clearing buyer and selling price data upon refusing
a previously accepted offer to enable accepting another offer.

chapter-9
add sql constraints to estate property to ensure expected price and
selling price are positive and raise errors of that wasn't the case. add
sql constrains to estate property offer to ensure the offered price is
always positive. attach a sql constraint check on both type and tag
to ensure they are always unique and provide an error message otherwise.
implement python constrains check to estate property to check the selling price being at least 90% of the expected one.
use float utils from odoo to better deal with floats. define a couple of
constants describing the values of the threshold should be met for the
selling price and the epsilon when rounding floats in estate properties
to achieve a readable and clean code avoiding magic numbers.

chapter-10
spread the imports in __init__ file into multiple lines for better
extensibility. add a default value when computing the best offer instead
of handling manually. ensure one record is processed in each action when
accepting and refusing offers.
add colors for tags, properties, offers to make things look better
depending on the preference and state of the record. implement
conditional appearance for buttons and fields to suit the business needs
and prevent accidental errors. add confirmation messages to cancel and
sell buttons to prevent accidental errors. create a statinfo button to
show the number of offers for that type of properties and view them
directly. add a filter domain to find properties with living area
greater than or equal to the entered number for better convenience.
enable the option of editing records inline instead of openeing the form
view when accessed from another list view.

chapter-11
apply ondelete method to prevent deletion of a property if its state is
not 'new' or 'cancelled'. override create method in offers to handle
preventing creating an offer with a lowr price than the maximum price
offered. extend user form view to add a new page for estate properties
related to that user using view inheritance.

chapter-12
create a new module to handle creating invoices when a property is sold.
implement the inheritance for extending the action_sell_action and then
create a new invoice contains two lines linked to it upon creation.

chapter-13
create a kanban view using QWeb templating for properties to achieve
better viewing experience.

chapter-14
@AhmedGamal2212 AhmedGamal2212 force-pushed the 18.0-technical-onboarding-ahsl branch from 0cd1102 to 52690e1 Compare February 24, 2025 13:16
refactor create overridden method to process handling batches of records instead of single records.
modify kanban view for the estate property to appear. use card instead of kanban-box in kanban view as it is no longer used.
move the logic of changing the state of the property to 'offer_received' to the create in offer model instead of onchange in estate_property model for better separation of concerns applying SRP.
move the constants for the offer price threshold should be met and the epsilon for floats comparison to a separate file making it central to be used all over the module instead of redefining it locally at many places.
create a reusable Counter component to be able to create as many separate counters as needed.
create a Card component and use props to pass values through the parent component Playground. use t-out and markup to show the difference between escaped content and non escaped content.

chapter-1-part-4
define a new state in the playground to hold the summation of the two children counters.
bind the onChange function to increase the sum by one to define the context for the function. define the optional prop as an onChange function that is called when the child's state is changed to update the parent's sum.

chapter-1-part-6
@AhmedGamal2212 AhmedGamal2212 force-pushed the 18.0-technical-onboarding-ahsl branch from 4760d4c to 0f9dfa6 Compare February 24, 2025 16:02
create a todo item component that takes a prop todo and shows its id and description in a card style.
add a todolist component that accepts an optional prop todos and keeps a state for the available todos, iterates over them and displays a list of TodoItem.
append the todolist to the playground.

chapter-1-part-7
@AhmedGamal2212 AhmedGamal2212 force-pushed the 18.0-technical-onboarding-ahsl branch from cb4c05b to dee1da8 Compare February 25, 2025 11:10
add an input field that handles the event of key pressing and reacts to them by adding a new task to the todos if they're suitable.
implement addTask method in todo_list that handles the process of adding tasks and updating the state. maintain a global variable in the TodoList to handle generating new ids for tasks.

chapter-1-part-9
use reference to access the input field for the tasks and implement an autofocus feature when on mounting the component. extract the autofocus feature into a separate custom hook under src/utils.js.

chapter-1-part-10
add the functionality of toggling a task and marking it as completed. use a callback prop to implement the communication between the child TodoItem and parent TodoList

chapter-1-part-11
add callback prop to invoke re-renders on clicking the remove icon. change the conditional decoration to be applied only on the body of the card instead of applying it globally on the card. add the remove icon to the card header. change the header display to flex for better alignment for the elements.

chapter-1-part-12
change the Card component to be able to accept dynamic content as default slot props. add prop validation to the Card.

chapter-1-part-13
enable folding and unfolding the card depending on the state of the button 'toggle'. redefine the structure for better styling support. group the cards together to better align them.

chapter-1-part-14
create dashboard and dashboard item components. use service and rpc to show customers, leads, and call the server to get stats data. use slots to enable defining the dashboard item dynamically.

chapter-2-part-4
create a new service to load statistics instead of doing it in the dashboard component. use memoize to cache the results of the function.

chapter-2-part-5
create a PieChart to view sales of t-shirts organized by size. use loadJS to lazy load the chart library in order to enhance performance.

chapter-2-part-6
refactor dashboard serviece to add live updates for the dashboard using reactive components. use lazy components to lazy load the dashboard on demand only.

chapter-2-part-8
add an items file containing the definition of each component of the dashboard items. genericly use a foreach to render eash of these items with the appropriate data in new dashboard items. create two card components to specify whether the item being renderd is a number card or a pie chart card.

chapter-2-part-9
add a dialog and a settings option to enable editing what is visible in the dashboard by the user. use localStorage to store the settings of the user. create configurations to enable setting the view easily.

chapter-2-part-11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants