[MERGE] lp:724059

bzr revid: qdp-launchpad@openerp.com-20110311150926-t7yoq5d0f9rpccdx
This commit is contained in:
Quentin (OpenERP) 2011-03-11 16:09:26 +01:00
commit ad35eeba58
4 changed files with 22 additions and 3 deletions

View File

@ -94,6 +94,7 @@ class payment_order(osv.osv):
], "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 @@ class payment_line(osv.osv):
'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'

View File

@ -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"/>

View File

@ -13,5 +13,19 @@
<field name="domain_force">['|',('company_id','=',False),('company_id','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])]</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])]</field>
</record>
</data>
</openerp>

View File

@ -97,7 +97,7 @@
<field name="state"/>
<field name="reconcile_id"/>
</tree>
</field>
</field>
</page>
</notebook>
<group col="10" colspan="4">