| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 1333 |
| Technical Name |
nexterp_sgr_sale |
| License | OPL-1 |
| Website | https://www.nexterp.ro |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Inventory (stock)
• Discuss (mail) • Invoicing (account) |
| Community Apps Dependencies | Show |
| Lines of code | 1333 |
| Technical Name |
nexterp_sgr_sale |
| License | OPL-1 |
| Website | https://www.nexterp.ro |
Romania - SGR on Sales
Automatic SGR deposit child line on sale.order.line.
Overview
Make the SGR deposit a non-event on sale orders. Adding a beverage line subject to SGR appends a child line under it with the matching SGR product, the deposit rate effective on the order date and zero taxes — exactly the layout RetuRO requires on the resulting invoice.
The two lines stay synchronized: changing the quantity or product on
the parent recalculates the SGR child; removing the parent removes the
child through ondelete='cascade'. On delivery, the beverage and its
SGR companion go out as separate stock moves so the warehouse can
track empties leaving the building independently from the beverage
itself.
The is_sgr_line flag is propagated through to the invoice line via
_prepare_invoice_line, so when nexterp_sgr_account is installed
the deposit on the invoice is recognized and adopted instead of
duplicated. The flow is the same for direct sales, delivery-based
invoicing and down-payments.
Built & supported by NextERP Romania
Romanian Odoo specialists, here for the long run — from implementation to localization and day-to-day production support.
What we do
Odoo Solutions
From quick-start rollouts to multi-company deployments and custom modules built for your processes.
Romanian Localization
SAF-T (D406), e-Factura, e-Transport, D300 / D390 / D394, ANAF integration, full chart of accounts and fiscal positions.
Our Services
Implementation, customization, migration, integration, support and consultancy — Romanian-speaking, SLA-backed.
Features
- Auto SGR child line on every SO line — adding a beverage with an
sgr_product_idto a sale order instantly appends a pairedsale.order.linewith the matching SGR product, the deposit rate effective ondate_orderand zero taxes. - Parent/child sync — quantity, product and UoM changes on the
parent line propagate to the SGR child; removing the parent cascades
to the child via
ondelete='cascade'. - No duplication on cross-module flows — when an SO line is
created by an upstream sync that already carries an SGR sibling,
the module attaches it via
sgr_parent_line_idinstead of creating a duplicate. - Separate stock moves on delivery — the beverage and its SGR packaging go out as independent stock moves so the warehouse can track the empties separately as soon as they leave the building.
- Invoice propagation —
_prepare_invoice_linecarriesis_sgr_line=Trueto the resulting invoice line, so the deposit is recognized bynexterp_sgr_accountand adopted instead of duplicated. - Per-SO opt-out —
sale.order.sgr_auto_linesadds an Auto-add SGR Lines boolean after Customer Reference, defaulting from the company-wide setting. Disable on orders that come pre-filled from EDI or external sync. - Tracks the SGR pair —
is_sgr_lineandsgr_parent_line_idfields onsale.order.linemake deposits easy to filter, group and report on.
Configuration
1. Link beverage products to their SGR companion
On each beverage SKU subject to SGR, open the product in
Inventory → Products and set the SGR Deposit field to the
matching SGR product (the one carrying the right category — Glass
Small, Plastic Large, Metal, etc.). This is the standard field
provided by nexterp_sgr; the sale module does not add a new field
on the product itself.
From that moment on, every sale order line referencing this beverage will receive an automatic SGR child line.
2. Default behavior on new orders
Every sale.order carries an Auto-add SGR Lines boolean shown
after the Customer Reference field on the order form. It defaults
from the company-wide setting at
Settings → Inventory → SGR → Auto-add SGR Lines.
- Keep it enabled for hand-keyed quotations, e-commerce orders and orders generated by repeat-customer workflows — the SGR child line appears under each beverage line automatically.
- Disable it on orders whose lines come pre-filled with SGR rows from an EDI feed, an EDI portal or any upstream sync. The orphan SGR sibling is then adopted by its parent line on save, without creating a duplicate.
3. Invoice flow
If nexterp_sgr_account is installed and the company SGR Liability
Account (462 / 461) is set, the SGR component on the resulting
invoice posts to the liability account instead of revenue. Nothing
extra to configure here — propagation is handled by
_prepare_invoice_line.
How it works
Creating a sale order with beverages
- Open a sale order and add one or more beverage products subject to SGR.
- As each beverage line is saved, an SGR child line is appended under it with the matching SGR product, the deposit rate effective on the order date as Unit Price and zero taxes.
- Change the parent line quantity, product or UoM — the SGR child follows. Remove the parent line — the SGR child is removed automatically.
- Confirm the quotation. The two lines now ride together through delivery and invoicing.
Delivery
Delivery picks generate two separate stock moves for each beverage
- SGR pair, even when they were created from a single SO line pair:
- The beverage hits the customer location as usual.
- The SGR product leaves stock on its own move, so the on-hand quantity of empties stays accurate and visible.
This is what makes the SGR Position and SGR Stock & Movements reports possible — the two products are tracked independently because their stock will diverge as soon as empties come back from consumers.
Invoicing
When the order is invoiced — either at confirmation, on delivery or
after a down-payment — both the beverage and the SGR line carry over.
The SGR line is non-taxable and bears the SGR deposit. If
nexterp_sgr_account is also installed, the invoice line is
recognized and linked to its parent via sgr_parent_line_id, so the
deposit is never duplicated.
Opt-out per order
If an order's lines come pre-populated with SGR rows from an external system (EDI, web portal, ERP-to-ERP sync), untick Auto-add SGR Lines on the order header. The module then leaves the upstream lines alone and only attaches orphan SGR siblings to their parent beverage lines for traceability.
Versions
19.0.1.0.0 (2026-05-25)
- Changelog tracking starts at this release.
Discover the NextERP suite
Other modules from the same publisher, built to work together.
NextERP Romania
Odoo implementation, customization, Romanian localization and long-term support since 2018.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module