openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #03495
[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-724059-rha into lp:openobject-addons
Rifakat Haradwala (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-724059-rha into lp:openobject-addons.
Requested reviews:
Mustufa Rangwala (Open ERP) (mra-tinyerp)
Rifakat Haradwala (OpenERP) (rha-openerp)
Related bugs:
#724059 missing company information in payment.order and payment.line
https://bugs.launchpad.net/bugs/724059
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724059-rha/+merge/51493
Bug #724059 : missing company information in payment.order and payment.line
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-724059-rha/+merge/51493
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-724059-rha.
=== modified file 'account_payment/account_payment.py'
--- account_payment/account_payment.py 2011-02-01 11:04:30 +0000
+++ account_payment/account_payment.py 2011-02-28 06:15:26 +0000
@@ -94,6 +94,7 @@
], "Preferred date", change_default=True, required=True, states={'done': [('readonly', True)]}, help="Choose an option for the Payment Order:'Fixed' stands for a date specified by you.'Directly' stands for the direct execution.'Due date' stands for the scheduled date of execution."),
'date_created': fields.date('Creation date', readonly=True),
'date_done': fields.date('Execution date', readonly=True),
+ 'company_id': fields.related('mode', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}
_defaults = {
@@ -343,7 +344,8 @@
'date': fields.date('Payment Date', help="If no payment date is specified, the bank will treat this payment line directly"),
'create_date': fields.datetime('Created', readonly=True),
'state': fields.selection([('normal','Free'), ('structured','Structured')], 'Communication Type', required=True),
- 'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank statement line')
+ 'bank_statement_line_id': fields.many2one('account.bank.statement.line', 'Bank statement line'),
+ 'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
}
_defaults = {
'name': lambda obj, cursor, user, context: obj.pool.get('ir.sequence'
=== modified file 'account_payment/account_payment_view.xml'
--- account_payment/account_payment_view.xml 2011-02-01 15:50:23 +0000
+++ account_payment/account_payment_view.xml 2011-02-28 06:15:26 +0000
@@ -107,6 +107,7 @@
<field name="date_prefered"/>
<field name="date_scheduled" select="1" attrs="{'readonly':[('date_prefered','!=','fixed')]}" />
<button colspan="2" name="%(action_create_payment_order)d" string="Select Invoices to Pay" type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
+ <field name="company_id" widget='selection' groups="base.group_multi_company"/>
</group>
<field name="line_ids" colspan="4" widget="one2many_list" nolabel="1" default_get="{'order_id': active_id or False}" >
<form string="Payment Line">
@@ -128,7 +129,8 @@
<field colspan="4" name="communication"/>
<field colspan="4" name="communication2"/>
<field name="name"/>
- <field name="state"/>
+ <field name="state"/>
+ <field name="company_id" widget='selection' groups="base.group_multi_company"/>
</page>
<page string="Information">
@@ -179,6 +181,7 @@
<field name="reference"/>
<field name="mode"/>
<field name="user_id"/>
+ <field name="company_id" groups="base.group_multi_company"/>
<field name="date_created"/>
<field name="date_done"/>
<field name="total"/>
=== modified file 'account_payment/security/account_payment_security.xml'
--- account_payment/security/account_payment_security.xml 2011-01-14 00:11:01 +0000
+++ account_payment/security/account_payment_security.xml 2011-02-28 06:15:26 +0000
@@ -13,5 +13,19 @@
<field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('company_id.child_ids','child_of',[user.company_id.id])]</field>
</record>
+ <record id="payment_order_comp_rule" model="ir.rule">
+ <field name="name">Payment order multi company rule</field>
+ <field model="ir.model" name="model_id" ref="model_payment_order"/>
+ <field eval="True" name="global"/>
+ <field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('company_id.child_ids','child_of',[user.company_id.id])]</field>
+ </record>
+
+ <record id="payment_line_comp_rule" model="ir.rule">
+ <field name="name">Payment line multi company rule</field>
+ <field model="ir.model" name="model_id" ref="model_payment_line"/>
+ <field eval="True" name="global"/>
+ <field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('company_id.child_ids','child_of',[user.company_id.id])]</field>
+ </record>
+
</data>
</openerp>
=== modified file 'account_voucher/account_voucher_view.xml'
--- account_voucher/account_voucher_view.xml 2011-01-18 17:05:22 +0000
+++ account_voucher/account_voucher_view.xml 2011-02-28 06:15:26 +0000
@@ -79,7 +79,7 @@
</page>
<page string="Journal Items" groups="base.group_extended" attrs="{'invisible': [('state','!=','posted')]}">
<group col="6" colspan="4">
- <field name="company_id" widget="selection" groups="base.group_multi_company"/>
+ <field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="period_id"/>
<field name="audit"/>
</group>
@@ -97,7 +97,7 @@
<field name="state"/>
<field name="reconcile_id"/>
</tree>
- </field>
+ </field>
</page>
</notebook>
<group col="10" colspan="4">
Follow ups