[FIX]: Fix address template problem.

bzr revid: atp@tinyerp.com-20120509121244-ougokpvpe9i5dxkx
This commit is contained in:
Atul Patel (OpenERP) 2012-05-09 17:42:44 +05:30
parent 9ea1132374
commit 8d2723ac4f
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ openerp.event = function(instance){
set_value:function(value){
var self = this;
this.get_address(value).done(function(value){
self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
if(!self.__parentedParent.$element.find("#address_text").length)self.__parentedParent.$element.find(".oe_td_border").after(instance.web.qweb.render("address",{'record': value}));
var address = _.str.sprintf(' %(street)s, %(city)s, %(country_id[1])s', value);
return self.list_addresses(address);

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<template>
<td t-name="address">
<td id = "address_text" t-name="address">
<t t-esc="record.street"/> <br/>
<t t-esc="record.city"/> <br/>
<t t-esc="record.country_id[1]"/>