odoo_c2c/weekthree.md

4.7 KiB

Week 3 Implementation Guide: Intercompany Sync + Repacking + Retail Sales + Dashboards

This guide provides instructions to test the advanced features introduced in Week 3, specifically around automated company-to-company transactions and bulk repacking.


Step 3.1 — Intercompany Automation Engine (c2c_intercompany_sync)

Odoo Community does not support automated cross-company Sales/Purchases natively. The new c2c_intercompany_sync module bypasses this limitation, allowing your companies to mirror transactions instantly.

How to Configure Intercompany Sync

  1. Turn on Developer Mode (if not already enabled).
  2. Go to Settings > Users & Companies > Companies.
  3. Open C2C Agricorp India Pvt Ltd.
  4. At the bottom, look for the new tab called "Intercompany Automation".
  5. Check both boxes:
    • Auto-create Sales Orders
    • Auto-generate Invoices
  6. Go back to your Companies list, and repeat these steps for Clickstocart Inc CA and C2C Imports & Exports.

How to Test Intercompany Sync

To test the flow from Clickstocart Inc CA ordering inventory wholesale from C2C Imports & Exports:

  1. Use the Company Switcher (top right) to switch to Clickstocart Inc CA.
  2. Open Purchase > New.
  3. Select C2C Imports & Exports as the Vendor.
  4. Add 100 units of "Apples" and click Confirm Order.
  5. Now, switch your company in the top right to C2C Imports & Exports.
  6. Open Sales.
  7. Verify: You will immediately see a beautifully drafted Sales Order matching the exact PO you just placed!
  8. Click Confirm on this Sales Order.
  9. Deliver the goods in C2C Imports & Exports.
  10. Verify (Auto-Invoice): When the delivery is confirmed, Odoo automatically processes the Receipt on the Clickstocart Inc CA side and generates Draft Invoices for both companies simultaneously.

Step 3.2 — Custom Repacking Tool (c2c_repacking)

Instead of forcing Warehouse Staff to build complex Manufacturing Orders (BOMs) just to slide 1kg of bulk stock into 10 smaller retail bags, we created an ultra-fast Repacking wizard.

How to Test Repacking

  1. Open the Inventory app.
  2. In the top nav menu, go to Operations > Repack Orders (This is a brand new menu).
  3. Click New.
  4. Set the Source (Bulk Stock):
    • Product: Apples (Bulk)
    • Qty: 20 kg
  5. Set the Destination (Retail Packs):
    • Product: Apple 1kg Retail Bag
    • Qty: 20
  6. Click Confirm Repack.
  7. Verify: The status changes to Done. If you go to the Stock Moves tab, you will see exactly two moves:
    • 20kg bulk was dynamically sent to Scrap/Consumed.
    • 20 retail bags were spawned out of thin air seamlessly connected to the same lot ID.

Step 3.3 & 3.4 — Wholesale and Retail Pricing

Pricelists are fully configured in the core engine. Since they are standard Odoo features, you will manually enable them.

Enabling Pricing/Discounts

  1. Open Sales > Configuration > Settings.
  2. Under the Pricing section, turn ON Pricelists. Select the Advanced price rules (discounts, formulas) option.
  3. Turn ON Discounts (Grant discounts on sales order lines).
  4. Save.

Testing Retail vs Wholesale Pricing

  1. Go to Sales > Products > Pricelists.
  2. Create a pricelist named Wholesale Tier 1.
  3. Add a rule: "If quantity is >= 100 on all products, apply a 20% discount".
  4. When your Retailers create an order, apply the specific Pricelist to the SO, and watch the system automatically apply bulk math logic across the order line.

Step 3.5 — Executive Dashboards (c2c_reports)

All standard and complex operational reports requested have been grouped cleanly into a single unified menu option!

Viewing the Analytics

  1. Go back to your main Odoo Dashboard (where all the app cubes are).
  2. Click the new app titled C2C Dashboards.
  3. You will see a left-side navigation list with your required 5 dashboards:
    • Live Inventory (Grouped hierarchically by Company → Product → Lot)
    • Expiry Alerts (Filters exclusively for lots expiring in the exact next 30 days)
    • Yield & Wastage (Direct feed tying directly back to Week 2 MRP)
    • Intercompany AR/AP (Checks Payable/Receivable balances globally between subsidiaries)
    • P&L Summary (Groups high-level income vs expenses mathematically)

Final Review / Definition of Done Verification

  • Auto SO created from PO logic works.
  • Delivery + Auto-Invoice syncing validated.
  • Repack order converts bulk UoM cleanly into Retail UoM with 2 distinct moves.
  • Complex Discount/Pricelist system turned on in Sales Settings.
  • C2C Dashboards app installed and loading metrics successfully!