mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'imp/12.0/rma_multi_company' into '12.0'
imp/12.0/rma_multi_company into 12.0 See merge request hibou-io/hibou-odoo/suite!151
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
'data': [
|
||||
'data/ir_sequence_data.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'security/rma_security.xml',
|
||||
'views/rma_views.xml',
|
||||
'views/stock_picking_views.xml',
|
||||
'wizard/rma_lines_views.xml',
|
||||
|
||||
@@ -41,6 +41,7 @@ class RMATemplate(models.Model):
|
||||
('make_to_order', 'Apply Procurements')
|
||||
], string="Outbound Procurement Method", default='make_to_stock')
|
||||
out_to_refund = fields.Boolean(string='Outbound Mark Refund')
|
||||
company_id = fields.Many2one('res.company', 'Company')
|
||||
|
||||
def _values_for_in_picking(self, rma):
|
||||
return {
|
||||
|
||||
26
rma/security/rma_security.xml
Normal file
26
rma/security/rma_security.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="0">
|
||||
|
||||
<record id="rma_rma_company_rule" model="ir.rule">
|
||||
<field name="name">RMA: RMA</field>
|
||||
<field name="model_id" ref="model_rma_rma"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',
|
||||
('company_id', '=', False),
|
||||
('company_id', 'child_of', [user.company_id.id]),
|
||||
]</field>
|
||||
</record>
|
||||
|
||||
<record id="rma_template_company_rule" model="ir.rule">
|
||||
<field name="name">RMA: RMA Template</field>
|
||||
<field name="model_id" ref="model_rma_template"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',
|
||||
('company_id', '=', False),
|
||||
('company_id', 'child_of', [user.company_id.id]),
|
||||
]</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
@@ -37,7 +37,7 @@
|
||||
<field name="tag_ids" widget="many2many_tags" placeholder="Tags" options="{'no_create': True}"/>
|
||||
<field name="partner_id" options="{'no_create_edit': True}" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="partner_shipping_id" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="company_id" invisible="1" options="{'no_create': True}" can_create="true" can_write="true" modifiers="{}"/>
|
||||
<field name="company_id" options="{'no_create': True}" modifiers="{}"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
@@ -161,6 +161,7 @@
|
||||
<group>
|
||||
<field name="usage"/>
|
||||
<field name="valid_days"/>
|
||||
<field name="company_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user