[FIX]: Multi branch improvement.
This commit is contained in:
parent
15446271be
commit
c2c2f9e4fc
@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<flectra noupdate="1">
|
||||
|
||||
<flectra>
|
||||
<record id="branch_comp_rule" model="ir.rule">
|
||||
<field name="name">Branch</field>
|
||||
<field name="model_id" ref="model_res_branch"/>
|
||||
@ -17,4 +16,8 @@
|
||||
<field name="global" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="res.groups" id="group_multi_branch">
|
||||
<field name="name">Multi Branch</field>
|
||||
<field name="category_id" ref="base.module_category_usability"/>
|
||||
</record>
|
||||
</flectra>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<field name="name">res.branch.form</field>
|
||||
<field name="model">res.branch</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Branch">
|
||||
<form string="Branch" create="false">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="toggle_active" type="object"
|
||||
@ -47,7 +47,7 @@
|
||||
<field name="name">res.branch.tree</field>
|
||||
<field name="model">res.branch</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Branch">
|
||||
<tree string="Branch" create="false">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
@ -99,4 +99,29 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_res_branch_form_editable" model="ir.ui.view">
|
||||
<field name="name">res.branch.form.editable</field>
|
||||
<field name="model">res.branch</field>
|
||||
<field name="inherit_id" ref="base_branch_company.view_res_branch_form"/>
|
||||
<field name="groups_id" eval="[(4, ref('base_branch_company.group_multi_branch'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//form" position="attributes">
|
||||
<attribute name="create">true</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="stock_warehouse_view_tree_editable" model="ir.ui.view">
|
||||
<field name="name">res.branch.tree.editable</field>
|
||||
<field name="model">res.branch</field>
|
||||
<field name="inherit_id" ref="base_branch_company.view_res_branch_tree"/>
|
||||
<field name="groups_id" eval="[(4, ref('base_branch_company.group_multi_branch'))]"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<attribute name="create">true</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</flectra>
|
@ -4,3 +4,10 @@ from . import models
|
||||
from . import wizard
|
||||
from . import controllers
|
||||
from .tests import test_mail_model
|
||||
|
||||
|
||||
def post_init(cr, registry):
|
||||
from flectra import api, SUPERUSER_ID
|
||||
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
env['publisher_warranty.contract'].update_notification()
|
@ -44,6 +44,7 @@
|
||||
],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'post_init_hook': 'post_init',
|
||||
'qweb': [
|
||||
'static/src/xml/activity.xml',
|
||||
'static/src/xml/client_action.xml',
|
||||
|
@ -166,13 +166,13 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!--<record id="picking_type_multi_branch_rule" model="ir.rule">-->
|
||||
<!--<field name="name">Picking type multi-branch</field>-->
|
||||
<!--<field name="model_id" ref="model_stock_picking_type"/>-->
|
||||
<!--<field name="global" eval="True"/>-->
|
||||
<!--<field name="domain_force">['|',('warehouse_id.branch_id','=',False),('warehouse_id.branch_id','in',[branch for branch in user.branch_ids.ids])]-->
|
||||
<!--</field>-->
|
||||
<!--</record>-->
|
||||
<record id="picking_type_multi_branch_rule" model="ir.rule">
|
||||
<field name="name">Picking type multi-branch</field>
|
||||
<field name="model_id" ref="model_stock_picking_type"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('warehouse_id.branch_id','=',False), '|', ('warehouse_id.branch_id','in',[branch for branch in user.branch_ids.ids]), ('warehouse_id.branch_id','=', user.default_branch_id.id)]
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="warehouse_multi_branch_rule" model="ir.rule">
|
||||
<field name="name">Warehouse multi-branch</field>
|
||||
|
Loading…
Reference in New Issue
Block a user