-
-
Notifications
You must be signed in to change notification settings - Fork 692
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] sale_line_refund_to_invoice_qty: Migration to 16.0
- Loading branch information
Javier Iniesta
committed
Jul 18, 2023
1 parent
632c52c
commit 4502e3c
Showing
7 changed files
with
85 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * sale_line_refund_to_invoice_qty | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move_reversal | ||
msgid "Account Move Reversal" | ||
msgstr "Reversión de asiento contable" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move | ||
msgid "Journal Entry" | ||
msgstr "Asiento contable" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_account_move_line | ||
msgid "Journal Item" | ||
msgstr "Apunte contable" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model.fields,help:sale_line_refund_to_invoice_qty.field_account_move_line__sale_qty_to_reinvoice | ||
msgid "Leave it marked if you will reinvoice the same sale order line" | ||
msgstr "Déjelo marcado si va a volver a facturar la misma línea de pedido de venta" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model.fields,help:sale_line_refund_to_invoice_qty.field_account_move_reversal__sale_qty_to_reinvoice | ||
msgid "" | ||
"Leave it marked if you will reinvoice the same sale order line (standard " | ||
"behaviour)" | ||
msgstr "Déjelo marcado si va a volver a facturar la misma línea de pedido de venta " | ||
"(comportamiento estándar)" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model_terms:ir.ui.view,arch_db:sale_line_refund_to_invoice_qty.view_account_move_reversal | ||
msgid "" | ||
"Leave it marked when other customer invoices are expected for the quantities" | ||
" in the credit note." | ||
msgstr "Déjelo marcado cuando se esperen otras facturas de clientes por las " | ||
"cantidades de la factura rectificativa." | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_sale_order_line__qty_refunded_not_invoiceable | ||
msgid "Quantity Refunded Not Invoiceable" | ||
msgstr "Cantidad reembolsada no facturable" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_account_move_line__sale_qty_to_reinvoice | ||
msgid "Sale Qty To Reinvoice" | ||
msgstr "Cantidad de venta a refacturar" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model,name:sale_line_refund_to_invoice_qty.model_sale_order_line | ||
msgid "Sales Order Line" | ||
msgstr "Línea de pedido de venta" | ||
|
||
#. module: sale_line_refund_to_invoice_qty | ||
#: model:ir.model.fields,field_description:sale_line_refund_to_invoice_qty.field_account_move_reversal__sale_qty_to_reinvoice | ||
msgid "This credit note will be reinvoiced" | ||
msgstr "Esta factura rectificativa será refacturada" |
60 changes: 0 additions & 60 deletions
60
sale_line_refund_to_invoice_qty/migrations/15.0.2.0.1/post-fix-old-field-value.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
# Copyright 2021 ForgeFlow (http://www.forgeflow.com) | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). | ||
from odoo import fields, models | ||
from odoo import api, fields, models | ||
|
||
|
||
class AccountMove(models.Model): | ||
_inherit = "account.move" | ||
|
||
def _reverse_move_vals(self, default_values, cancel=True): | ||
@api.returns("self", lambda value: value.id) | ||
def copy(self, default=None): | ||
# Set the sale_qty_to_reinvoice based on the boolean from the | ||
# reversal wizard | ||
move_vals = super(AccountMove, self)._reverse_move_vals( | ||
default_values, cancel=cancel | ||
) | ||
res = super().copy(default=default) | ||
sale_qty_to_reinvoice = self.env.context.get("sale_qty_to_reinvoice", False) | ||
for vals in move_vals["line_ids"]: | ||
vals[2].update({"sale_qty_to_reinvoice": sale_qty_to_reinvoice}) | ||
return move_vals | ||
res.line_ids.write({"sale_qty_to_reinvoice": sale_qty_to_reinvoice}) | ||
return res | ||
|
||
|
||
class AccountMoveLine(models.Model): | ||
_inherit = "account.move.line" | ||
|
||
sale_qty_to_reinvoice = fields.Boolean( | ||
string="Sale qty to reinvoice", | ||
default=True, | ||
help="Leave it marked if you will reinvoice the same sale order line", | ||
copy=False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters