[MERGE] Forward-port of 7.0 bugfixes up to 7d3453d119
This commit is contained in:
commit
8e83dbff5d
|
@ -224,7 +224,7 @@ class partner_vat_intra(osv.osv_memory):
|
||||||
data_head = """<?xml version="1.0" encoding="ISO-8859-1"?>
|
data_head = """<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
<ns2:IntraConsignment xmlns="http://www.minfin.fgov.be/InputCommon" xmlns:ns2="http://www.minfin.fgov.be/IntraConsignment" IntraListingsNbr="1">
|
<ns2:IntraConsignment xmlns="http://www.minfin.fgov.be/InputCommon" xmlns:ns2="http://www.minfin.fgov.be/IntraConsignment" IntraListingsNbr="1">
|
||||||
<ns2:Representative>
|
<ns2:Representative>
|
||||||
<RepresentativeID identificationType="NVAT" issuedBy="%(issued_by)s">%(company_vat)s</RepresentativeID>
|
<RepresentativeID identificationType="NVAT" issuedBy="%(issued_by)s">%(vatnum)s</RepresentativeID>
|
||||||
<Name>%(company_name)s</Name>
|
<Name>%(company_name)s</Name>
|
||||||
<Street>%(street)s</Street>
|
<Street>%(street)s</Street>
|
||||||
<PostCode>%(post_code)s</PostCode>
|
<PostCode>%(post_code)s</PostCode>
|
||||||
|
|
|
@ -71,6 +71,8 @@ class purchase_requisition(osv.osv):
|
||||||
for purchase_id in purchase.purchase_ids:
|
for purchase_id in purchase.purchase_ids:
|
||||||
if str(purchase_id.state) in('draft'):
|
if str(purchase_id.state) in('draft'):
|
||||||
purchase_order_obj.action_cancel(cr,uid,[purchase_id.id])
|
purchase_order_obj.action_cancel(cr,uid,[purchase_id.id])
|
||||||
|
procurement_ids = self.pool['procurement.order'].search(cr, uid, [('requisition_id', 'in', ids)], context=context)
|
||||||
|
self.pool['procurement.order'].write(cr, uid, procurement_ids, {'state': 'cancel'}, context=context)
|
||||||
return self.write(cr, uid, ids, {'state': 'cancel'})
|
return self.write(cr, uid, ids, {'state': 'cancel'})
|
||||||
|
|
||||||
def tender_in_progress(self, cr, uid, ids, context=None):
|
def tender_in_progress(self, cr, uid, ids, context=None):
|
||||||
|
@ -80,6 +82,8 @@ class purchase_requisition(osv.osv):
|
||||||
return self.write(cr, uid, ids, {'state': 'draft'})
|
return self.write(cr, uid, ids, {'state': 'draft'})
|
||||||
|
|
||||||
def tender_done(self, cr, uid, ids, context=None):
|
def tender_done(self, cr, uid, ids, context=None):
|
||||||
|
procurement_ids = self.pool['procurement.order'].search(cr, uid, [('requisition_id', 'in', ids)], context=context)
|
||||||
|
self.pool['procurement.order'].write(cr, uid, procurement_ids, {'state': 'done'}, context=context)
|
||||||
return self.write(cr, uid, ids, {'state':'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
|
return self.write(cr, uid, ids, {'state':'done', 'date_end':time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
|
||||||
|
|
||||||
def _planned_date(self, requisition, delay=0.0):
|
def _planned_date(self, requisition, delay=0.0):
|
||||||
|
@ -268,7 +272,7 @@ class procurement_order(osv.osv):
|
||||||
for procurement in self.browse(cr, uid, ids, context=context):
|
for procurement in self.browse(cr, uid, ids, context=context):
|
||||||
if procurement.product_id.purchase_requisition:
|
if procurement.product_id.purchase_requisition:
|
||||||
user_company = self.pool['res.users'].browse(cr, uid, uid, context=context).company_id
|
user_company = self.pool['res.users'].browse(cr, uid, uid, context=context).company_id
|
||||||
req = res[procurement.id] = requisition_obj.create(cr, uid, {
|
req = requisition_obj.create(cr, uid, {
|
||||||
'origin': procurement.origin,
|
'origin': procurement.origin,
|
||||||
'date_end': procurement.date_planned,
|
'date_end': procurement.date_planned,
|
||||||
'warehouse_id': self._get_warehouse(procurement, user_company),
|
'warehouse_id': self._get_warehouse(procurement, user_company),
|
||||||
|
@ -284,6 +288,7 @@ class procurement_order(osv.osv):
|
||||||
'state': 'running',
|
'state': 'running',
|
||||||
'requisition_id': req
|
'requisition_id': req
|
||||||
})
|
})
|
||||||
|
res[procurement.id] = 0
|
||||||
else:
|
else:
|
||||||
non_requisition.append(procurement.id)
|
non_requisition.append(procurement.id)
|
||||||
|
|
||||||
|
|
|
@ -1108,7 +1108,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
|
||||||
ids = value;
|
ids = value;
|
||||||
}
|
}
|
||||||
new instance.web.Model(column.relation)
|
new instance.web.Model(column.relation)
|
||||||
.call('name_get', [ids]).done(function (names) {
|
.call('name_get', [ids, this.dataset.context]).done(function (names) {
|
||||||
// FIXME: nth horrible hack in this poor listview
|
// FIXME: nth horrible hack in this poor listview
|
||||||
record.set(column.id + '__display',
|
record.set(column.id + '__display',
|
||||||
_(names).pluck(1).join(', '));
|
_(names).pluck(1).join(', '));
|
||||||
|
|
|
@ -380,7 +380,7 @@ class view(osv.osv):
|
||||||
node.getparent().remove(node)
|
node.getparent().remove(node)
|
||||||
elif pos == 'attributes':
|
elif pos == 'attributes':
|
||||||
for child in spec.getiterator('attribute'):
|
for child in spec.getiterator('attribute'):
|
||||||
attribute = (child.get('name'), child.text and child.text.encode('utf8') or None)
|
attribute = (child.get('name'), child.text or None)
|
||||||
if attribute[1]:
|
if attribute[1]:
|
||||||
node.set(attribute[0], attribute[1])
|
node.set(attribute[0], attribute[1])
|
||||||
elif attribute[0] in node.attrib:
|
elif attribute[0] in node.attrib:
|
||||||
|
|
|
@ -103,17 +103,7 @@ class base_module_upgrade(osv.osv_memory):
|
||||||
|
|
||||||
openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
|
openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
|
||||||
|
|
||||||
ir_model_data = self.pool.get('ir.model.data')
|
return {'type': 'ir.actions.act_window_close'}
|
||||||
__, res_id = ir_model_data.get_object_reference(cr, uid, 'base', 'view_base_module_upgrade_install')
|
|
||||||
return {
|
|
||||||
'view_type': 'form',
|
|
||||||
'view_mode': 'form',
|
|
||||||
'res_model': 'base.module.upgrade',
|
|
||||||
'views': [(res_id, 'form')],
|
|
||||||
'view_id': False,
|
|
||||||
'type': 'ir.actions.act_window',
|
|
||||||
'target': 'new',
|
|
||||||
}
|
|
||||||
|
|
||||||
def config(self, cr, uid, ids, context=None):
|
def config(self, cr, uid, ids, context=None):
|
||||||
return self.pool.get('res.config').next(cr, uid, [], context=context)
|
return self.pool.get('res.config').next(cr, uid, [], context=context)
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<separator string="Impacted Modules"/>
|
<separator string="Impacted Modules"/>
|
||||||
<field name="module_info"/>
|
<field name="module_info"/>
|
||||||
<footer>
|
<footer>
|
||||||
<button name="upgrade_module" string="Update" type="object" class="oe_highlight"/>
|
<button name="upgrade_module" string="Confirm" type="object" class="oe_highlight"/>
|
||||||
or
|
or
|
||||||
<button string="Cancel" class="oe_link" name="upgrade_module_cancel" type="object"/>
|
<button string="Cancel" class="oe_link" name="upgrade_module_cancel" type="object"/>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in New Issue