← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 695103] Re: [6.0RC1][account_fiscal_position_rule_sale] Problems with 'onchange_partner_id'

 

Hello Raphaël,

I don't have "delivery" module installed in the DB I'm using. I agree with you that the 'onchange' methods signature is inconsistent (as same as the 'context=None/context={}' case), and I hope that the community reach an agreement.
IMHO, I prefer changing the call of 'onchange_partner_id' in 'sale_view.xml' instead of making it dependant on another module, because I think this is less 'invasive'. Besides, what is the purpose of this 'partner_invoice_id' argument in 'onchange_partner_id' method? because is never read, isn't it?.
Regards and thanks for your answer,

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/695103

Title:
  [6.0RC1][account_fiscal_position_rule_sale] Problems with 'onchange_partner_id'

Status in OpenObject Addons Modules:
  Won't Fix

Bug description:
  Hi all,
Using following revisions from trunk (just downloaded today):

Server: 3163
Addons: 4033
Extra-addons:5126

and having installed 'account_fiscal_position_rule_sale' module: when creating a new Sale Order, the 'onchange_partner_id' method overriden in this module crashes because it receives an incorrect number of parameters from view:

(extract from sale_view.xml, lines 30-40)
<record id="view_order_form3" model="ir.ui.view">
			<field name="name">account_fiscal_postion_rule_form_view_order_form3</field>
	   		<field name="model">sale.order</field>
	   		<field name="inherit_id" ref="sale.view_order_form"/>
	   		<field name="priority">32</field>
	   		<field name="arch" type="xml">
				<field name="partner_id" position="replace">
	                            <field name="partner_id" on_change="onchange_partner_id(partner_invoice_id, partner_id, shop_id)" required="1"/>
				</field>
	        	</field>
		</record>

when it should be:

(...)
<field name="partner_id" on_change="onchange_partner_id(partner_id, shop_id)" required="1"/>
(...)

Regards,





References