Commit Graph
122547 Commits
Author SHA1 Message Date
lul-odoo a78d89d72a [IMP] hr_expense: Add demo data 2018-12-03 15:10:54 +01:00
lul-odoo 9eda75182e [IMP] hr_contract: Add demo data 2018-12-03 15:10:54 +01:00
Antony Lesuisse 0af56a4364 [IMP] base: default name for ir.actions.act_window
Take the name of the model if no name is set for an action

closes odoo/odoo#29027
2018-11-29 09:06:33 +00:00
David Beguin d82b3f143c [FIX] mail : remove blacklist from mail.channel.partner
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
2018-11-21 16:12:47 +00:00
Robot Odoo ce153c9ba6 [IMP] mrp: work orders planning
This PR introduce:
- State on kanban cards
- Do not allow a start date greater then a stop date.

The purpose and details are explain in each specific commit

Task ID -1838642
Pad - https://pad.odoo.com/p/r.68c799c9a80a18157eefebc39452f311

closes odoo/odoo#25103
2018-12-03 09:45:44 +01:00
Robot Odoo bdc9688d28 [MERGE] hr_payroll: Introduce hr.benefit model
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

closes odoo/odoo#29065
2018-11-30 13:27:01 +01:00
Yannick Tivisse d63b5599d9 [IMP] hr_payroll: Make benefit state editable on status bar 2018-11-30 11:08:20 +01:00
Yannick Tivisse 28a1b546e9 [IMP] hr_payroll: Improve payslip batch generation flow
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.
2018-11-30 11:08:20 +01:00
Yannick Tivisse 023e4e27fd [IMP] hr_payroll: Hide credit_note on payslip views
This field should be set by making a refund, it should be available
for an end user.
2018-11-30 11:08:20 +01:00
Yannick Tivisse f29d9dfe2e [IMP] hr_payroll: Put single payslips in a batch.
When creating a payslip, if no batch is defined for it, put it
automatically in a new batch.
2018-11-30 11:08:20 +01:00
Yannick Tivisse 9bab1ed2af [IMP] hr_payroll: Improve payslip creation/validation flow
Avoid to display the buttons on each stage (compute sheet, cancel, ...).

Now the next action is clear on the payslip.
2018-11-30 11:08:20 +01:00
Yannick Tivisse 3cc823a690 [IMP] hr_payroll: Make 'contract_id' related on worked_days/input lines
No need to display this information on every worked days/input lines

It makes no sense to have a different contract on different payslip lines
too.
2018-11-30 11:08:20 +01:00
Yannick Tivisse fbfd98a779 [IMP] hr_payroll: Group payslips by batch by default 2018-11-30 11:08:20 +01:00
Yannick Tivisse 9cd7dbe22d [IMP] hr_payroll: Remove 'Details By Salary Rules Category'
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.
2018-11-30 11:08:20 +01:00
Yannick Tivisse c7bbbd41c7 [IMP] hr_payroll: Remove hr.rule.input model
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.
2018-11-30 11:08:19 +01:00
lul-odoo 78128760c5 [IMP] hr_payroll: Add new models hr.benefit, hr.benefit.type
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
2018-11-30 11:08:19 +01:00
lul-odoo 5a9b8a41b6 [IMP] resource: Add domain parameter to compute attendace intervals
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
2018-11-30 11:08:19 +01:00
lul-odoo 07bec7db87 [FIX] hr_payroll_account: Remove journal_id: False in context
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.
2018-11-30 11:08:19 +01:00
Kirti Choudhary efb56976f4 [IMP] mrp: WO do not allow end date < start date
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
2018-11-30 09:28:29 +00:00
Géry Debongnie f6c104d2e5 [IMP] web: do not eval modifiers if not necessary
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.

closes odoo/odoo#29171
2018-11-30 08:53:31 +00:00
Kirti Choudhary 6cde9645ab [IMP] mrp: Display status of the WO on the kanban cards
The purpose is to help the operator to select easily an
order that is ready without using filter.

Related to task 1838642
Closes #25103
2018-11-30 06:30:24 +00:00
Kirti Choudhary ba9b5ce12b [IMP] stock: default responsible + activity responsible
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

closes odoo/odoo#29138
2018-11-30 06:18:27 +00:00
Arnold Moyaux 1c28ba8c47 [REF] delivery: hs code back in delivery
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.

