[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9183
rev-id launchpad_translations_on_behalf_of_openerp-20130531070107-7d2k818beg8965ll bzr revid: odo@openerp.com-20130603121852-jdl6vlo9dmjk0rlc
This commit is contained in:
commit
0f983a0146
|
@ -1034,9 +1034,15 @@ class account_period(osv.osv):
|
||||||
context = {}
|
context = {}
|
||||||
ids = []
|
ids = []
|
||||||
if name:
|
if name:
|
||||||
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
|
ids = self.search(cr, user,
|
||||||
|
[('code', 'ilike', name)] + args,
|
||||||
|
limit=limit,
|
||||||
|
context=context)
|
||||||
if not ids:
|
if not ids:
|
||||||
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
|
ids = self.search(cr, user,
|
||||||
|
[('name', operator, name)] + args,
|
||||||
|
limit=limit,
|
||||||
|
context=context)
|
||||||
return self.name_get(cr, user, ids, context=context)
|
return self.name_get(cr, user, ids, context=context)
|
||||||
|
|
||||||
def write(self, cr, uid, ids, vals, context=None):
|
def write(self, cr, uid, ids, vals, context=None):
|
||||||
|
|
|
@ -907,9 +907,7 @@
|
||||||
<label for="type"/>
|
<label for="type"/>
|
||||||
<div>
|
<div>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="amount" class="oe_inline"
|
<field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
|
||||||
attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
|
|
||||||
<label string="%%" attrs="{'invisible':[('type','<>','percent')]}"/>
|
|
||||||
</div>
|
</div>
|
||||||
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||||
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
<field name="parent_id" invisible="1"/>
|
<field name="parent_id" invisible="1"/>
|
||||||
<field name="type"/>
|
<field name="type"/>
|
||||||
<field name="company_id" groups="base.group_multi_company"/>
|
<field name="company_id" groups="base.group_multi_company"/>
|
||||||
|
<field name="template_id" invisible="1"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -22,7 +22,7 @@ class CashBox(osv.osv_memory):
|
||||||
|
|
||||||
records = self.pool[active_model].browse(cr, uid, active_ids, context=context)
|
records = self.pool[active_model].browse(cr, uid, active_ids, context=context)
|
||||||
|
|
||||||
return self._run(cr, uid, ids, records, context=None)
|
return self._run(cr, uid, ids, records, context=context)
|
||||||
|
|
||||||
def _run(self, cr, uid, ids, records, context=None):
|
def _run(self, cr, uid, ids, records, context=None):
|
||||||
for box in self.browse(cr, uid, ids, context=context):
|
for box in self.browse(cr, uid, ids, context=context):
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
<field name="model">res.partner</field>
|
<field name="model">res.partner</field>
|
||||||
<field name="priority" eval="20"/>
|
<field name="priority" eval="20"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Customer Followup">
|
<tree string="Customer Followup" create="false" delete="false">
|
||||||
<field name="display_name"/>
|
<field name="display_name"/>
|
||||||
<field name="payment_next_action_date"/>
|
<field name="payment_next_action_date"/>
|
||||||
<field name="payment_next_action"/>
|
<field name="payment_next_action"/>
|
||||||
<field name="user_id" invisible="1"/>
|
<field name="user_id" invisible="1"/>
|
||||||
|
<field name="country_id" invisible="1"/>
|
||||||
<field name="parent_id" invisible="1"/>
|
<field name="parent_id" invisible="1"/>
|
||||||
<field name="payment_responsible_id"/>
|
<field name="payment_responsible_id"/>
|
||||||
<field name="payment_earliest_due_date"/>
|
<field name="payment_earliest_due_date"/>
|
||||||
|
|
|
@ -23,6 +23,7 @@ import time
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
|
||||||
from openerp.osv import fields, osv
|
from openerp.osv import fields, osv
|
||||||
|
from openerp.tools.translate import _
|
||||||
|
|
||||||
class payment_order_create(osv.osv_memory):
|
class payment_order_create(osv.osv_memory):
|
||||||
"""
|
"""
|
||||||
|
@ -108,7 +109,7 @@ class payment_order_create(osv.osv_memory):
|
||||||
context.update({'line_ids': line_ids})
|
context.update({'line_ids': line_ids})
|
||||||
model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context)
|
model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context)
|
||||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||||
return {'name': ('Entrie Lines'),
|
return {'name': _('Entry Lines'),
|
||||||
'context': context,
|
'context': context,
|
||||||
'view_type': 'form',
|
'view_type': 'form',
|
||||||
'view_mode': 'form',
|
'view_mode': 'form',
|
||||||
|
|
|
@ -62,6 +62,7 @@ class base_action_rule(osv.osv):
|
||||||
'sequence': fields.integer('Sequence',
|
'sequence': fields.integer('Sequence',
|
||||||
help="Gives the sequence order when displaying a list of rules."),
|
help="Gives the sequence order when displaying a list of rules."),
|
||||||
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
|
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
|
||||||
|
help="When should the condition be triggered. If present, will be checked by the scheduler. If empty, will be checked at creation and update.",
|
||||||
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"),
|
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"),
|
||||||
'trg_date_range': fields.integer('Delay after trigger date',
|
'trg_date_range': fields.integer('Delay after trigger date',
|
||||||
help="Delay after the trigger date." \
|
help="Delay after the trigger date." \
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
<tree string="Document Page">
|
<tree string="Document Page">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="parent_id"/>
|
<field name="parent_id"/>
|
||||||
|
<field name="create_uid" invisible="1"/>
|
||||||
<field name="write_uid"/>
|
<field name="write_uid"/>
|
||||||
<field name="write_date"/>
|
<field name="write_date"/>
|
||||||
</tree>
|
</tree>
|
||||||
|
|
|
@ -33,6 +33,11 @@ class procurement_order(osv.osv):
|
||||||
'production_id': fields.many2one('mrp.production', 'Manufacturing Order'),
|
'production_id': fields.many2one('mrp.production', 'Manufacturing Order'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def _prepare_order_line_procurement(self, cr, uid, order, line, move_id, date_planned, context=None):
|
||||||
|
result = super(procurement_order, self)._prepare_order_line_procurement(cr, uid, order, line, move_id, date_planned, context)
|
||||||
|
result['property_ids'] = [(6, 0, [x.id for x in line.property_ids])]
|
||||||
|
return result
|
||||||
|
|
||||||
def check_produce_product(self, cr, uid, procurement, context=None):
|
def check_produce_product(self, cr, uid, procurement, context=None):
|
||||||
''' Depict the capacity of the procurement workflow to produce products (not services)'''
|
''' Depict the capacity of the procurement workflow to produce products (not services)'''
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -33,8 +33,9 @@
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="portal_hr_kanban_view_employees">
|
<record model="ir.ui.view" id="portal_hr_kanban_view_employees">
|
||||||
<field name="name">HR - Employess Kanban</field>
|
<field name="name">HR - Employees Kanban</field>
|
||||||
<field name="model">hr.employee</field>
|
<field name="model">hr.employee</field>
|
||||||
|
<field name="inherit_id" eval="False"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<kanban>
|
<kanban>
|
||||||
<field name="last_login"/>
|
<field name="last_login"/>
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
<field name="product_uom" string="Unit of Measure"/>
|
<field name="product_uom" string="Unit of Measure"/>
|
||||||
<field name="procure_method"/>
|
<field name="procure_method"/>
|
||||||
<field name="state"/>
|
<field name="state"/>
|
||||||
|
<field name="name" placeholder="External note..." invisible="1"/>
|
||||||
<field name="message"/>
|
<field name="message"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<field name="name">project.task.history.cumulative.tree</field>
|
<field name="name">project.task.history.cumulative.tree</field>
|
||||||
<field name="model">project.task.history.cumulative</field>
|
<field name="model">project.task.history.cumulative</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Tasks's Cumulative Flow">
|
<tree string="Tasks's Cumulative Flow" create="false">
|
||||||
<field name="date"/>
|
<field name="date"/>
|
||||||
<field name="project_id"/>
|
<field name="project_id"/>
|
||||||
<field name="task_id"/>
|
<field name="task_id"/>
|
||||||
|
|
|
@ -302,7 +302,6 @@ class sale_order(osv.osv):
|
||||||
'move_id': move_id,
|
'move_id': move_id,
|
||||||
'company_id': order.company_id.id,
|
'company_id': order.company_id.id,
|
||||||
'note': line.name,
|
'note': line.name,
|
||||||
'property_ids': [(6, 0, [x.id for x in line.property_ids])],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def _prepare_order_line_move(self, cr, uid, order, line, picking_id, date_planned, context=None):
|
def _prepare_order_line_move(self, cr, uid, order, line, picking_id, date_planned, context=None):
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
|
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
|
||||||
first_picking = self.browse(cr, uid, delivery_orders[0], context=context)
|
first_picking = self.browse(cr, uid, delivery_orders[-1], context=context)
|
||||||
if first_picking.force_assign(cr, uid, first_picking):
|
if first_picking.force_assign(cr, uid, first_picking):
|
||||||
first_move = first_picking.move_lines[0]
|
first_move = first_picking.move_lines[0]
|
||||||
values = {'move%s'%(first_move.id): {'product_qty': 2, 'product_uom':ref('product.product_uom_unit')}}
|
values = {'move%s'%(first_move.id): {'product_qty': 2, 'product_uom':ref('product.product_uom_unit')}}
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
-
|
-
|
||||||
!python {model: stock.picking}: |
|
!python {model: stock.picking}: |
|
||||||
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
|
delivery_orders = self.search(cr, uid, [('sale_id','=',ref("sale.sale_order_8"))])
|
||||||
last_delivery_order_id = delivery_orders[0]
|
last_delivery_order_id = delivery_orders[-1]
|
||||||
self.pool.get('stock.picking').signal_button_cancel(cr, uid, [last_delivery_order_id])
|
self.pool.get('stock.picking').signal_button_cancel(cr, uid, [last_delivery_order_id])
|
||||||
-
|
-
|
||||||
I run the scheduler.
|
I run the scheduler.
|
||||||
|
|
|
@ -413,7 +413,8 @@ class share_wizard(osv.TransientModel):
|
||||||
relation_model_id = model_obj.search(cr, UID_ROOT, [('model','=',coldef._obj)])[0]
|
relation_model_id = model_obj.search(cr, UID_ROOT, [('model','=',coldef._obj)])[0]
|
||||||
relation_model_browse = model_obj.browse(cr, UID_ROOT, relation_model_id, context=context)
|
relation_model_browse = model_obj.browse(cr, UID_ROOT, relation_model_id, context=context)
|
||||||
relation_osv = self.pool[coldef._obj]
|
relation_osv = self.pool[coldef._obj]
|
||||||
if coltype == 'one2many':
|
#skip virtual one2many fields (related, ...) as there is no reverse relationship
|
||||||
|
if coltype == 'one2many' and hasattr(coldef, '_fields_id'):
|
||||||
# don't record reverse path if it's not a real m2o (that happens, but rarely)
|
# don't record reverse path if it's not a real m2o (that happens, but rarely)
|
||||||
dest_model_ci = relation_osv._all_columns
|
dest_model_ci = relation_osv._all_columns
|
||||||
reverse_rel = coldef._fields_id
|
reverse_rel = coldef._fields_id
|
||||||
|
|
|
@ -543,6 +543,7 @@ class stock_picking(osv.osv):
|
||||||
_name = "stock.picking"
|
_name = "stock.picking"
|
||||||
_inherit = ['mail.thread']
|
_inherit = ['mail.thread']
|
||||||
_description = "Picking List"
|
_description = "Picking List"
|
||||||
|
_order = "id desc"
|
||||||
|
|
||||||
def _set_maximum_date(self, cr, uid, ids, name, value, arg, context=None):
|
def _set_maximum_date(self, cr, uid, ids, name, value, arg, context=None):
|
||||||
""" Calculates planned date if it is greater than 'value'.
|
""" Calculates planned date if it is greater than 'value'.
|
||||||
|
|
Loading…
Reference in New Issue