Blacklist was added to mail.channel.partner in order to avoid sending
mail notification for a channel in send mail mode if the partner was
blacklisted.
But as everythin is done using directly the res partner model, this
inheritance is completelly useless.
Moreover, since introduction of mail.address.mixin with email_normalization
(inherited by blacklist.mixin), the partner_email cannot be normalized as it
is a non stored related field. The computation of email_normalized will
fail.
Task ID : 1911716
Closes PR #28922
Purpose
=======
For payroll purpose, we need to manage attendances.
For instance, someone is working only mondays, tuesdays and fridays, but works exceptionally an other day.
It must be recorded.
Specification
===========
The new models are used to represent attendances, extra hours and leaves (as `hr.benefit`s) in a new window called "Benefits".
The schedule of employees for the full month is visible in that view (calendar view).
First the benefits needs to be generated (via a button) based on the calendar attendances and leaves.
The manager can then check benefits, delete or add some. Only the benefit name and type can be edited (not start and end dates).
Once benefits are correct, they can be validated. Validation will fail if they are some leaves to approve or if some benefits overlap on the same day.
Benefits cannot be deleted or edited once validated.
When benefits are all validated, a button appears to generate payslips.
Additional development
==================
Most of the time we don't what is the next action that should be done when creating payslips or payslip batches.
- Improve the layout, the buttons of the payroll object.
- Refactor a little the code to reuse existing chunks of code instead of reinventing the wheel in several methods.
- Remove the hr.rule.input model.
- Remove an useless report.
See each individual commit for more information.
TaskID: 1912944, 1903239
closesodoo/odoo#29065
Same than for payslips. Improve the flow to make it clear what is the next action
instead of displaying all the buttons.
And refactor a little the code to be more efficient, and reuse existing method instead
of using this horrible 'onchange_employee_id' method.
This field brings nothing more than the payslip lines.
Btw the term is badly chosen, it doesn't display the lines by salary rules category,
it displays the payslip lines that have a category.
The printed report is not very useful too. The only interesting part is the
contribution register at the end of the report, and there is already a dedicated
report for that.
There are currently 2 models:
- hr.rule.input to link some inputs to an hr.payslip.rule
- hr.payslip.input to add some additional inputs on a payslip.
The first model is actually there to automatically add inputs on the
additional inputs on the payslip. This is problematic because these
rules are always added (For example a salary reduction due to a
police fine). As these inputs are always added on the payslip, the
the related rules are always computed with an amount of 0.
We decided to remove this mechanism for the following reasons:
- If the rule is important and common, then define the needed values on
the contract, and compute the rules from that.
- If the rule is not so important, it should be added manually when needed.
Purpose
=======
For payroll purpose, we need to manage attendances.
For instance, someone is working only mondays, tuesdays and fridays, but works exceptionally an other day.
It must be recorded.
Specification
=============
The new models are used to represent attendances, extra hours and leaves (as `hr.benefit`s) in a new window called "Benefits".
The schedule of employees for the full month is visible in that view (calendar view).
First the benefits needs to be generated (via a button) based on the calendar attendances and leaves.
The manager can then check benefits, delete or add some. Only the benefit name and type can be edited (not start and end dates).
Once benefits are correct, they can be validated. Validation will fail if they are some leaves to approve or if some benefits overlap on the same day.
Benefits cannot be deleted or edited once validated.
When benefits are all validated, a button appears to generate payslips.
Closes#28261
Purpose
=======
More flexibility is useful when using the _attendance_intervals method (resource.calendar) in other modules when inheriting resource.calendar
Specification
=============
The commit adds a `domain` parameter to the _attendance_intervals method in resource.calendar, allowing
to better control attendances from which to compute intervals.
+ small refactoring: extraction of duplicated code in method
If the wizard to generate payslip was launched without an ´active_id´ in the context.
A ´journal_id´ entry was set to False in the context later leading to a crash at payslip creation.
The crash happens because, at creation time, the journal_id of a ´hr.payslip´ is set to the journal_id
in the context if its present. Since this context entry is False and the journal_id field is required,
creation crashes.
It does not make sense to finish something before starting it.
Do not allow to write on a done WO except for time log.
Related to task 1838642
Closes#25103
Before this commit, the web client evaluated all modifiers
(readonly/invisible/required) in some cases, even if it only needed one
of them. This is clearly not optimal, and I even suppose that for large o2m,
it could even have a noticeable effect on web client perceived speed
This commit simply make sure that we evaluate only what we need in those
cases. Note that it is not really a testable improvement, hence the
lack of tests.
closesodoo/odoo#29171
Traceback when the responsible is not set on an activity
since it's a required field. In this case we will use the
odoo system responsible for the activity.
Also reintroduce the default value for the responsible as
the user that create the product. The purpose is to avoid
to log all the activity for the odoo system but to dispatch
the exception between user, if a user create the product he
will probably be responsible for it. It is always possible
to remove the responsible or to modify it.
Task ID - 1913168
closesodoo/odoo#29138
hs code was dropped in 12.0 however it shouldn't have been (commit 2d738f8563). commit 498dbc548b created a new module in order to avoid losing hscode for existing database during migration.
This commit set it back as before.
closesodoo/odoo#29167
_tag_delete was not properly converted when the _tag_ calling
convention was modified in 4d581e26c2,
so <delete> tags would all blow up if encountered.
closesodoo/odoo#29149
If a user is at the same time purchase user and billing manager
he can't create a new payment terms from the PO and he has to
navigates throws multiple menus instead of just using the create
and edit function.
taskId 1868555
Closes#28280
Doing the `read_group` on `sale.order` rather than
`sale.report` to get the quotations amount and count
significantly improve the performance (5x faster on big databases).
This is because `sale.report` is a view,
with a bunch of fields taking time to compute / fetch.
Besides, the algorithm to get the number of quotations
was an heuristic based on the "group by name" on the `sale.report`,
which was not as precise,
as multiple quotations could potentially have the same name,
and slowed down the query,
because it returned one line per quotation,
versus one line per team with this revision.
closesodoo/odoo#29139
The team pipeline dashboard fields
`unassigned_leads_count`, `opportunities_count`, `opportunities_amount`
do a big search on leads, filtered
by type (lead/opp), team, and unassigned user_id (salesman)
Adding an index on user_id, team_id, type significantly
improves the filtering, and therefore the dashboard rendering,
especially when displaying a few teams only
e.g; the teams you are part or responsible of.
The index on `user_id` is removed,
as it become a duplicate as `user_id` is the first column
of this new index.
Fix issue of %s or %(name)s present in source but not in translation
in language not available on transifex.com/odoo/
Also correct a account danish (da) translation that was reported to be
an issue.
closes#29100
The signature is shown by default when sending a mail and in particular
case it is not shown.
In c8d283a592 there was a small regression that in some instance the
signature that was shown before is not shown anymore. This is because
the default in those instance is to not show signature.
eg. a message sent in a chatter would not have signature in sent emails
With this commit, the previous behavior is reintroduced.
opw-1903001
opw-1896262
closes#29088
The onchange is defined on the projduct.template, but the user
can edit the product configuration from a SO: it will be the
form view of product.product.
This commit applies the onchange of the product template
on the product product.
closesodoo/odoo#29140
Users may not notice the warning and carry the risk of irreversibly
damaging their production database. Making the warning message more
frightening should help avoid this.
closesodoo/odoo#29128
The translation had wrongly `</ i>` which from a report broke some
initialization of some snippet of the website editor.
es_CO, es_DO, es_EC languages are not available in transifex so this
change is done manually for them.
opw-1907752
closes#29135
Before this commit, when more than 1 projects are linked to
a same analytic account, clicking on the stat button from the
form view of analytic account, nothing happens.
This commit fixes this case by displaying the kanban view
of all the project linked to this analytic account.
closesodoo/odoo#29131
Odoo no longer supports python 2, thus some of these helpers can and
have been replaced by python 3 built-ins, therefore there is no need for
them to stay defined.
The removed helpers are:
* izip, imap and ifilter
* unichr, text_type
* implements_to_string, implements_iterator
* string_types, integer_types
* to_native
The python 2 shims have also been removed, and only the python 3 helpers
have been kept, because they can still be usable (i.e. accepting
both bytes and str for functions that can only accept one of the two)
[REM] pyjsparser: remove PY3 shims
They're no longer necessary as Odoo doesn't officially support python 2
anymore.
closesodoo/odoo#28519
This commit replaces calls to pycompat helpers that were intended for
python 2 <-> python 3 interoperability for python 3 builtins, as python
2 is no longer officially supported by Odoo.
This includes:
* calls to imap/izip/ifilter replaced by map/zip/filter
* uses of text_type replaced by str
* uses of unichr replaced by chr
* calls to implements_to_string, implements_iterator removed
* string_types and integer_types replaced by str, int respectively
* calls to to_native replaced by calls to to_text
This is done in preparation to the removal of these deprecated helpers
in the following commit.
Since Odoo no longer officially supports python 2, some of the
restrictions previously imposed by test_pylint are no longer necessary,
either because the usage of some builtin functions is legal (zip, map,
filter) or because the concerned function/module would already raise a
relevant error under python 3.
On some models, like picking, package and move, the weight was hardcoded
in 'kg', we instead use the value in the ir.config.parameter.
We also changed some field labels to give them more meaning.
Related Task ID: #1895297closesodoo/odoo#27944
1. Update tax Groups with N07-2018
Restrict Tax groups just to the 5 available in Norma 07-2018:
* ITBIS
* ISR
* ISC
* Propina
* Otros Impuestos
2. Do not use 'none' to hide taxes
This affect taxes reports, as those reports evaluate the
type_tax_use field
3. Rename Taxes and Description for N07-2018
4. Change group taxes name and missing childrens
5. Add account groups to template and CoA
6. Add various missing data
opw-1912626
closesodoo/odoo#27172
Embedding a video can't work because it embeds an iframe, which is not supported
by most email clients for security reasons.
(What happens when Gmail shows embedded videos in displayed emails, is that you
send a link in the email body, and it is at rendering that Gmail adds the iframe
into the page.)
In true bugfix fashion, we hide the button.
When the "res_model" is "mail.compose.message", we generate a widget with the
noVideo option.
Essentially a foward-port of v11 commit: 264f89f63f
opw 1905497
closesodoo/odoo#28912
Before this commit:
when user set any target invoicing value he/she needs to refresh the
page.
After this commit:
As soon as user set the target invoice value it shows on the dashboard,
no need to refresh the page.
This commit is related to master bug
opw-1902250
closesodoo/odoo#29129