[MERGE] forward port branch saas-15 up to 0ae300e9e6
This commit is contained in:
@@ -370,7 +370,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()
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
-
|
-
|
||||||
!python {model: res.company}: |
|
!python {model: res.company}: |
|
||||||
company = self.env.ref('base.main_company')
|
company = self.env.ref('base.main_company')
|
||||||
company.currency_id = self.env.ref('base.EUR')
|
self.env.cr.execute("UPDATE res_company SET currency_id = %s WHERE id = %s", [self.env.ref("base.EUR").id, company.id])
|
||||||
-
|
-
|
||||||
Set a product as using fifo price
|
Set a product as using fifo price
|
||||||
-
|
-
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<field name="inherit_id" ref="stock.view_inventory_form"/>
|
<field name="inherit_id" ref="stock.view_inventory_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='date']" position="after">
|
<xpath expr="//field[@name='date']" position="after">
|
||||||
<field name="accounting_date"/>
|
<field name="accounting_date" attrs="{'readonly':[('state','!=', 'draft')]}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Set the company currency as EURO for the sake of repeatibility
|
Set the company currency as EURO for the sake of repeatibility
|
||||||
-
|
-
|
||||||
!python {model: res.company, id: base.main_company}: |
|
!python {model: res.company, id: base.main_company}: |
|
||||||
self.write({'currency_id':ref('base.EUR')})
|
self.env.cr.execute("UPDATE res_company SET currency_id = %s WHERE id = %s", [self.env.ref("base.EUR").id, self.id])
|
||||||
|
|
||||||
-
|
-
|
||||||
Set product category removal strategy as LIFO
|
Set product category removal strategy as LIFO
|
||||||
@@ -109,4 +109,4 @@
|
|||||||
Check if the move value correctly reflects the fifo costing method
|
Check if the move value correctly reflects the fifo costing method
|
||||||
-
|
-
|
||||||
!python {model: stock.picking, id: outgoing_lifo_shipment}: |
|
!python {model: stock.picking, id: outgoing_lifo_shipment}: |
|
||||||
assert self.move_lines.value == -1400.0, 'Stock move value should have been 1400 euro'
|
assert self.move_lines.value == -1400.0, 'Stock move value should have been 1400 euro'
|
||||||
|
|||||||
Reference in New Issue
Block a user