Daily updates from Odoo
Wednesday, June 12, 2019
10 changes · master
Enhancements to existing features
Activity feedback in Mail now preserves line breaks, making longer comments easier to read and understand. This improves usability when users provide detailed updates or notes on activities.
Original PR description
Description of the issue/feature this PR addresses: - Related task: https://www.odoo.com/web?#id=1965831&model=project.task&view_type=form&menu_id=4720 - Pad: https://pad.odoo.com/p/r.2d8fb4da8007444b69afeee65eb0ea39 Current behavior before PR: Desired behavior after PR is merged:
This change makes it easier to customize how delivery and procurement groups are created for individual sales order lines. Businesses with tailored delivery flows can support different handling rules per line without duplicating shared setup information.
Original PR description
Description of the issue/feature this PR addresses: Better inheritable _action_launch_procurement_rule method Current behavior before PR: Procurement group always get from sale order Desired behavior after PR is merged: New helper method to extend cc @Tecnativa @amoyaux ready for review, thanks. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The settings page now displays the “buy credits” link aligned to the left. This small visual adjustment makes the link placement more consistent and easier to find for users managing IAP credits.
Original PR description
In the settings, align the link 'buy credits' to the left. Task-ID: 2007611
Expense report forms now limit the expense selection dialog to expenses for the same employee as the report. This reduces confusion and helps users pick the correct expenses faster when creating or editing reports.
Original PR description
When creating or editing an expense report, we have to select the corresponding expenses. Since it is constrained that these expenses belong to the same employee as the one from the report, it is not practical to see other expenses in the dialog when adding them. This commit extend the domai of the field in the expense report form so that it doesn't show expenses from other employees. task #1999537 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Live Chat now shows a known customer's country alongside their name in the chat window. This helps operators quickly understand where the customer is from without opening the customer record separately.
Original PR description
Task Link: https://www.odoo.com/web#id=1940407&action=333&active_id=131&model=project.task&view_type=form&menu_id=4720 Pad Link: https://pad.odoo.com/p/r.9d900ba808bb10c651981946a52c50de -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Payroll accounting is improved so validated payslips can be grouped into a single accounting entry and payroll payment files can be generated more easily. Belgian payroll configuration is also expanded with the needed accounts, journal setup, and salary rule accounting links, while employee bank details are hidden until a related private address is set.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Website customization changes now refresh only the needed style links instead of reloading unnecessary page assets. This makes the customize dialog more efficient and supports cleaner maintenance by removing reliance on an outdated internal method.
Original PR description
* base Before this commit, if an option was customized thanks to the customize dialog, the page was not reloaded, only the new scss `<link/>` elements were retrieved and replaced in the DOM. There were two problems with this: - The `<script/>` and `<style/>` tags were also retrieved for no reason (as the whole result of t-call-assets was returned) - This made use of a deprecated ir.qweb method that we want to remove (see https://github.com/odoo/odoo/pull/33432) This commit removes the use of the deprecated method by improving the system: only the `<link/>`'s new URLs are returned on customization.
Payslip calculations now use generated work entries directly instead of recalculating the same information from employee calendars. This reduces duplicate processing, avoids calendar-related timezone issues, and automatically fills in missing work entries when payslips are created.
Original PR description
Description of the issue/feature this PR addresses: In payslip, generated work entry must be used. Current behavior before PR: Each time that work entry are modified, calendar is modified to stay consistent. And when we want to generated a payslip, we use calendar to generate worked days lines. So we make twice the same computation from calendar: once to generate work entries and once to generate payslips. Desired behavior after PR is merged: We generate work entries and then we can use this work entries to generate payslips. If we generate a payslip and no work entries was previously generated, it will automatically generate work entries (with maximum future the end of the month). On each contract, we save two dates: the generated_from and generated_to. Each time we want to generate new work entries, we will check already generated part, and just generate missing interval. If there is a gap in generated interval, it will be also generated. id=2001623
Payroll rules can now use dated parameter values instead of hard-coded amounts, so yearly legal or policy changes can be entered in advance and automatically applied when valid. This helps keep payroll calculations current without requiring code deployments for each value change, with Belgian payroll data updated to use the new approach.
Original PR description
Purpose ======= Many values in payroll formulas change every year. Currently, many of these values are hard coded. A change requires the code to be updated, released, then deployed on every server…
Purpose ======= Many values in payroll formulas change every year. Currently, many of these values are hard coded. A change requires the code to be updated, released, then deployed on every server instance for changes to take effect. This leads to formulas that are often out of date. Specification ============= Introduce a versioning mechanism for values used in payroll formulas. The mechanism should allow to encode a new value in advance. The new value should be automatically used when it enters into force. Two new models are introduced: ------------------------------ Each parameter is identified by a unique code. The code is used to retrieve its value (optionaly at a particuar date). A parameter can have several values (aka versions). Each version is defined by an implementation date. The value is not valid before this date and remains valid until the next value with a more recent date. The system allows to request a parameter value at a particular date. How to use? ----------- To retrieve a parameter value at a particular date, use `self.env['hr.rule.parameter']._get_parameter_from_code(code, date)`. The date is optional and set to today by default. In a salary rule, you can directly use `payslip.rule_parameter(code)`. The version valid at the payslip end date is automatically chosen. #### *Note for computed fields* This mechanism should not be used in stored computed fields! A new parameter version can be created at any time and we can't predict when the field is recomputed. Hence there is no garantee that the field is up to date. Moreover, because Odoo computes stored computed fields before loading data, the computation will crash for existing records if it's using a parameter defined in the same module which defines the field (the parameter does not exist yet). For non stored computed fields, the version date is always today because there are no such concept of field "computed at <date>" BE Data ======= CO2 reference: https://finances.belgium.be/sites/default/files/downloads/121-faq-voitures-de-societe-2019-version17.pdf Cotisation spéciale: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/special_contributions/companycar.html Précompte professionel 2018: https://finances.belgium.be/sites/default/files/downloads/700-formule-cle-20180101.pdf Précompte professionel 2019: https://finances.belgium.be/sites/default/files/downloads/700-formule-cle-20190101.pdf Work bonus: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/deductions/workers_reductions/workbonus.html
Payroll batches can now create one grouped accounting entry and generate SEPA bank payment files directly from payslips. This reduces manual accounting work, simplifies payroll payment processing, and adds accounting configuration for payroll rules and journals.
Original PR description
Purpose ======= From a busines point of view Integration with accounting. A period of pay include journal entries and payments. We need to generate both from a batch. The entries must be grouped - 1…
Purpose
=======
From a busines point of view
Integration with accounting. A period of pay include journal entries and
payments. We need to generate both from a batch.
The entries must be grouped
- 1 line for salaries
- 1 line for all ATN
- ...
Payroll generate a Sepa document to send to the bank
+ as this part is managed by an accountant add menu entries in the
accounting app.
From a functional point of view:
Debit and credit accounts are defined on the rules (hr.salary.rule)
The journal should be defined on the structure to be foced
Specification
=============
- Usability: the module l10n_be_hr_payroll Should install the accounting
(right now it install invoicing). On the structure, add a journal m2o.
- On rule: add group accouting items on salary rule
- Improve method 'action_payslip_done' to support multiple entries by move.
Generate only one big entry with all payslip. Generate one total line total
for reconciable if group is set.
Now the payslips are no longer calculated individually,
all accounting entries are grouped together when the pay slips are
validated.
This allows you to have a single accounting entry for all validated
payroll records.
- Buttons on batch
- Add 2 buttons on the batch form
- "Create Entry": it will generate a grouped entries according config of
the rule
- "Payment": it generate an xml with all line to send to the bank
See https://www.odoo.com/documentation/user/11.0/accounting/receivables/customer_payments/payment_sepa.html
- Payroll directly generate the xml (no payments in accounting)
- Button on payslips: Everything should be done through the payslips
- create draft entry
- Create SEPA payment xml
- Make appear those buttons on the form only if batch is not set
- Belgian rules for the entries:
- In data for Belgium: https://docs.google.com/spreadsheets/d/1HlnwoExR_O833sij01p7UizSkrMqcm6oF4GvOeIz5lg/edit#gid=0
example of one of our OD: https://drive.google.com/file/d/0B_hhLmdks1wEdXZSQzJIeVBDOXNiNVctczJzUTBQZVBuNkgw/view?usp=sharing
- Create a Journal salaries (type miscelaneous) and apply all structure on
this journal
- Create new accounts to manage this.
- Sepa for payroll should be an option in the setting of payroll
(like in accounting)
- Configure the accounts on the rules when setting a CoA on a company.
Now the payslips are no longer calculated individually,
all accounting entries are grouped together when the pay slips are
validated.
This allows you to have a single accounting entry for all validated
payroll records.
Other notable point in this commit:
- When installing the Belgian Localisation or when installing the
Belgian CoA on a company, configure the accounting data (journal,
accounts on the salary rules)
- Don't create automatically a payslip batch when creating a payslip
TaskID: 1935200