[MERGE] Forward-port of latest 7.0 bugfixes, up to aeaa826
This commit is contained in:
commit
30f43daa3b
|
@ -60,7 +60,7 @@
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)" groups="account.group_account_user"/>
|
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)" groups="account.group_account_user"/>
|
||||||
<field name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
|
<field name="invoice_line_tax_id" context="{'type':parent.get('type')}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
|
||||||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
||||||
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
|
||||||
</group>
|
</group>
|
||||||
|
|
Binary file not shown.
|
@ -191,14 +191,15 @@ class delivery_grid(osv.osv):
|
||||||
total = 0
|
total = 0
|
||||||
weight = 0
|
weight = 0
|
||||||
volume = 0
|
volume = 0
|
||||||
|
product_uom_obj = self.pool.get('product.uom')
|
||||||
for line in order.order_line:
|
for line in order.order_line:
|
||||||
if not line.product_id or line.is_delivery:
|
if not line.product_id or line.is_delivery:
|
||||||
continue
|
continue
|
||||||
weight += (line.product_id.weight or 0.0) * line.product_uom_qty
|
q = product_uom_obj._compute_qty(cr, uid, line.product_uom.id, line.product_uos_qty, line.product_id.uom_id.id)
|
||||||
volume += (line.product_id.volume or 0.0) * line.product_uom_qty
|
weight += (line.product_id.weight or 0.0) * q
|
||||||
|
volume += (line.product_id.volume or 0.0) * q
|
||||||
total = order.amount_total or 0.0
|
total = order.amount_total or 0.0
|
||||||
|
|
||||||
|
|
||||||
return self.get_price_from_picking(cr, uid, id, total,weight, volume, context=context)
|
return self.get_price_from_picking(cr, uid, id, total,weight, volume, context=context)
|
||||||
|
|
||||||
def get_price_from_picking(self, cr, uid, id, total, weight, volume, context=None):
|
def get_price_from_picking(self, cr, uid, id, total, weight, volume, context=None):
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
|
@ -115,6 +115,15 @@ class hr_applicant(osv.Model):
|
||||||
return int(department_ids[0][0])
|
return int(department_ids[0][0])
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def _get_default_company_id(self, cr, uid, department_id=None, context=None):
|
||||||
|
company_id = False
|
||||||
|
if department_id:
|
||||||
|
department = self.pool['hr.department'].browse(cr, uid, department_id, context=context)
|
||||||
|
company_id = department.company_id.id if department and department.company_id else False
|
||||||
|
if not company_id:
|
||||||
|
company_id = self.pool['res.company']._company_default_get(cr, uid, 'hr.applicant', context=context)
|
||||||
|
return company_id
|
||||||
|
|
||||||
def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
|
def _read_group_stage_ids(self, cr, uid, ids, domain, read_group_order=None, access_rights_uid=None, context=None):
|
||||||
access_rights_uid = access_rights_uid or uid
|
access_rights_uid = access_rights_uid or uid
|
||||||
stage_obj = self.pool.get('hr.recruitment.stage')
|
stage_obj = self.pool.get('hr.recruitment.stage')
|
||||||
|
@ -232,7 +241,7 @@ class hr_applicant(osv.Model):
|
||||||
'user_id': lambda s, cr, uid, c: uid,
|
'user_id': lambda s, cr, uid, c: uid,
|
||||||
'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
|
'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
|
||||||
'department_id': lambda s, cr, uid, c: s._get_default_department_id(cr, uid, c),
|
'department_id': lambda s, cr, uid, c: s._get_default_department_id(cr, uid, c),
|
||||||
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'hr.applicant', context=c),
|
'company_id': lambda s, cr, uid, c: s._get_default_company_id(cr, uid, s._get_default_department_id(cr, uid, c), c),
|
||||||
'color': 0,
|
'color': 0,
|
||||||
'date_last_stage_update': fields.datetime.now,
|
'date_last_stage_update': fields.datetime.now,
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
|
@ -37,7 +37,7 @@
|
||||||
<p style="border-left: 1px solid #8e0000; margin-left: 30px;">
|
<p style="border-left: 1px solid #8e0000; margin-left: 30px;">
|
||||||
<strong>REFERENCES</strong><br />
|
<strong>REFERENCES</strong><br />
|
||||||
Order number: <strong>${object.name}</strong><br />
|
Order number: <strong>${object.name}</strong><br />
|
||||||
Order total: <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong><br />
|
Order total: <strong>${object.amount_total} ${object.currency_id.name}</strong><br />
|
||||||
Order date: ${object.date_order}<br />
|
Order date: ${object.date_order}<br />
|
||||||
% if object.origin:
|
% if object.origin:
|
||||||
Order reference: ${object.origin}<br />
|
Order reference: ${object.origin}<br />
|
||||||
|
|
|
@ -192,7 +192,7 @@ class purchase_order(osv.osv):
|
||||||
'picking_ids': fields.one2many('stock.picking.in', 'purchase_id', 'Picking List', readonly=True, help="This is the list of incoming shipments that have been generated for this purchase order."),
|
'picking_ids': fields.one2many('stock.picking.in', 'purchase_id', 'Picking List', readonly=True, help="This is the list of incoming shipments that have been generated for this purchase order."),
|
||||||
'shipped':fields.boolean('Received', readonly=True, select=True, help="It indicates that a picking has been done"),
|
'shipped':fields.boolean('Received', readonly=True, select=True, help="It indicates that a picking has been done"),
|
||||||
'shipped_rate': fields.function(_shipped_rate, string='Received Ratio', type='float'),
|
'shipped_rate': fields.function(_shipped_rate, string='Received Ratio', type='float'),
|
||||||
'invoiced': fields.function(_invoiced, string='Invoice Received', type='boolean', help="It indicates that an invoice has been paid"),
|
'invoiced': fields.function(_invoiced, string='Invoice Received', type='boolean', help="It indicates that an invoice has been validated"),
|
||||||
'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'),
|
'invoiced_rate': fields.function(_invoiced_rate, string='Invoiced', type='float'),
|
||||||
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Based on incoming shipments')], 'Invoicing Control', required=True,
|
'invoice_method': fields.selection([('manual','Based on Purchase Order lines'),('order','Based on generated draft invoice'),('picking','Based on incoming shipments')], 'Invoicing Control', required=True,
|
||||||
readonly=True, states={'draft':[('readonly',False)], 'sent':[('readonly',False)]},
|
readonly=True, states={'draft':[('readonly',False)], 'sent':[('readonly',False)]},
|
||||||
|
|
|
@ -4177,7 +4177,11 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
|
||||||
else
|
else
|
||||||
return $.when();
|
return $.when();
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
if (!self.o2m.options.reload_on_button) {
|
var ds = self.o2m.dataset;
|
||||||
|
var cached_records = _.any([ds.to_create, ds.to_delete, ds.to_write], function(value) {
|
||||||
|
return value.length;
|
||||||
|
});
|
||||||
|
if (!self.o2m.options.reload_on_button && !cached_records) {
|
||||||
self.handle_button(name, id, callback);
|
self.handle_button(name, id, callback);
|
||||||
}else {
|
}else {
|
||||||
self.handle_button(name, id, function(){
|
self.handle_button(name, id, function(){
|
||||||
|
|
Loading…
Reference in New Issue