[MERGE] forward port branch 10.0 up to 41af298d9d
This commit is contained in:
@@ -354,7 +354,8 @@ class HrExpense(models.Model):
|
|||||||
product = default_product
|
product = default_product
|
||||||
else:
|
else:
|
||||||
expense_description = expense_description.replace(product_code.group(), '')
|
expense_description = expense_description.replace(product_code.group(), '')
|
||||||
product = self.env['product.product'].search([('default_code', 'ilike', product_code.group(1))]) or default_product
|
products = self.env['product.product'].search([('default_code', 'ilike', product_code.group(1))]) or default_product
|
||||||
|
product = products.filtered(lambda p: p.default_code == product_code.group(1)) or products[0]
|
||||||
|
|
||||||
pattern = '[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?'
|
pattern = '[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?'
|
||||||
# Match the last occurence of a float in the string
|
# Match the last occurence of a float in the string
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ class HrPayslipEmployees(models.TransientModel):
|
|||||||
'date_from': from_date,
|
'date_from': from_date,
|
||||||
'date_to': to_date,
|
'date_to': to_date,
|
||||||
'credit_note': run_data.get('credit_note'),
|
'credit_note': run_data.get('credit_note'),
|
||||||
|
'company_id': employee.company_id.id,
|
||||||
}
|
}
|
||||||
payslips += self.env['hr.payslip'].create(res)
|
payslips += self.env['hr.payslip'].create(res)
|
||||||
payslips.compute_sheet()
|
payslips.compute_sheet()
|
||||||
|
|||||||
Reference in New Issue
Block a user