Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1 @@
from . import sale_order_line_rma_wizard

View file

@ -0,0 +1,23 @@
# Copyright 2024 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleOrderLineRmaWizard(models.TransientModel):
_inherit = "sale.order.line.rma.wizard"
lot_id = fields.Many2one(comodel_name="stock.lot", string="Lot/Serial Number")
lots_visible = fields.Boolean(compute="_compute_lots_visible")
@api.depends("product_id.tracking")
def _compute_lots_visible(self):
for rec in self:
rec.lots_visible = rec.product_id.tracking != "none"
def _prepare_rma_values(self):
self.ensure_one()
values = super()._prepare_rma_values()
values["lot_id"] = self.lot_id.id
return values

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 ACSONE SA/NV
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record model="ir.ui.view" id="sale_order_rma_wizard_form_view">
<field name="model">sale.order.rma.wizard</field>
<field name="inherit_id" ref="rma_sale.sale_order_rma_wizard_form_view" />
<field name="arch" type="xml">
<xpath expr="//field[@name='product_id']" position="after">
<field name="lots_visible" invisible="True" />
<field
name="lot_id"
groups="stock.group_production_lot"
attrs="{'invisible': [('lots_visible', '=', False)]}"
/>
</xpath>
</field>
</record>
</odoo>