[ADD]On_change partner_id and remove useless comments

bzr revid: dle@openerp.com-20121119132232-2ac4n7hodno1r7ju
This commit is contained in:
Denis Ledoux dle@openerp.com 2012-11-19 14:22:32 +01:00
parent 57f766370b
commit f80d9e6100
2 changed files with 2 additions and 19 deletions

View File

@ -1070,13 +1070,13 @@
<field name="arch" type="xml">
<tree_account_move_line_quickadd colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" create="true" on_write="on_create_write" version="7.0" editable="top">
<field name="journal_id" invisible="1"/>
<field name="period_id" invisible="1" />
<field name="period_id" invisible="1"/>
<field name="date"/>
<field name="move_id" required="0"/>
<field name="ref"/>
<field name="invoice"/>
<field name="name"/>
<field name="partner_id"/>
<field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
<field name="account_id"/>
<field name="reconcile_partial_id"/>
<field name="debit" sum="Total debit"/>

View File

@ -85,23 +85,6 @@ openerp.account.quickadd = function (instance) {
["journal_id", "=", self.current_journal],
["period_id", "=", self.current_period]
]);
//1
/*var ncontext = {
"journal_id": self.current_journal,
"period_id" :self.current_period,
};
var new instance.web.CompoundDomain(self.last_domain = new instance.web.CompoundContext(this.last_context, ncontext);
_.extend(this.dataset.context, ncontext);
*/
//2
/*
var compoundContext = new instance.web.CompoundContext(self.last_context,{
"journal_id": self.current_journal,
"period_id" :self.current_period,
});
*/
//3
self.last_context["journal_id"] = self.current_journal;
self.last_context["period_id"] = self.current_period;
var compoundContext = self.last_context;