},
_product_search_string: function(product){
var str = '' + product.id + ':' + product.display_name;
- if(product.ean13){
+ if (product.ean13) {
str += '|' + product.ean13;
}
- if(product.default_code){
- str += '|' + product.default_code;
+ if (product.default_code) {
+ str += '|' + product.default_code.replace(':','');
+ }
+ if (product.description) {
+ str += '|' + product.description.replace(':','');
+ }
+ if (product.description_sale) {
+ str += '|' + product.description_sale.replace(':','');
}
var packagings = this.packagings_by_product_tmpl_id[product.product_tmpl_id] || [];
- for(var i = 0; i < packagings.length; i++){
+ for (var i = 0; i < packagings.length; i++) {
str += '|' + packagings[i].ean;
}
return str + '\n';
}
var pack = this.packagings_by_ean13[ean13];
if(pack){
- return this.product_by_id[pack.product_id[0]];
+ return this.product_by_id[pack.product_tmpl_id[0]];
}
return undefined;
},
##############################################################################
from openerp.osv import osv
-
+from openerp.tools.translate import _
class portal_project(osv.Model):
""" Update of mail_mail class, to add the signin URL to notifications. """
""" Override to add portal option. """
selection = super(portal_project, self)._get_visibility_selection(cr, uid, context=context)
idx = [item[0] for item in selection].index('public')
- selection.insert((idx + 1), ('portal', 'Customer related project: visible through portal'))
+ selection.insert((idx + 1), ('portal', _('Customer related project: visible through portal')))
return selection
# return [('public', 'All Users'),
# ('portal', 'Portal Users and Employees'),
def _get_visibility_selection(self, cr, uid, context=None):
""" Overriden in portal_project to offer more options """
- return [('public', 'Public project'),
- ('employees', 'Internal project: all employees can access'),
- ('followers', 'Private project: followers Only')]
+ return [('public', _('Public project')),
+ ('employees', _('Internal project: all employees can access')),
+ ('followers', _('Private project: followers Only'))]
def attachment_tree_view(self, cr, uid, ids, context):
task_ids = self.pool.get('project.task').search(cr, uid, [('project_id', 'in', ids)])
</h1>
<div name="options_active" invisible="1">
<field name="use_tasks" class="oe_inline"/>
- <label for="use_tasks" name="use_task"/>
+ <label for="use_tasks" name="use_task" string="Use Tasks"/>
</div>
</div>
<div class="oe_right oe_button_box" name="buttons" groups="base.group_user">
attrs="{'readonly':[('state','in',['close', 'cancelled'])]}"
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'project.group_project_manager']}"/>
<newline/>
- <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
+ <field name="partner_id" on_change="onchange_partner_id(partner_id)" string="Customer"/>
</group>
<group name="group_alias"
attrs="{'invisible': [('alias_domain', '=', False)]}">
groups="project.group_time_work_estimation_tasks"/>
</group>
<group name="misc">
- <field name="date_start"/>
+ <field name="date_start" string="Start Date"/>
<field name="date" string="End Date"/>
<field name="sequence" groups="base.group_no_one"/>
<field name="active" attrs="{'invisible':[('state','in',['open', 'pending', 'template'])]}"/>