Merge branch 'master-branch' into 'master'
[FIX]: Improved branch. See merge request flectra-hq/flectra!56
This commit is contained in:
commit
1d4568c657
@ -21,7 +21,7 @@ Main Features
|
|||||||
<field name="company_id" />
|
<field name="company_id" />
|
||||||
""",
|
""",
|
||||||
'website': '',
|
'website': '',
|
||||||
'depends': ['base'],
|
'depends': ['base', 'base_setup'],
|
||||||
'data': [
|
'data': [
|
||||||
'demo/branch_data.xml',
|
'demo/branch_data.xml',
|
||||||
'wizard/branch_config_view.xml',
|
'wizard/branch_config_view.xml',
|
||||||
|
@ -13,3 +13,10 @@ class IrBranchCompanyMixin(models.AbstractModel):
|
|||||||
company_id = fields.Many2one(
|
company_id = fields.Many2one(
|
||||||
'res.company', 'Company', ondelete="restrict",
|
'res.company', 'Company', ondelete="restrict",
|
||||||
default=lambda self: self.env.user.company_id)
|
default=lambda self: self.env.user.company_id)
|
||||||
|
|
||||||
|
|
||||||
|
class ResConfigSettings(models.TransientModel):
|
||||||
|
|
||||||
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
|
group_multi_branch = fields.Boolean("Multi Branch", implied_group='base_branch_company.group_multi_branch')
|
||||||
|
@ -4,28 +4,32 @@
|
|||||||
<field name="name">res.config.settings.view.form.inherit.base.setup</field>
|
<field name="name">res.config.settings.view.form.inherit.base.setup</field>
|
||||||
<field name="model">res.config.settings</field>
|
<field name="model">res.config.settings</field>
|
||||||
<field name="priority" eval="100"/>
|
<field name="priority" eval="100"/>
|
||||||
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[hasclass('settings')]" position="inside">
|
<xpath expr="//div[hasclass('settings')]/div[hasclass('app_settings_block')]/div[@name='multi_company']" position="after">
|
||||||
<div class="app_settings_block">
|
|
||||||
<h2>Multi-Branch</h2>
|
<h2>Multi-Branch</h2>
|
||||||
<div class="row mt16 o_settings_container" id="emails">
|
<div class="row mt16 o_settings_container" id="multi_branch">
|
||||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||||
|
<div class="o_setting_left_pane">
|
||||||
|
<field name="group_multi_branch"/>
|
||||||
|
</div>
|
||||||
<div class="o_setting_left_pane"/>
|
<div class="o_setting_left_pane"/>
|
||||||
<div class="o_setting_right_pane">
|
<div class="o_setting_right_pane">
|
||||||
<label string="Branches"/>
|
<label string="Branches"/>
|
||||||
<div class="text-muted">
|
<div class="text-muted">
|
||||||
Configure your Branch
|
Configure your Branch
|
||||||
</div>
|
</div>
|
||||||
<div class="content-group">
|
<div class="content-group" attrs="{'invisible': [('group_multi_branch','=',False)]}">
|
||||||
<div class="mt16">
|
<div class="mt16">
|
||||||
<button name="%(action_view_branch_config)d" string="Branch Configuration" type="action" class="oe_link" groups="base.group_no_one" icon="fa-arrow-right"/>
|
<button name="%(action_view_branch_config)d" string="Branch Configuration" type="action" class="oe_link" groups="base.group_no_one" icon="fa-arrow-right"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mt16">
|
||||||
|
<button name="%(action_res_branch_tree)d" string="Branches" type="action" class="oe_link" groups="base.group_no_one" icon="fa-arrow-right"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
Reference in New Issue
Block a user