mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[FIX] Add read access to invoice
This commit is contained in:
committed by
ahenriquez
parent
b3f75d4348
commit
a1e7db197d
@@ -12,6 +12,7 @@
|
||||
'depends': ['account', 'rma'],
|
||||
'demo': ['demo/rma_operation.xml'],
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'views/rma_order_view.xml',
|
||||
'views/rma_operation_view.xml',
|
||||
'views/rma_order_line_view.xml',
|
||||
@@ -21,5 +22,5 @@
|
||||
'wizards/rma_refund.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'auto_install': True,
|
||||
'auto_install': False,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# © 2017 Eficent Business and IT Consulting Services S.L.
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import ValidationError, UserError
|
||||
from odoo.addons import decimal_precision as dp
|
||||
|
||||
|
||||
3
rma_account/security/ir.model.access.csv
Executable file
3
rma_account/security/ir.model.access.csv
Executable file
@@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_account_invoice_customer_user,access_account_invoice,account.model_account_invoice,rma.group_rma_customer_user,1,0,0,0
|
||||
access_account_invoice_supplier_user,access_account_invoice,account.model_account_invoice,rma.group_rma_supplier_user,1,0,0,0
|
||||
|
@@ -33,34 +33,10 @@
|
||||
<field name="invoice_address_id"
|
||||
groups='rma.group_rma_delivery_invoice_address'/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_line_form" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.form</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_view_out_shipments" position="after">
|
||||
<button type="object" name="action_view_invoice"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
string="Origin Inv">
|
||||
</button>
|
||||
<button type="object" name="action_view_refunds"
|
||||
class="oe_stat_button"
|
||||
icon="fa-pencil-square-o"
|
||||
groups="account.group_account_user">
|
||||
<field name="refund_count" widget="statinfo"
|
||||
string="Refunds"/>
|
||||
</button>
|
||||
</button>
|
||||
<group name="main_info" position="inside">
|
||||
<field name="invoice_line_id"
|
||||
options="{'no_create': True}"
|
||||
domain="['|',
|
||||
('invoice_id.partner_id', '=', partner_id),
|
||||
('invoice_id.partner_id', 'child_of', partner_id)]"/>
|
||||
<group name="deliver" position="after">
|
||||
<group name="refund">
|
||||
<field name="qty_to_refund"/>
|
||||
<field name="qty_refunded"/>
|
||||
</group>
|
||||
</group>
|
||||
</field>
|
||||
@@ -108,15 +84,4 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_rma_rma_line_filter" model="ir.ui.view">
|
||||
<field name="name">rma.order.line.select</field>
|
||||
<field name="model">rma.order.line</field>
|
||||
<field name="inherit_id" ref="rma.view_rma_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="product_id" position="after">
|
||||
<filter name="to_refund" string="To Refund" domain="[('qty_to_refund', '>', 0)]"
|
||||
context="{'group_by':'partner_id'}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<odoo>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<record id="view_rma_refund" model="ir.ui.view">
|
||||
<field name="name">rma.refund.form</field>
|
||||
|
||||
Reference in New Issue
Block a user