closes odoo/odoo#29167
2018-11-30 06:10:21 +00:00
Christophe Simonis b6e94c3e4d [FIX] web: correct test definition
Oversight of previous forward-port
2018-11-29 20:55:58 +01:00
Christophe Simonis ce4cc24621 [MERGE] forward port branch 12.0 up to 82a1e1dcc3 2018-11-29 20:06:16 +01:00
Christophe Simonis 82a1e1dcc3 [FIX] hr_expense: adapt test to new demo data 2018-11-29 19:18:56 +01:00
Christophe Simonis f5c3dafb04 [MERGE] forward port branch saas-11.3 up to c0eef42711 2018-11-29 18:38:55 +01:00
Christophe Simonis c0eef42711 [MERGE] forward port branch 11.0 up to 962298c920 2018-11-29 16:13:28 +01:00
Xavier Morel 4d7aa97da3 [FIX] core: fixup of convert cleanup
_tag_delete was not properly converted when the _tag_ calling
convention was modified in 4d581e26c2,
so <delete> tags would all blow up if encountered.

closes odoo/odoo#29149
2018-11-29 13:46:14 +00:00
Hetashree Chauhan 9c793253d7 [IMP] purchase: create&edit for Payment Terms
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
2018-11-29 13:14:26 +00:00
Denis Ledoux 5644ab53ab [FIX] sale: improve team pipeline dashboard quotation counts performance
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.

closes odoo/odoo#29139
2018-11-29 11:46:22 +00:00
Denis Ledoux 9fbac5fcbb [IMP] crm: improve team pipeline dashboard leads/opps counts performance
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.
2018-11-29 11:46:22 +00:00
Nicolas Lempereur 8e7c255237 [FIX] *: fix % in translation not on transifex +da
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
2018-11-29 12:52:45 +00:00
Nicolas Lempereur cad04fa0ea [FIX] mail: have signature in chatter by default
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
2018-11-29 13:48:51 +00:00
jem-odoo 798b77bbd3 [FIX] sale_timesheet: missing onchange
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.

closes odoo/odoo#29140
2018-11-29 10:47:55 +00:00
Toufik Ben Jaa e8b5ef5b5e [FIX] purchase: crash on portal when no product image
- Since commit https://github.com/odoo/odoo/commit/8108a60dc38432243bef4f934784b119c77cf91d the purchase order crashes if a
  `purchase.order.line` product has no image.

  This is due to the fact that we pass a boolean value (False) to the
  function `image_data_uri` on the template `purchase.portal_my_purchase_order`
  which crashes.

closes odoo/odoo#29137
2018-11-29 11:24:16 +00:00
Olivier Dony 52a970bce3 [FIX] base: make demo install warning more prominent
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.

closes odoo/odoo#29128
2018-11-29 11:13:39 +00:00
Nicolas Lempereur 962298c920 [FIX] website: es_* translation typo
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
2018-11-29 10:43:45 +00:00
jem-odoo 3f8519f1a4 [FIX] hr_timesheet: project stat button on analytic account
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.

closes odoo/odoo#29131
2018-11-29 09:42:26 +00:00
Adrian Torres 758382b3a7 [REM] pycompat: remove python 2 shims and helpers
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.

closes odoo/odoo#28519
2018-11-29 09:28:17 +00:00
Adrian Torres 52f5528cfb [REF] *: replace deprecated pycompat helpers for builtins
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.
2018-11-29 09:28:17 +00:00
Adrian Torres e5c864a596 [REM] test_pylint: remove PY2/PY3 restrictions
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.
2018-11-29 09:24:26 +00:00
Mitali Patel d6abf593d7 [IMP] stock: displaying improvements
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: #1895297

closes odoo/odoo#27944
2018-11-29 08:46:13 +00:00
Gustavo Valverde 8de2025ac5 [FIX] l10n_do: multiple corrections
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

closes odoo/odoo#27172
2018-11-29 08:14:11 +00:00
len-odoo a48a4b1c0b [FIX] web_editor: remove embed video option when composing an email
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

closes odoo/odoo#28912
2018-11-29 07:58:40 +00:00
Robot Odoo 05d31187d4 [MERGE] account: Improve partner suggestion in the reconciliation widget
See commits for more details.

-task:
https://www.odoo.com/web#id=1909317&model=project.task&view_type=form&menu_id=
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#28758
2018-11-29 12:32:26 +01:00
Hetashree Chauhan a5f31c324b [FIX] sale: reload targeted value
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

closes odoo/odoo#29129
2018-11-29 09:08:50 +00:00
Robot Odoo 5a57420e48 [MERGE][FIX] portal, *: stop breaking behaviors on dblclick
* web, website, payment, website_sale

See sub-commits for details.

closes odoo/odoo#29001
2018-11-29 11:28:28 +01:00
Christophe Simonis 4ac0019bc2 [FIX] hr_expense: adapt test to new version 2018-11-28 18:20:09 +01:00
Christophe Simonis efe7ca16b7 [MERGE] forward port branch 11.0 up to bb6f6c57f9 2018-11-28 17:44:46 +01:00