Skip to content

[ADD] *: practice task implementation #690

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

Draft
wants to merge 5 commits into
base: 18.0
Choose a base branch
from

Conversation

mamg-odoo
Copy link

@mamg-odoo mamg-odoo commented Apr 3, 2025

[[ADD] inventory_task: Customize Inventory UI and Quantity Management]
[ADD] kit_product_type: implement kit type product and sale order management]
[ADD] discount_update: update global discount on order line changes]
[ADD] rental: Implemented deposit work flow for rental orders]
[[ADD] pos_salesperson: Added Salesperson button in POS]

@robodoo
Copy link

robodoo commented Apr 3, 2025

Pull request status dashboard

@mamg-odoo mamg-odoo force-pushed the 18.0-practice-task-mamg branch 11 times, most recently from 0238bbf to e2d48b0 Compare April 9, 2025 07:12
@mamg-odoo mamg-odoo force-pushed the 18.0-practice-task-mamg branch 2 times, most recently from 161b538 to 63ca882 Compare April 15, 2025 06:02
Created inventory_task bridge module for custom inventory changes .
Removed Update Quantity button  from header.
Removed On Hand smart button .
Updated Forecasted smart button
  - Red when virtual_available quantity is negative  .
  - Green when virtual_available quantity is positive  .
Moved Print Labels and Replenish  buttons from the header to the actions cog  .
Added a new field in product.template to easily update Quantity on Hand
  - Read-only when multi-location is enabled  .
  - Can be updated using the Update button  .
@mamg-odoo mamg-odoo force-pushed the 18.0-practice-task-mamg branch from 63ca882 to 7138525 Compare April 15, 2025 06:08
Copy link

@nihp-odoo nihp-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helloo @mamg-odoo
Some changes and suggestions regarding your product_kit task.
Thanks!

@mamg-odoo mamg-odoo changed the title [ADD] inventory_task: Customize Inventory UI and Quantity Management [ADD] *: practice task implementation Apr 15, 2025
…agement

- Introduced a new product type Kit via is_kit Boolean field on product.template.
- When is_kit is enabled, a Many2many field appears to select sub-products.
- On Sales Orders, kit products now show a Add Sub Products button.
- Sub-products can be customized (quantity and price) through a wizard.
- Confirming the wizard adds sub-products to the order line with unit price and
 subtotal as 0.
- The cost of sub-products is included in the main kit product’s subtotal.
- Added `print_in_report` Boolean on sale.order to control printing sub-products
 in reports/customer preview.
- Once the Sales Order is confirmed, the Add Sub Products button is hidden.
- Implemented dynamic recalculation of global discount lines whenever a
product is added, removed, or updated in the sale order lines.
- Prevents outdated or incorrect discount amounts by cleaning and
 recreating discount lines on each change.
- Handles both single-tax and multi-tax scenarios to preserve tax consistency
 in discounts.
- Added a field in Rental Settings to configure a default deposit
product (rental_product_id).
- Extended product template with require_deposite and deposite_amount fields
 under Rental tab.
- Automatically creates a deposit order line linked to the main rental product
 line when deposit is required.
- Ensures deposit line quantity syncs with the main rental product quantity and
is read only.
- Displayed deposit amount on the product page (website_sale).
- Updated the cart and checkout views to include and properly handle
deposit lines.
- Added salesperson_id field in pos.order model pointing to hr.employee.
- Displayed salesperson field in POS order list and form views.
- Implemented button in POS UI for selecting a salesperson per order.
- Created OWL components with search and fuzzy match functionality.
- Loaded hr.employee model into POS using pos_available_models registry.
- Extended pos.session to include HR employee data during POS loading.
@mamg-odoo mamg-odoo force-pushed the 18.0-practice-task-mamg branch from 7138525 to 7f474ea Compare April 15, 2025 13:04
Copy link

@nihp-odoo nihp-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @mamg-odoo
Some changes and comments on your desposite_in_portal task.

Test functional properly, there is some issue in settings and product's page on website.

Thanks!

@@ -0,0 +1,11 @@
{
"name": "deposite_in_rental",
"depends": ["base", "account_invoice_extract", "sale_renting", "website_sale"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"depends": ["base", "account_invoice_extract", "sale_renting", "website_sale"],
"depends": ["website_sale_renting"],

No need for base module and are we using account_invoice_extract?

qty = vals["product_uom_qty"]
line.child_rental_id.write(
{
"product_uom_qty": qty,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"product_uom_qty": qty,
"product_uom_qty": vals["product_uom_qty"]

line.child_rental_id.write(
{
"product_uom_qty": qty,
"price_unit": line.product_template_id.deposite_amount,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this in write method?

@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<odoo>
<record id="product_template_rental_inherit" model="ir.ui.view">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID naming should be according to the coding guidelines! Check all files.
https://www.odoo.com/documentation/18.0/contributing/development/coding_guidelines.html#xml-ids-and-naming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any changes from this file.. cart_lines will be added automatically, no need to change in that.
And there's no change in product page, check specs properly.

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