Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from . import account_move_reversal

View File

@@ -0,0 +1,31 @@
# Copyright 2021 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models
class AccountMoveReversal(models.TransientModel):
_inherit = "account.move.reversal"
sale_qty_to_reinvoice = fields.Boolean(
string="This credit note will be reinvoiced",
help="Leave it marked if you will reinvoice the same sale order line "
"(standard behaviour)",
)
@api.model
def default_get(self, fields_list):
res = super().default_get(fields_list)
company = (
self.env["res.company"].browse(res.get("company_id"))
if res.get("company_id")
else self.env.company
)
res["sale_qty_to_reinvoice"] = company.reinvoice_credit_note_default
return res
def reverse_moves(self, is_modify=False):
sale_qty_to_reinvoice = True if is_modify else self.sale_qty_to_reinvoice
return super(
AccountMoveReversal,
self.with_context(sale_qty_to_reinvoice=sale_qty_to_reinvoice),
).reverse_moves(is_modify=is_modify)

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_account_move_reversal" model="ir.ui.view">
<field name="name">account.move.reversal.form.inherit</field>
<field name="model">account.move.reversal</field>
<field name="inherit_id" ref="account.view_account_move_reversal" />
<field name="arch" type="xml">
<xpath expr="//field[@name='journal_id']/.." position="after">
<group
name="sale_line_refund_qty"
invisible="move_type != 'out_invoice'"
>
<field name="sale_qty_to_reinvoice" />
<div class="oe_grey" colspan="4">
Leave it marked when other customer invoices are expected for the quantities in the credit note.
</div>
</group>
</xpath>
</field>
</record>
</odoo>