| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Invoicing (account) • Discuss (mail) • Purchase (purchase) |
| Lines of code | 56 |
| Technical Name |
se_stock_reverse_landed_costs |
| License | LGPL-3 |
| Website | https://sprinterp.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Invoicing (account) • Discuss (mail) • Purchase (purchase) |
| Lines of code | 56 |
| Technical Name |
se_stock_reverse_landed_costs |
| License | LGPL-3 |
| Website | https://sprinterp.com |
Reset and Cancel Landed Cost in Odoo
Unlock verified accounting records by safely reversing asset data adjustments, purging linked stock valuation layers, and returning documents to draft stages.
Key Module Highlights
Stock Landed Cost Cancellation & Reset Workflow
Initialize Stock Landed Cost Record in Draft State
Navigate to the Inventory application, open the Landed Costs form workspace under
the Operations sub-menu, and initialize a record (e.g. LC/2025/0002). Configure
your allocated target inventory Transfers, assign the appropriate Journal
accounts, and add your overhead item prices inside the Additional Costs grid.
Key Logic: Click the Compute button at the bottom right corner to invoke the core valuation distribution algorithms, filling out your specific asset rows before executing the validation process.
Review Computed Lines and Validate Landed Costs
Access the computed lines workspace inside the "Valuation Adjustments" notebook tab to verify details like the original product quantities, base asset values, and added distributed lines. Once audited, execute formal asset locking by clicking the primary "Validate" button on the header bar.
Key Logic: Validation triggers the native system to post linked journal lines and
construct active stock.valuation.layer records. Our inherited code safely
intercept this workflow using the overridden button_validate() method to clean
old relational debris.
Execute Overridden Cancellation on Validated Postings
When a record shifts into the validated "Posted" stage, Odoo locks standard adjustments. To reverse this state and unlock calculations, click on the visible header action button named "Cancel" to trigger our custom cascade backend wipeout methods.
Key Logic: The system evaluates if state == 'done'. If true, our custom
code intercepts the process to automatically flip linked journal entries (account_move_id)
back to draft and cancels them before executing the base method.
Convert Cancelled Records Back to Draft Layouts
Once the document shifts into the "Cancelled" stage, the old valuation adjustments are fully wiped out from the backend repository. To unlock editing privileges and make parameters customizable again, click on the newly visible primary action button "Set to Draft".
Key Logic: Executing button_draft() checks if state !=
'cancel' to throw validation errors. It safely detaches old cancelled accounting move
markers by writing {'account_move_id': False}, allowing fluid re-computation.
Recompute parameters and Re-validate Draft Landed Cost
The sheet has successfully rolled back into the editable "Draft" stage layout. All accounting locks are officially removed, allowing you to completely modify prices, add lines, click Compute, or hit the prominent "Validate" header action to post corrected entries.
Key Logic: When re-validating this draft record, our overridden method ensures that
if any old historical journal entries are still attached, they are immediately cleared via
cost.write({'account_move_id': False}) before the native super execution runs.
Successful Final Re-Validation & Posted Correction
After executing your adjustments, re-validating the record shifts the document back into the secure "Posted" state. The engine seamlessly generates a clean, updated Journal Entry reference link, fully updating structural ledger chains with complete auditing safety.
Key Logic: The successful completion of this cycle proves the system's ability to
cleanly cancel old valuations and seamlessly re-publish fresh
stock.valuation.layer assets without duplicate entries or data conflicts.
Key Features & Capabilities
Empower your inventory accounting controls by safely overriding validated asset allocations and executing structural corrections in Odoo.
Landed Cost Reversal
Enables full cancellation mechanics over already validated ('Done') costing sheets, breaking operational data entry locks completely.
Valuation Layer Purge
Automatically tracks and fully unlinks relational stock valuation layers (stock.valuation.layer) linked to the targets.
Adjustment Lines Wipeout
Wipes added landed metrics within structural grids, reverting extra asset distribution costs back to 0.0 automatically.
Set to Draft Flow
Introduces an interactive primary action button allowing cancelled files to easily convert back into re-computable layouts.
Stage Guard Barriers
Protects sequence pipelines by blocking users from forcing invalid states through native validation error pop-ups.
Journal Entry Control
Triggers deep financial ledger hooks to unpost, cancel, and clear linked account entries cleanly during reversals.
Need Any Help?
Installation, Configuration & Bug Fixing support from our experts.
© 2017 SprintERP Technologies. All Rights Reserved.
Please log in to comment on this module