mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[MIG] rma_account_unreconciled: Migration to 16.0
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
|
||||
{
|
||||
"name": "RMA Account Unreconcile",
|
||||
"version": "14.0.1.0.0",
|
||||
"version": "16.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"category": "RMA",
|
||||
"summary": "Integrates RMA with Invoice Processing",
|
||||
"author": "ForgeFlow",
|
||||
"website": "https://github.com/ForgeFlow/stock-rma",
|
||||
"depends": ["account_move_line_rma_order_line", "rma"],
|
||||
"depends": ["account_move_line_rma_order_line", "rma", "account_reconcile_oca"],
|
||||
"data": [
|
||||
"views/rma_line_view.xml",
|
||||
],
|
||||
|
||||
@@ -84,8 +84,10 @@ class RmaOrderLine(models.Model):
|
||||
"active_model": "account.move.line",
|
||||
"active_ids": amls.ids,
|
||||
}
|
||||
return {
|
||||
"type": "ir.actions.client",
|
||||
"tag": "manual_reconciliation_view",
|
||||
"context": action_context,
|
||||
}
|
||||
action_def = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"account_reconcile_oca.account_account_reconcile_act_window"
|
||||
)
|
||||
action_def["context"] = action_context
|
||||
action_def["domain"] = [("id", "in", amls.ids)]
|
||||
action_def["context"]["default_account_move_lines"] = amls.ids
|
||||
return action_def
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
This module adds a new fields "Unreconciled" on RMA Order Lines, that allows
|
||||
to find Order's with unreconciled journal items related.
|
||||
|
||||
This module allows to reconcile those Orders in a single click. In accounting
|
||||
**(Features pending of new version)** This module allows to reconcile those Orders in a single click. In accounting
|
||||
settings users will be able to set up a specific account for write-off.
|
||||
|
||||
@@ -55,7 +55,7 @@ class TestRmaAccountUnreconciled(TestRma):
|
||||
self.assertFalse(rma_line.unreconciled)
|
||||
self.rma_customer_id.rma_line_ids.action_rma_to_approve()
|
||||
wizard = self.rma_make_picking.with_context(
|
||||
{
|
||||
**{
|
||||
"active_ids": self.rma_customer_id.rma_line_ids.ids,
|
||||
"active_model": "rma.order.line",
|
||||
"picking_type": "incoming",
|
||||
@@ -66,14 +66,14 @@ class TestRmaAccountUnreconciled(TestRma):
|
||||
res = self.rma_customer_id.rma_line_ids.action_view_in_shipments()
|
||||
picking = self.env["stock.picking"].browse(res["res_id"])
|
||||
picking.action_assign()
|
||||
for mv in picking.move_lines:
|
||||
for mv in picking.move_ids:
|
||||
mv.quantity_done = mv.product_uom_qty
|
||||
picking.button_validate()
|
||||
for rma_line in self.rma_customer_id.rma_line_ids:
|
||||
rma_line._compute_unreconciled()
|
||||
self.assertTrue(rma_line.unreconciled)
|
||||
make_refund = self.rma_refund_wiz.with_context(
|
||||
{
|
||||
**{
|
||||
"customer": True,
|
||||
"active_ids": self.rma_customer_id.rma_line_ids.ids,
|
||||
"active_model": "rma.order.line",
|
||||
|
||||
@@ -1,54 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<data>
|
||||
<record id="view_rma_line_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.view.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<field name="unreconciled" invisible="1" />
|
||||
<button
|
||||
type="object"
|
||||
string="Unreconciled Journal Items"
|
||||
name="action_view_unreconciled"
|
||||
groups="account.group_account_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-gears"
|
||||
attrs="{'invisible':[('unreconciled', '=', False)]}"
|
||||
>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
string="Reconcile"
|
||||
name="action_open_reconcile"
|
||||
groups="account.group_account_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-link"
|
||||
attrs="{'invisible':[('unreconciled', '=', False)]}"
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.view.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<field name="unreconciled" invisible="1" />
|
||||
<button
|
||||
type="object"
|
||||
string="Unreconciled Journal Items"
|
||||
name="action_view_unreconciled"
|
||||
groups="account.group_account_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-gears"
|
||||
attrs="{'invisible':[('unreconciled', '=', False)]}"
|
||||
>
|
||||
</button>
|
||||
<button
|
||||
type="object"
|
||||
string="Reconcile"
|
||||
name="action_open_reconcile"
|
||||
groups="account.group_account_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-link"
|
||||
attrs="{'invisible':[('unreconciled', '=', False)]}"
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
<record id="view_rma_rma_line_filter" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.search.view</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_rma_line_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="lot_id" position="after">
|
||||
<filter
|
||||
name="unreconciled"
|
||||
string="Unreconciled"
|
||||
domain="[('unreconciled','=', True)]"
|
||||
groups="account.group_account_invoice"
|
||||
help="Purchase orders with unreconciled journal items."
|
||||
/>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_rma_line_filter" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.search.view</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_rma_line_filter" />
|
||||
<field name="arch" type="xml">
|
||||
<field name="lot_id" position="after">
|
||||
<filter
|
||||
name="unreconciled"
|
||||
string="Unreconciled"
|
||||
domain="[('unreconciled','=', True)]"
|
||||
groups="account.group_account_invoice"
|
||||
help="Purchase orders with unreconciled journal items."
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user