diff options
| author | Olivier Dony <odo@openerp.com> | 2014-05-27 16:50:02 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2014-05-27 16:50:02 +0200 |
| commit | 30f43daa3bb26a30df95da14fb705aeda1f56e72 (patch) | |
| tree | ffe0acc07eac3f789648eb8cf290f544b789e296 | |
| parent | 63b7f678f35adf534f98f9a920aaeef48f865d55 (diff) | |
| parent | aeaa826d2f29aa6dadb65051a2db1652fa87e3b7 (diff) | |
[MERGE] Forward-port of latest 7.0 bugfixes, up to aeaa826
| -rw-r--r-- | addons/account/account_invoice_view.xml | 2 | ||||
| -rw-r--r-- | addons/account_followup/report/account_followup_print.sxw | bin | 12158 -> 12162 bytes | |||
| -rw-r--r-- | addons/delivery/delivery.py | 7 | ||||
| -rw-r--r-- | addons/hr/static/src/img/default_image.png | bin | 0 -> 2723 bytes | |||
| -rw-r--r-- | addons/hr_recruitment/hr_recruitment.py | 11 | ||||
| -rw-r--r-- | addons/pad/static/src/img/pad_link_companies.jpeg | bin | 0 -> 70544 bytes | |||
| -rw-r--r-- | addons/purchase/edi/purchase_order_action_data.xml | 2 | ||||
| -rw-r--r-- | addons/purchase/purchase.py | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/view_form.js | 6 |
9 files changed, 22 insertions, 8 deletions
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index bd586cd8c87..1dca824b079 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -60,7 +60,7 @@ </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 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 name="company_id" groups="base.group_multi_company" readonly="1"/> </group> diff --git a/addons/account_followup/report/account_followup_print.sxw b/addons/account_followup/report/account_followup_print.sxw Binary files differindex 4379aa5abce..6e2da047a73 100644 --- a/addons/account_followup/report/account_followup_print.sxw +++ b/addons/account_followup/report/account_followup_print.sxw diff --git a/addons/delivery/delivery.py b/addons/delivery/delivery.py index 3827baaf1c5..59542eefc90 100644 --- a/addons/delivery/delivery.py +++ b/addons/delivery/delivery.py @@ -191,14 +191,15 @@ class delivery_grid(osv.osv): total = 0 weight = 0 volume = 0 + product_uom_obj = self.pool.get('product.uom') for line in order.order_line: if not line.product_id or line.is_delivery: continue - weight += (line.product_id.weight or 0.0) * line.product_uom_qty - volume += (line.product_id.volume 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) + 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 - 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): diff --git a/addons/hr/static/src/img/default_image.png b/addons/hr/static/src/img/default_image.png Binary files differnew file mode 100644 index 00000000000..87fdbc5af55 --- /dev/null +++ b/addons/hr/static/src/img/default_image.png diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 89dd592e032..6a22ad028c0 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -115,6 +115,15 @@ class hr_applicant(osv.Model): return int(department_ids[0][0]) 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): access_rights_uid = access_rights_uid or uid 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, '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), - '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, 'date_last_stage_update': fields.datetime.now, } diff --git a/addons/pad/static/src/img/pad_link_companies.jpeg b/addons/pad/static/src/img/pad_link_companies.jpeg Binary files differnew file mode 100644 index 00000000000..1bce3a56186 --- /dev/null +++ b/addons/pad/static/src/img/pad_link_companies.jpeg diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml index 5bb56e8ab15..51d075b0ce0 100644 --- a/addons/purchase/edi/purchase_order_action_data.xml +++ b/addons/purchase/edi/purchase_order_action_data.xml @@ -37,7 +37,7 @@ <p style="border-left: 1px solid #8e0000; margin-left: 30px;"> <strong>REFERENCES</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 /> % if object.origin: Order reference: ${object.origin}<br /> diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 6d9c37cf043..6497ec0045c 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -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."), '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'), - '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'), '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)]}, diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js index d93b59bc520..38eb78e6ad8 100644 --- a/addons/web/static/src/js/view_form.js +++ b/addons/web/static/src/js/view_form.js @@ -4177,7 +4177,11 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({ else return $.when(); }).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); }else { self.handle_button(name, id, function(){ |
