Commit Graph
122570 Commits
Author SHA1 Message Date
qsm-odoo 78a30d44cf [REF] web_editor, web_unsplash: review load more feature
* Simplify the code
* Make the feature mork without unsplash
* Handle corner cases

task-1896705
2018-12-04 11:17:23 +00:00
Andrea Ulliana 1f847a1e2e [IMP] web_editor, *: improve media dialog
* web_unsplash, website_sale

- Visual improvements and cleaning in each tab: video, documents,
  pictogram, images.

- Only one search input for both the local library and unsplash.

- Replace the idea of multiple pages by adding a 'Load More' button.

task-1896705
2018-12-04 10:06:11 +00:00
Cedric Snauwaert 7d6a9924e5 [IMP] account: possibility to edit amount in reconciliation widget
Before we could only make a partial payment that was equal to the value of the statement line if the payment was greater than the statement line.
Now we can modify the value of any line (black line) used in the statement reconciliation widget. This allow to have the following:

Statement line of 500
Payment 1 of 500
Payment 2 of 500

We can reconcile the statement line with 250 from payment 1 and 250 from payment 2.

Task: 1870895

closes odoo/odoo#27805
2018-12-04 14:37:54 +00:00
mgh-odoo 82ffd8b55f [REF] stock: unlink 0 quant on stat button
Since v12, the unlink of 0 quants is delayed in the scheduler tasks for
performance reasons. When going through the stat button of the product
templates and product products to see the quants. the scheduler hasn't
run and the 0 quants are still present. As this is confusing for some
users, we run the quants unlink and merge at these times

- product.template -> On hand
- product.product -> Om hand
- stock.production.lot -> locate

Task: 1913642

m

closes odoo/odoo#29132
2018-12-04 11:29:55 +00:00
Robot Odoo e8ac4d7996 [MERGE] lunch, lunch_hr: automatize lunch flow
We would like to automatize lunch as currently all orders are manually ordered and validated, and a cash move has to be manually created each time you want to credit the wallet of some user.

In this commit we add a new widget that comes with the kanban view and will allow to take orders in a friendly manner.
We also add a lunch.supplier model and an integration with the hr module in order to filter what products you can order depending on your working location, this also allows you to configure an automatic ordering via email.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#28442
2018-12-04 15:40:50 +01:00
RomainLibert f727b8f0b5 [IMP] lunch: automatize lunch orders
We would like to automatize lunch as currently all orders are manually ordered and validated,
and a cash move has to be manually created each time you want to credit the wallet of some user.

In this commit we add a new widget that comes with the kanban view and will allow to take orders
in a friendly manner.

We also add a lunch.supplier model and an integration with the hr module in order to filter what
products you can order depending on your working location, this also allows you to configure an
automatic ordering via email.

TaskID: 1856876
2018-12-04 11:56:21 +01:00
RomainLibert ad99f09a06 [REF] lunch: split lunch.py into smaller files
We should basically have one model per file, as this will facilitate the
reading and maintenance of the code
2018-12-04 11:55:07 +01:00
arbaes 04ccd15b70 [IMP] mrp: quantity_done on kits in immediate transfers
With this commit, when a kit is processed trough an immediate transfer,
the quantity done set on the kit is now propagated to its components.

TaskID: 1896772

closes odoo/odoo#28998
2018-12-04 10:51:32 +00:00
Robot Odoo a2c5b44df8 [MERGE] barcodes, event, stock: nomenclature settings
We don't want to bloat the company settings with the choice of the barcode nomenclature. We move this settings to event_barcode and stock_barcodes.

task id 1903864

closes odoo/odoo#28346
2018-12-04 05:46:22 +01:00
Robot Odoo 18efcc2eb4 [IMP] hr_*, lunch, pos, pos_restaurant: Improve demo data
Add and improve demo data

Task #1870050

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#28963
2018-12-03 18:01:02 +01:00
lul-odoo f598c3e597 [IMP] base,stock: Improve company demo data
On test fixes: Because the company now have parenthesis in its name,
formatting email addresses adds double quotes around the name.
e.g.: "My Company (San Francisco)" <example@exmaple.com>
2018-12-03 16:12:27 +01:00
lul-odoo 6cf81abad8 [IMP] lunch: Improve demo data 2018-12-03 16:12:27 +01:00
lul-odoo cbc24cfa8e [IMP] point_of_sale,pos_restaurant: Improve demo data 2018-12-03 16:12:27 +01:00
lul-odoo bf4d76b390 [IMP] l10n_be_hr_payroll_account: Add demo data 2018-12-03 16:12:27 +01:00
lul-odoo 725ec4c8d5 [IMP] hr_recruitment: Add demo data 2018-12-03 16:12:27 +01:00
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
Nimesh Jethva 6afa3578e1 [REF] stock: visibility of the scrap button/moves
* do not display the scrap button in receipt (we don't want to allow
products not coming from your stock)
* no scrap button when any picking is done
* don't display the scrap moves, the user needs to go to the stat button

Task ID 1913275

closes odoo/odoo#29097
2018-12-03 13:09:36 +00:00
Robot Odoo a4cbfbec4e [MERGE] stock_account: remove property_cost_method and property_valuation
The fields property_cost_method ad property_valuation are never shown on the products but they sometimes are set. This creates confusion and some difficulties in the migration (the cost method/valuation on the products are different than the one set on the categories).

We remove them and only use the one on the categories.

Task: 1866333

closes odoo/odoo#26008
2018-12-03 14:05:52 +01:00
Kinjal Mehta 8f22263235 [ADD] event, stock: Add a company dependent setting in event and stock settings. 2018-12-03 16:38:15 +05:30
Kinjal Mehta d6d5e95920 [ADD] event, stock: Add a company dependent setting icon in event and stock settings. 2018-12-03 16:38:15 +05:30
Kinjal Mehta aa9b02304e [REM] barcodes: Remove the field nomenclature_id from the res.company form view. 2018-12-03 16:38:14 +05:30
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
Pratima Gupta 9c2a6850d8 [IMP]stock_account: Test case changes.
property_cost_method is removed from product.product and product.template.
And use property_cost_method of product.category everywhare.

In This -
Used property_cost_method of product.category instead of cost_method or property_cost_method of product.template.

This commit is related to task#1866333.
2018-11-30 16:08:17 +05:30
Pratima Gupta 493502bc4a [IMP]stock_account: property_cost_method is removed from
product.product and product.template.

And use property_cost_method of product.category everywhare.

In This -
Used property_cost_method of product.category instead of cost_method or property_cost_method of product.template.

This commit is related to task#1866333.
2018-11-30 16:08:16 +05:30
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
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 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