Merge branch 'master-multi-branch' into 'master'
Improve Multi Branch See merge request flectra-hq/flectra!6
This commit is contained in:
commit
f55ab37fa3
@ -330,7 +330,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="fiscal_position_id" options="{'no_create': True}" placeholder="Auto-detect"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_open': True}"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_open': True}" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="move_id" groups="account.group_account_user" attrs="{'invisible': [('move_id', '=', False)]}"/>
|
||||
<field name="date" domain="[('state', '=', 'draft'), ('company_id', '=', company_id)]" groups="account.group_account_user"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
@ -478,7 +478,7 @@
|
||||
<field domain="[('company_id', '=', company_id),('internal_type','=', 'receivable'), ('deprecated', '=', False)]"
|
||||
name="account_id" groups="account.group_account_user"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<field name="branch_id" options="{'no_create': True}"/>
|
||||
<field name="branch_id" options="{'no_create': True}" groups="base_branch_company.group_multi_branch"/>
|
||||
<field domain="[('partner_id.ref_company_ids', 'in', [company_id])]" name="partner_bank_id" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
|
@ -1155,7 +1155,7 @@
|
||||
<field name="move_id" attrs="{'readonly':[('parent_state','=','posted')]}"/>
|
||||
<field name="statement_id" readonly="True" attrs="{'invisible': [('statement_id','=',False)]}"/>
|
||||
<field name="invoice_id" attrs="{'invisible': [('invoice_id','=',False)]}"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
</group>
|
||||
<group string="Dates">
|
||||
<field name="date_maturity"/>
|
||||
@ -1228,7 +1228,7 @@
|
||||
<field name="partner_id"/>
|
||||
<field name="account_id" options='{"no_open":True}' domain="[('company_id', '=', company_id)]" groups="account.group_account_user"/>
|
||||
<field name="analytic_account_id" groups="account.group_account_user"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="reconciled" invisible="1"/>
|
||||
<field name="full_reconcile_id"/>
|
||||
<field name="debit" sum="Total Debit"/>
|
||||
@ -1306,7 +1306,7 @@
|
||||
<field name="move_id" string="Number (Move)"/>
|
||||
<field name="tax_line_id"/>
|
||||
<field name="tax_ids" />
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Journal" domain="[]" context="{'group_by':'journal_id'}"/>
|
||||
@ -1374,7 +1374,7 @@
|
||||
<field name="partner_id"/>
|
||||
<field name="ref"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="amount" sum="Total Amount"/>
|
||||
<field name="state"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
@ -1456,7 +1456,7 @@
|
||||
<group>
|
||||
<field name="journal_id" options="{'no_open': True, 'no_create': True}"/>
|
||||
<field name="company_id" required="1" groups="base.group_multi_company"/>
|
||||
<field name="branch_id" options="{'no_create': True}"/>
|
||||
<field name="branch_id" options="{'no_create': True}" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="amount" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
@ -1470,7 +1470,7 @@
|
||||
<field name="partner_id"
|
||||
domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"/>
|
||||
<field name="name"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="analytic_tag_ids" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="amount_currency" groups="base.group_multi_currency"/>
|
||||
|
@ -40,7 +40,7 @@
|
||||
<t t-if="data['date_from']"><strong>Date from :</strong> <span t-esc="data['date_from']"/><br/></t>
|
||||
<t t-if="data['date_to']"><strong>Date to :</strong> <span t-esc="data['date_to']"/></t>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="col-xs-4" groups="base_branch_company.group_multi_branch">
|
||||
<strong>Branch:</strong>
|
||||
<p t-if="data['branch_id']"><span t-esc="data['branch_id'][1]"/></p>
|
||||
</div>
|
||||
|
@ -48,7 +48,7 @@
|
||||
<strong>Reference:</strong>
|
||||
<p t-field="o.reference"/>
|
||||
</div>
|
||||
<div name="branch" class="col-xs-2" t-if="o.branch_id">
|
||||
<div name="branch" class="col-xs-2" t-if="o.branch_id" groups="base_branch_company.group_multi_branch">
|
||||
<strong>Branch:</strong>
|
||||
<p t-field="o.branch_id.name"/>
|
||||
</div>
|
||||
|
@ -24,7 +24,7 @@
|
||||
<p t-if="data['form']['target_move'] == 'all'">All Entries</p>
|
||||
<p t-if="data['form']['target_move'] == 'posted'">All Posted Entries</p>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<div class="col-xs-3" groups="base_branch_company.group_multi_branch">
|
||||
<strong>Branch:</strong>
|
||||
<p t-if="data['form']['branch_id']"><span t-esc="data['form']['branch_id'][1]"/></p>
|
||||
</div>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<field name="date_from"/>
|
||||
<field name="period_length"/>
|
||||
<newline/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<newline/>
|
||||
<field name="result_selection" widget="radio"/>
|
||||
<field name="target_move" widget="radio"/>
|
||||
|
@ -14,7 +14,7 @@
|
||||
</group>
|
||||
<group col="2">
|
||||
<group>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
</group>
|
||||
|
||||
</group>
|
||||
|
@ -233,7 +233,7 @@
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<field name="partner_id" domain="[('customer','=',True)]" string="Customer" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": True}'/>
|
||||
<field name="pay_now" required="1"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
</group>
|
||||
<group>
|
||||
@ -347,7 +347,7 @@
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field name="name" colspan="2" attrs="{'invisible': [('pay_now', '=', 'pay_later')]}"/>
|
||||
<field name="reference"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group>
|
||||
|
@ -51,7 +51,7 @@
|
||||
<field name="account_id"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="branch_id" />
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="unit_amount" sum="Quantity"/>
|
||||
<field name="amount" sum="Total"/>
|
||||
</tree>
|
||||
@ -113,7 +113,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="tag_ids" widget="many2many_tags"/>
|
||||
<field name="branch_id" options="{'no_create': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True}"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
|
||||
</group>
|
||||
@ -138,7 +138,7 @@
|
||||
<field name="partner_id"/>
|
||||
<field name="active" invisible="1"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="balance"/>
|
||||
@ -232,7 +232,7 @@
|
||||
<field name="tag_ids" widget="many2many_tags"/>
|
||||
<field name="date"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="branch_id" options="{'no_create': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True}"/>
|
||||
</group>
|
||||
<group string="Amount">
|
||||
<field name="amount"/>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="data_branch_1" model="res.branch">
|
||||
<field name="name">your company</field>
|
||||
<field name="name">Your Company</field>
|
||||
<field name="code">YC</field>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="street">80 Broad St</field>
|
||||
@ -14,7 +14,6 @@
|
||||
<field name="phone">+1 485 123 8989</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="base.user_root" model="res.users">
|
||||
<field name="branch_ids" eval="[(6,0,[ref('data_branch_1'),])]"/>
|
||||
<field name='default_branch_id' ref='data_branch_1'/>
|
||||
|
@ -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"/>
|
||||
@ -88,7 +88,7 @@
|
||||
<field name="inherit_id" ref="base.view_users_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='access_rights']/group[1]" position="after">
|
||||
<group>
|
||||
<group groups="base_branch_company.group_multi_branch">
|
||||
<group string="Allowed Branches" attrs="{'invisible': [('branches_count', '<=', 1)]}">
|
||||
<field name="default_branch_id"/>
|
||||
<field name="branch_ids" widget="many2many_tags"/>
|
||||
@ -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>
|
@ -89,7 +89,7 @@
|
||||
<field name="user_id" domain="[('share', '=', False)]"
|
||||
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'sales_team.group_sale_salesman_all_leads'], 'team_id': team_id}"/>
|
||||
<field name="team_id" widget="selection" domain="[('use_leads','=',True)]"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="type" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
@ -493,7 +493,7 @@
|
||||
<group>
|
||||
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'sales_team.group_sale_salesman_all_leads'], 'team_id': team_id}" domain="[('share', '=', False)]"/>
|
||||
<field name="team_id" widget="selection"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="priority" widget="priority"/>
|
||||
@ -652,7 +652,7 @@
|
||||
<filter string="Sales Channel" context="{'group_by':'team_id'}"/>
|
||||
<filter string="Country" context="{'group_by':'country_id'}" />
|
||||
<filter string="Company" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<filter string="Branch" context="{'group_by':'branch_id'}"/>
|
||||
<filter string="Branch" groups="base_branch_company.group_multi_branch" context="{'group_by':'branch_id'}"/>
|
||||
<filter name="stage" string="Stage" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="Campaign" domain="[]" context="{'group_by':'campaign_id'}"/>
|
||||
<filter string="Medium" domain="[]" context="{'group_by':'medium_id'}"/>
|
||||
|
@ -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',
|
||||
|
@ -180,7 +180,7 @@ class TestMessagePost(TestMail):
|
||||
self.assertEqual(msg.parent_id.id, parent_msg.id)
|
||||
self.assertEqual(msg.partner_ids, self.partner_1)
|
||||
# self.assertEqual(parent_msg.partner_ids, self.partner_1) # TDE FIXME: to check
|
||||
self.assertTrue(all('openerp-%d-mail.test' % self.test_pigs.id in m['references'] for m in self._mails))
|
||||
self.assertTrue(all('flectra-%d-mail.test' % self.test_pigs.id in m['references'] for m in self._mails))
|
||||
new_msg = self.test_pigs.sudo(self.user_employee).message_post(
|
||||
body=_body, subject=_subject,
|
||||
message_type='comment', subtype='mt_comment', parent_id=msg.id)
|
||||
|
@ -51,7 +51,7 @@ Content-Transfer-Encoding: quoted-printable
|
||||
|
||||
MAIL_TEMPLATE_PLAINTEXT = """Return-Path: <whatever-2a840@postmaster.twitter.com>
|
||||
To: {to}
|
||||
Received: by mail1.openerp.com (Postfix, from userid 10002)
|
||||
Received: by mail1.flectra.com (Postfix, from userid 10002)
|
||||
id 5DF9ABFB2A; Fri, 10 Aug 2012 16:16:39 +0200 (CEST)
|
||||
From: Sylvie Lelitre <test.sylvie.lelitre@agrolait.com>
|
||||
Subject: {subject}
|
||||
@ -78,7 +78,7 @@ X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
|
||||
HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1
|
||||
Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173])
|
||||
by mail1.grosbedon.com (Postfix) with ESMTPS id 9BBD7BFAAA
|
||||
for <raoul@openerp.fr>; Fri, 23 Aug 2013 13:17:55 +0200 (CEST)
|
||||
for <raoul@flectra.fr>; Fri, 23 Aug 2013 13:17:55 +0200 (CEST)
|
||||
Received: by mail-ie0-f173.google.com with SMTP id qd12so575130ieb.4
|
||||
for <raoul@grosbedon.fr>; Fri, 23 Aug 2013 04:17:54 -0700 (PDT)
|
||||
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
|
||||
@ -327,7 +327,7 @@ class TestMailgateway(TestMail):
|
||||
'subject': 'Public Discussion',
|
||||
'message_type': 'email',
|
||||
'author_id': self.partner_1.id,
|
||||
'message_id': '<123456-openerp-%s-mail.test@%s>' % (self.test_public.id, socket.gethostname()),
|
||||
'message_id': '<123456-flectra-%s-mail.test@%s>' % (self.test_public.id, socket.gethostname()),
|
||||
})
|
||||
|
||||
@mute_logger('flectra.addons.mail.models.mail_thread')
|
||||
@ -608,7 +608,7 @@ class TestMailgateway(TestMail):
|
||||
self.format_and_process,
|
||||
MAIL_TEMPLATE, email_from='valid.lelitre@agrolait.com',
|
||||
to='noone@example.com', subject='spam',
|
||||
extra='In-Reply-To: <12321321-openerp-%d-mail.test@%s>' % (self.test_public.id, socket.gethostname()),
|
||||
extra='In-Reply-To: <12321321-flectra-%d-mail.test@%s>' % (self.test_public.id, socket.gethostname()),
|
||||
msg_id='<1198923581.41972151344608186802.JavaMail.diff1@agrolait.com>')
|
||||
|
||||
# when 6.1 messages are present, compat mode is available
|
||||
@ -621,7 +621,7 @@ class TestMailgateway(TestMail):
|
||||
MAIL_TEMPLATE, email_from='other5@gmail.com',
|
||||
msg_id='<1.2.JavaMail.new@agrolait.com>',
|
||||
to='noone@example.com>', subject='spam',
|
||||
extra='In-Reply-To: <12321321-openerp-%d-mail.test@%s>' % (self.test_public.id, socket.gethostname()))
|
||||
extra='In-Reply-To: <12321321-flectra-%d-mail.test@%s>' % (self.test_public.id, socket.gethostname()))
|
||||
|
||||
# 3''. 6.1 compat mode should not work if hostname does not match!
|
||||
# Flectra 10 update: compat mode has been removed and should not work anymore and does not depend from hostname
|
||||
@ -630,7 +630,7 @@ class TestMailgateway(TestMail):
|
||||
MAIL_TEMPLATE, email_from='other5@gmail.com',
|
||||
msg_id='<1.3.JavaMail.new@agrolait.com>',
|
||||
to='noone@example.com>', subject='spam',
|
||||
extra='In-Reply-To: <12321321-openerp-%d-mail.test@neighbor.com>' % self.test_public.id)
|
||||
extra='In-Reply-To: <12321321-flectra-%d-mail.test@neighbor.com>' % self.test_public.id)
|
||||
|
||||
# Test created messages
|
||||
self.assertEqual(len(self.test_public.message_ids), 1)
|
||||
@ -740,7 +740,7 @@ class TestMailgateway(TestMail):
|
||||
self.assertEqual(msg.model, False,
|
||||
'message_post: private discussion: context key "thread_model" not correctly ignored when having no res_id')
|
||||
# Test: message-id
|
||||
self.assertIn('openerp-private', msg.message_id, 'message_post: private discussion: message-id should contain the private keyword')
|
||||
self.assertIn('flectra-private', msg.message_id, 'message_post: private discussion: message-id should contain the private keyword')
|
||||
|
||||
# Do: Bert replies through mailgateway (is a customer)
|
||||
self.format_and_process(
|
||||
|
@ -57,7 +57,7 @@ class TestMailMessage(TestMail):
|
||||
'model': 'mail.test',
|
||||
'res_id': self.test_pigs.id
|
||||
})
|
||||
self.assertIn('-openerp-%d-mail.test' % self.test_pigs.id, msg.message_id, 'mail_message: message_id for a void message should be a "private" one')
|
||||
self.assertIn('-flectra-%d-mail.test' % self.test_pigs.id, msg.message_id, 'mail_message: message_id for a void message should be a "private" one')
|
||||
self.assertEqual(msg.reply_to, '%s <%s>' % (self.user_employee.name, self.user_employee.email))
|
||||
self.assertEqual(msg.email_from, '%s <%s>' % (self.user_employee.name, self.user_employee.email))
|
||||
|
||||
@ -70,7 +70,7 @@ class TestMailMessage(TestMail):
|
||||
'model': 'mail.test',
|
||||
'res_id': self.test_pigs.id
|
||||
})
|
||||
self.assertIn('-openerp-%d-mail.test' % self.test_pigs.id, msg.message_id, 'mail_message: message_id for a void message should be a "private" one')
|
||||
self.assertIn('-flectra-%d-mail.test' % self.test_pigs.id, msg.message_id, 'mail_message: message_id for a void message should be a "private" one')
|
||||
self.assertEqual(msg.reply_to, '%s %s <%s@%s>' % (self.env.user.company_id.name, self.test_pigs.name, self.test_pigs.alias_name, alias_domain))
|
||||
self.assertEqual(msg.email_from, '%s <%s>' % (self.user_employee.name, self.user_employee.email))
|
||||
|
||||
@ -84,7 +84,7 @@ class TestMailMessage(TestMail):
|
||||
'model': 'mail.test',
|
||||
'res_id': self.test_pigs.id
|
||||
})
|
||||
self.assertIn('-openerp-%d-mail.test' % self.test_pigs.id, msg.message_id, 'mail_message: message_id for a void message should be a "private" one')
|
||||
self.assertIn('-flectra-%d-mail.test' % self.test_pigs.id, msg.message_id, 'mail_message: message_id for a void message should be a "private" one')
|
||||
self.assertEqual(msg.reply_to, '%s %s <%s@%s>' % (self.env.user.company_id.name, self.test_pigs.name, self.test_pigs.alias_name, alias_domain))
|
||||
self.assertEqual(msg.email_from, '%s <%s>' % (self.user_employee.name, self.user_employee.email))
|
||||
|
||||
|
@ -137,7 +137,7 @@
|
||||
<field name="user_id" string="Project Manager"
|
||||
attrs="{'readonly':[('active','=',False)]}"/>
|
||||
<field name="company_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="subtask_project_id" groups="project.group_subtask_project"/>
|
||||
<field name="privacy_visibility" widget="radio"/>
|
||||
<field name="partner_id" string="Customer"/>
|
||||
@ -446,7 +446,7 @@
|
||||
<field name="date_deadline"/>
|
||||
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/>
|
||||
<field name="task_seq" readonly="1"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="priority"/>
|
||||
</group>
|
||||
</group>
|
||||
@ -943,7 +943,7 @@
|
||||
<br/>
|
||||
<field name="date_deadline"/>
|
||||
<br/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<br/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -50,7 +50,7 @@
|
||||
<th>Project</th>
|
||||
<th>Assigned To</th>
|
||||
<th>Sprint</th>
|
||||
<th>Branch</th>
|
||||
<th groups="base_branch_company.group_multi_branch">Branch</th>
|
||||
<th>Start Date</th>
|
||||
<th>End Date</th>
|
||||
<th>Actual End Date</th>
|
||||
@ -71,7 +71,7 @@
|
||||
<td>
|
||||
<span t-field="task.sprint_id"/>
|
||||
</td>
|
||||
<td>
|
||||
<td groups="base_branch_company.group_multi_branch">
|
||||
<span t-field="task.branch_id"/>
|
||||
</td>
|
||||
<td>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<field name="company_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</field>
|
||||
<field name="branch_id" position="replace">
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</field>
|
||||
<field name="partner_id" position="replace">
|
||||
<field name="partner_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
@ -81,7 +81,7 @@
|
||||
<field name="company_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</field>
|
||||
<field name="branch_id" position="replace">
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</field>
|
||||
<field name="partner_id" position="replace">
|
||||
<field name="partner_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
@ -123,7 +123,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='date_deadline']" position="after">
|
||||
<field name="sprint_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
<field name="actual_end_date"/>
|
||||
|
@ -67,7 +67,7 @@
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="branch_id"
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"
|
||||
options="{'no_create': True, 'no_create_edit': True}"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
<field name="duration"
|
||||
@ -135,7 +135,7 @@
|
||||
<field name="sprint_seq"/>
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="goal_of_sprint"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
@ -151,7 +151,7 @@
|
||||
<search string="Sprints">
|
||||
<field name="name"/>
|
||||
<field name="project_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<filter string="Draft" name="filter_draft"
|
||||
domain="[('state', '=', 'draft')]"/>
|
||||
<filter string="In Progress" name="filter_progress"
|
||||
@ -162,7 +162,7 @@
|
||||
domain="[('state', '=', 'cancel')]"/>
|
||||
<filter string="Project" name="group_by_project"
|
||||
context="{'group_by': 'project_id'}"/>
|
||||
<filter string="Branch" name="group_by_branch"
|
||||
<filter string="Branch" groups="base_branch_company.group_multi_branch" name="group_by_branch"
|
||||
context="{'group_by': 'branch_id'}"/>
|
||||
</search>
|
||||
</field>
|
||||
|
@ -24,7 +24,7 @@
|
||||
</div>
|
||||
<group name="story_main_fields" col="4">
|
||||
<field name="sprint_id" options="{'no_create': True, 'no_create_edit': True}" required="1"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="priority_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="story_type_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="owner_id" readonly="1"/>
|
||||
@ -53,7 +53,7 @@
|
||||
<tree string="Project Story">
|
||||
<field name="name"/>
|
||||
<field name="owner_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="sprint_id"/>
|
||||
<field name="priority_id"/>
|
||||
<field name="story_type_id"/>
|
||||
@ -69,7 +69,7 @@
|
||||
<field name="name"/>
|
||||
<field name="sprint_id"/>
|
||||
<filter string="Sprint" name="group_by_sprint" context="{'group_by': 'sprint_id'}"/>
|
||||
<filter string="Branch" name="group_by_branch" context="{'group_by': 'branch_id'}"/>
|
||||
<filter string="Branch" groups="base_branch_company.group_multi_branch" name="group_by_branch" context="{'group_by': 'branch_id'}"/>
|
||||
<filter string="Owner" name="group_by_owner" context="{'group_by': 'owner_id'}"/>
|
||||
<filter string="Priority" name="group_by_priority" context="{'group_by': 'priority'}"/>
|
||||
<filter string="Type" name="group_by_type" context="{'group_by': 'type'}"/>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<field name="member_ids" widget="many2many_tags" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="master_id" options="{'no_create': True, 'no_create_edit': True}"
|
||||
domain="[('id', 'in', member_ids)]"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</group>
|
||||
<group col="2">
|
||||
<field name="strength"/>
|
||||
@ -41,7 +41,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Project Team">
|
||||
<field name="name"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="master_id"/>
|
||||
<field name="strength"/>
|
||||
</tree>
|
||||
|
@ -10,7 +10,7 @@
|
||||
<field name="name" required="1"/>
|
||||
<field name="release_date"/>
|
||||
<field name="sprint_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="priority"/>
|
||||
<field name="velocity"/>
|
||||
</group>
|
||||
@ -36,7 +36,7 @@
|
||||
<field name="name" required="1"/>
|
||||
<field name="release_date"/>
|
||||
<field name="sprint_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="priority"/>
|
||||
<field name="velocity"/>
|
||||
</tree>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<group>
|
||||
<field name="sprint_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="scrum_master" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
@ -41,7 +41,7 @@
|
||||
<field name="retrospective_method_id"/>
|
||||
<field name="scrum_master"/>
|
||||
<field name="sprint_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="start_date"/>
|
||||
<field name="end_date"/>
|
||||
</tree>
|
||||
|
@ -42,7 +42,7 @@
|
||||
<strong>Order Date:</strong>
|
||||
<p t-field="o.date_order"/>
|
||||
</div>
|
||||
<div name="branch" t-if="o.branch_id" class="col-xs-3">
|
||||
<div name="branch" t-if="o.branch_id" class="col-xs-3" groups="base_branch_company.group_multi_branch">
|
||||
<strong>Branch:</strong>
|
||||
<p t-field="o.branch_id"/>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div name="branch" t-if="o.branch_id" class="col-xs-3">
|
||||
<div name="branch" t-if="o.branch_id" class="col-xs-3" groups="base_branch_company.group_multi_branch">
|
||||
<strong>Branch:</strong>
|
||||
<p t-field="o.branch_id"/>
|
||||
</div>
|
||||
|
@ -284,7 +284,7 @@
|
||||
<field name="dest_address_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('default_location_dest_id_usage', '!=', 'customer')], 'required': [('default_location_dest_id_usage', '=', 'customer')]}"/>
|
||||
<field name="default_location_dest_id_usage" invisible="1"/>
|
||||
<field name="incoterm_id"/>
|
||||
<field name="branch_id" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True, 'no_create_edit': True}"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="invoice_status"/>
|
||||
@ -390,7 +390,7 @@
|
||||
<field name="date_order" />
|
||||
<field name="partner_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True}"/>
|
||||
<field name="date_planned" invisible="context.get('quotation_only', False)"/>
|
||||
<field name="origin"/>
|
||||
<field name="amount_untaxed" sum="Total Untaxed amount" string="Untaxed" widget="monetary"/>
|
||||
|
@ -60,7 +60,7 @@
|
||||
<strong>Payment Terms:</strong>
|
||||
<p t-field="doc.payment_term_id"/>
|
||||
</div>
|
||||
<div name="branch" t-if="doc.branch_id" class="col-xs-3">
|
||||
<div name="branch" t-if="doc.branch_id" class="col-xs-3" groups="base_branch_company.group_multi_branch">
|
||||
<strong>Branch:</strong>
|
||||
<p t-field="doc.branch_id"/>
|
||||
</div>
|
||||
|
@ -381,7 +381,7 @@
|
||||
<field name="team_id" options="{'no_create': True}"/>
|
||||
<field name="client_order_ref"/>
|
||||
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
|
||||
<field name="branch_id" options="{'no_create': True}"/>
|
||||
<field name="branch_id" options="{'no_create': True}" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="analytic_account_id" context="{'default_partner_id':partner_invoice_id, 'default_name':name}" attrs="{'readonly': ['|',('analytic_account_id','!=',False),('invoice_count','!=',0),('state','=','sale')]}" groups="analytic.group_analytic_accounting"/>
|
||||
</group>
|
||||
<group name="sale_pay" string="Invoicing">
|
||||
|
@ -31,7 +31,7 @@
|
||||
<th name="td_sched_date_h">
|
||||
<strong>Date</strong>
|
||||
</th>
|
||||
<th t-if="o.branch_id"><strong>Branch</strong></th>
|
||||
<th t-if="o.branch_id" groups="base_branch_company.group_multi_branch"><strong>Branch</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -47,7 +47,7 @@
|
||||
<span t-field="o.scheduled_date"/>
|
||||
</t>
|
||||
</td>
|
||||
<td t-if="o.branch_id">
|
||||
<td t-if="o.branch_id" groups="base_branch_company.group_multi_branch">
|
||||
<span t-field="o.branch_id"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<tr>
|
||||
<th><strong>Inventory</strong></th>
|
||||
<th><strong>Date</strong></th>
|
||||
<th t-if="o.branch_id"><strong>Branch</strong></th>
|
||||
<th t-if="o.branch_id" groups="base_branch_company.group_multi_branch"><strong>Branch</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -24,7 +24,7 @@
|
||||
<td>
|
||||
<span t-field="o.date"/>
|
||||
</td>
|
||||
<td t-if="o.branch_id">
|
||||
<td t-if="o.branch_id" groups="base_branch_company.group_multi_branch">
|
||||
<span t-field="o.branch_id"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -51,7 +51,7 @@
|
||||
<th><strong>State</strong></th>
|
||||
<th><strong>Commitment Date</strong></th>
|
||||
<th name="td_sched_date_h"><strong>Scheduled Date</strong></th>
|
||||
<th t-if="o.branch_id"><strong>Branch</strong></th>
|
||||
<th t-if="o.branch_id" groups="base_branch_company.group_multi_branch"><strong>Branch</strong></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -68,7 +68,7 @@
|
||||
<td name="td_sched_date">
|
||||
<span t-field="o.scheduled_date"/>
|
||||
</td>
|
||||
<td t-if="o.branch_id">
|
||||
<td t-if="o.branch_id" groups="base_branch_company.group_multi_branch">
|
||||
<span t-field="o.branch_id"/>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -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>
|
||||
|
@ -140,7 +140,7 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="location_id" domain="[('usage','not in', ['supplier','production'])]" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="filter" string="Inventory of" widget='radio' attrs="{'readonly': [('state', '!=', 'draft')]}"/>
|
||||
</group>
|
||||
<group>
|
||||
|
@ -36,7 +36,7 @@
|
||||
<group string="Additional Information">
|
||||
<field name="usage"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="branch_id" options="{'no_create': True}"/>
|
||||
<field name="branch_id" options="{'no_create': True}" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="scrap_location"/>
|
||||
<field name="return_location"/>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<field name="product_packaging" domain="[('product_id','=',product_id)]" groups="product.group_stock_packaging"/>
|
||||
<field name="picking_id"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="branch_dest_id"/>
|
||||
<field name="create_date" groups="base.group_no_one"/>
|
||||
@ -60,7 +60,7 @@
|
||||
<field name="create_date" invisible="1" groups="base.group_no_one"/>
|
||||
<field name="product_id"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" string="From"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" string="To"/>
|
||||
<field name="branch_dest_id"/>
|
||||
<field name="product_uom_qty"/>
|
||||
@ -116,7 +116,7 @@
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="product_uom" options="{'no_open': True, 'no_create': True}" string="Unit of Measure" groups="product.group_uom"/>
|
||||
<field name="location_id" invisible="1"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="create_date" invisible="1" />
|
||||
<field name="date_expected" invisible="1" />
|
||||
<field name="picking_type_id" invisible="1"/>
|
||||
@ -224,7 +224,7 @@
|
||||
<group name="main_grp_col1">
|
||||
<field name="reference"/>
|
||||
<field name="location_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="location_dest_id"/>
|
||||
<field name="branch_dest_id"/>
|
||||
</group>
|
||||
|
@ -319,7 +319,7 @@
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="branch_id" options="{'no_create': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True}"/>
|
||||
<field name="group_id" groups="base.group_no_one"/>
|
||||
<field name="priority" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}"/>
|
||||
</group>
|
||||
|
@ -48,7 +48,7 @@
|
||||
<group>
|
||||
<field name="product_id"/>
|
||||
<field name="location_id"/>
|
||||
<field name="branch_id"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="lot_id" groups="stock.group_production_lot"/>
|
||||
<field name="package_id" groups="stock.group_tracking_lot"/>
|
||||
<field name="owner_id" groups="stock.group_tracking_owner"/>
|
||||
|
@ -52,7 +52,7 @@
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="branch_id" />
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch"/>
|
||||
<field name="lot_id" attrs="{'invisible': [('tracking', '=', 'none')], 'required': [('tracking', '!=', 'none')]}" groups="stock.group_production_lot"/>
|
||||
<field name="tracking" invisible="1"/>
|
||||
<field name="package_id" groups="stock.group_tracking_lot"/>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<group>
|
||||
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="branch_id" options="{'no_create': True}"/>
|
||||
<field name="branch_id" groups="base_branch_company.group_multi_branch" options="{'no_create': True}"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4" groups="stock.group_adv_location">
|
||||
|
Loading…
Reference in New Issue
Block a user