diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py index eaacb3721cc..9121e9f115e 100644 --- a/addons/account/models/chart_template.py +++ b/addons/account/models/chart_template.py @@ -769,7 +769,7 @@ class WizardMultiChartsAccounts(models.TransientModel): if company_id: company = self.env['res.company'].browse(company_id) currency_id = company.on_change_country(company.country_id.id)['value']['currency_id'] - res.update({'currency_id': currency_id}) + res.update({'currency_id': currency_id.id}) chart_templates = account_chart_template.search([('visible', '=', True)]) if chart_templates: diff --git a/addons/account/static/src/js/reconciliation/reconciliation_model.js b/addons/account/static/src/js/reconciliation/reconciliation_model.js index 8f81b700168..b77882323a3 100644 --- a/addons/account/static/src/js/reconciliation/reconciliation_model.js +++ b/addons/account/static/src/js/reconciliation/reconciliation_model.js @@ -605,9 +605,14 @@ var StatementModel = BasicModel.extend({ var line = self.getLine(handle); var props = _.filter(line.reconciliation_proposition, function (prop) {return !prop.is_tax && !prop.invalid;}); if (props.length === 0) { + // Usability: if user has not choosen any lines and click validate, it has the same behavior + // as creating a write-off of the same amount. props.push(self._formatQuickCreate(line, { account_id: [line.st_line.open_balance_account_id, self.accounts[line.st_line.open_balance_account_id]], })); + // update balance of line otherwise it won't be to zero and another line will be added + line.reconciliation_proposition.push(props[0]); + self._computeLine(line); } ids.push(line.id); var values_dict = { diff --git a/addons/auth_oauth/data/auth_oauth_data.xml b/addons/auth_oauth/data/auth_oauth_data.xml index 1b1ff532ae4..8417c9c4b2d 100644 --- a/addons/auth_oauth/data/auth_oauth_data.xml +++ b/addons/auth_oauth/data/auth_oauth_data.xml @@ -16,7 +16,7 @@ https://www.facebook.com/dialog/oauth public_profile,email https://graph.facebook.com/me - + https://graph.facebook.com/me?fields=id,name,email fa fa-facebook-square Log in with facebook diff --git a/addons/hr_payroll/data/hr_payroll_data.xml b/addons/hr_payroll/data/hr_payroll_data.xml index c4b16bd05a4..2eede6d92bb 100644 --- a/addons/hr_payroll/data/hr_payroll_data.xml +++ b/addons/hr_payroll/data/hr_payroll_data.xml @@ -1,6 +1,6 @@ - + Employees diff --git a/addons/l10n_be_hr_payroll/data/l10n_be_hr_payroll_data.xml b/addons/l10n_be_hr_payroll/data/l10n_be_hr_payroll_data.xml index 537021de787..28ed0b1dc14 100644 --- a/addons/l10n_be_hr_payroll/data/l10n_be_hr_payroll_data.xml +++ b/addons/l10n_be_hr_payroll/data/l10n_be_hr_payroll_data.xml @@ -91,7 +91,7 @@ SALARY none code - result = contract.wage * 1.08 + result = categories.BASIC * 1.08 @@ -100,7 +100,7 @@ none code -result = contract.wage +result = categories.BASIC if contract.internet: result += 5.0 if contract.mobile: @@ -163,14 +163,15 @@ elif salary <= 2461.27: result = (((employee.marital=='single') or (employee.marital=='married' and employee.spouse_fiscal_status=='without income')) and (employee.resident_bool!=True)) code -if contract.wage >= 0.01 and contract.wage <= 1095.09: +wage = categories.BASIC +if wage >= 0.01 and wage <= 1095.09: result = 0.0 -elif contract.wage >= 1095.10 and contract.wage <= 1945.38: +elif wage >= 1095.10 and wage <= 1945.38: result = 0.0 -elif contract.wage >= 1945.39 and contract.wage <= 2190.18: - result = -min((contract.wage - 1945.38) * 0.076, 18.60) -elif contract.wage >= 2190.19 and contract.wage <= 6038.82: - result = -min(18.60 + (contract.wage - 2190.18) * 0.011, 60.94) +elif wage >= 1945.39 and wage <= 2190.18: + result = -min((wage - 1945.38) * 0.076, 18.60) +elif wage >= 2190.19 and wage <= 6038.82: + result = -min(18.60 + (wage - 2190.18) * 0.011, 60.94) else: result = -60.94 @@ -186,14 +187,15 @@ else: result = (((employee.marital=='married' and employee.spouse_fiscal_status=='with income')) and (employee.resident_bool!=True)) code -if contract.wage >= 0.01 and contract.wage <= 1095.09: +wage = categories.BASIC +if wage >= 0.01 and wage <= 1095.09: result = 0.0 -elif contract.wage >= 1095.10 and contract.wage <= 1945.38: +elif wage >= 1095.10 and wage <= 1945.38: result = -9.30 -elif contract.wage >= 1945.39 and contract.wage <= 2190.18: - result = -min(max((contract.wage - 1945.38) * 0.076, 9.30), 18.60) -elif contract.wage >= 2190.19 and contract.wage <= 6038.82: - result = -min(18.60 + (contract.wage - 2190.18) * 0.011, 51.64) +elif wage >= 1945.39 and wage <= 2190.18: + result = -min(max((wage - 1945.38) * 0.076, 9.30), 18.60) +elif wage >= 2190.19 and wage <= 6038.82: + result = -min(18.60 + (wage - 2190.18) * 0.011, 51.64) else: result = -51.64 @@ -635,7 +637,7 @@ result = -contract.car_atn holidays 20.0 0.0 - 30.0 + 35.0 Representation fees diff --git a/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py b/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py index 9174c408f64..e6d11322c6e 100644 --- a/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py +++ b/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py @@ -19,8 +19,8 @@ class HrContract(models.Model): public_transport_employee_amount = fields.Monetary('Paid by the employee (Monthly)') thirteen_month = fields.Monetary(compute='_compute_holidays_advantages', string='13th Month', help="Yearly gross amount the employee receives as 13th month bonus.") - double_holidays = fields.Monetary(compute='_compute_holidays_advantages', string='Double Holidays', - help="Yearly gross amount the employee receives as double holidays bonus.") + double_holidays = fields.Monetary(compute='_compute_holidays_advantages', string='Holiday Bonus', + help="Yearly gross amount the employee receives as holidays bonus.") warrant_value_employee = fields.Monetary(compute='_compute_warrants_cost', string="Warrant value for the employee") # Employer costs fields @@ -67,7 +67,7 @@ class HrContract(models.Model): help="Number of days of paid leaves the employee gets per year.") holidays_editable = fields.Boolean(string="Editable Leaves", default=True) holidays_compensation = fields.Monetary(compute='_compute_holidays_compensation', string="Holidays Compensation") - wage_with_holidays = fields.Monetary(compute='_compute_wage_with_holidays', sting="Wage update with holidays retenues") + wage_with_holidays = fields.Monetary(compute='_compute_wage_with_holidays', string="Wage update with holidays retenues") additional_net_amount = fields.Monetary(string="Net Supplements", help="Monthly net amount the employee receives.") retained_net_amount = fields.Monetary(sting="Net Retained", @@ -116,7 +116,7 @@ class HrContract(models.Model): contract.transport_employer_cost ) - @api.depends('yearly_cost_before_charges', 'social_security_contributions', + @api.depends('yearly_cost_before_charges', 'social_security_contributions', 'wage', 'social_security_contributions', 'double_holidays', 'warrants_cost', 'meal_voucher_paid_by_employer') def _compute_final_yearly_costs(self): for contract in self: diff --git a/addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml b/addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml index 0d6f6b7fde3..4e7d429f102 100644 --- a/addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml +++ b/addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml @@ -57,7 +57,7 @@ - + @@ -109,7 +109,7 @@ / year - +