Commit Graph
116681 Commits
Author SHA1 Message Date
Jeremy Kersten bae90d81df [IMP] website_forum: fix some plurialize translation 2018-04-09 21:28:00 +02:00
Jeremy Kersten fedff9b650 [IMP] website_sale: checkout - small changes from PO review
Rename zoom option
Now, enable Automatic Zoom without zoom will work.
Merge 2 zooms into same separator.
Add / Remove margin-padding...
2018-04-09 21:28:00 +02:00
Thibault Delavallée f86f8e488e [FIX] hr_holidays: wrong inheritance and security issue
Commit 565ab7a2e4 added a bypass to message subscription because some auto
subscription is done without the right to edit the record. However there
are two issues with this commit

 * message_subscribe API changed and code tried to pass now removed parameters;
 * sudo-ing without checking any access rights before is a security issue;

This commit fixes the call and add an access right on read. As few people
(mostly HR officers and managers) can read a leave request it solves the
issue of auto subscription while a better solution is found.
2018-04-09 18:19:54 +02:00
RomainLibert 565ab7a2e4 [FIX] hr_holidays: allow edition of validated leaves
Due to a record rule, it is not possible to add a follower to a
validated leave, as we should be able to do it, we subscribe through
sudo.
2018-04-09 17:50:59 +02:00
RomainLibert c1530f219b [IMP] hr_holidays: improves access rights of manager/officer
We need to have a clear distinction between holidays managers and
holidays officers.
For this a number of improvements have been done in hr_holidays.
For more informations about the changes see the docstrings of hr.leave
and hr.leave.allocation.

Task #34222
Closes #19270
2018-04-09 17:49:51 +02:00
Thibault Delavallée 4403e6999f [IMP] test_mail: set a margin on some mail-related performance tests
Query count for some mail tests is not always the same for a given test.
This leads notably to runbot being randomly red although there is no real
error. This commit lessen the issue of having red runbot or wrongly
incremented tests by using the recently-introduced margin parameter on
performance tests.

Some work is still ongoing to find why some tests are not completely
reproducible. In the meantime let us have some warnings instead of errors.

Manual forward-port and improvement of 81a0852077.
2018-04-09 17:28:03 +02:00
Thibault Delavallée a03f8da8e4 [IMP] tests: allow to add a margin on performance tests
Purpose of this commit is to avoid errors for some performance tests that
have a slightly variable number of queries. Indeed some tests in test_mail
module vary of 1 or 2 queries due to a behavior still not found that does
not seem deterministic.

This should not be considered as a real error, but should not be considered
as completely valid. This is why a margin is accepted in some tests that
will raise a warning instead of an error. This warning tells people to
check if they have increased the query counter or if it is due to a random
effect in query count.

This is a manual forward-port of saas-11.2 commit 3fe0ee5ae6 .
2018-04-09 17:28:03 +02:00
XavierDo 6c381a3a16 [IMP] im_livechat, mail: replace emoji with unicode.
Remove the support to replace emojis by images. Most browser
now support colored emoji or at least black and white emojis.
The emojis list have been updated to ensure a correct support
for most os/browser.
Users have the possibility to install fonts localy if their os does not
have one of the default emoji font installed.
After default os emoji font, one of twemoji, emojione or noto color
will be selected.
The emoji list is now hardcoded in js in order to reduce the number of
records in shortcodes.

Also include a small fix for livechat to display message field when rating
is bad.

Task #36898
PR #23689
2018-04-09 17:19:29 +02:00
Sanjay Jamod bd9398e24b [IMP] mrp_bom_cost: Improve layout
remove shift between set price and bom cost

task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod ca45e889a3 [IMP] product: Standard Price on product list view
task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod 030f454fab [FIX] mrp: Display correct BoM count on state button
- Display correct bom count for product, before this commit it was
 not displaying the bom count when we have bom for template without variant.

task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod 49af604c20 [IMP] mrp_bom_cost: TestCase for Compute Price from BoM
- Tested the flow and verify computation made in hierarchical order
- Tested with different Unit of Measurements
- Tested with 3 level of componets and sub-componets
- Tested with Work Operations
- Tested with Inventory Valuation

task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod 87f6c16dcf [IMP] mrp_bom_cost: Compute price from BoM
Purpose
=======
Compute cost of product(s) based on it's BoM

Specification
=============
real_time: not with FIFO otherwise open the
wizard with the bom price as default new value

periodic: directly set the cost on the form view

Add a server action in order to directly set the price
on selected product.
When getting price from a bom with a sub-bom it will take the
cost of the sub bom except if the sub-bom is set with the bom
itself in the server action (in this case the sub bom cost will
be used).

Capacity is not used for this functionality

task-39561
2018-04-09 15:39:19 +02:00
Sanjay Jamod 8f268469d5 [IMP] product_extended: Rename module product_extended -> mrp_bom_cost
task-39561
2018-04-09 15:39:19 +02:00
Thibault Delavallée 82f88bfa71 [MERGE][REF] mail, note: move reminder feature from mail to note
Purpose of this merge is to link reminders to notes. The whole feature is
therefore moved to node module that extends activities and systray.
See sub-commits for more details.

This merge is related to task ID 1833628. Closes #24129.
2018-04-09 15:10:46 +02:00
Akash Bhavsar afacf3a348 [IMP] website_blog: Add category to blog tags, Archives collapsed
This commit allow to sort blog tag by category.

And display archives by default folded to avoid
5 years x 12 months => 65 list items open

Task-34417
2018-04-09 14:57:13 +02:00
Alexandre Kühn d7bc291b6a [FIX] im_livechat: missing resource in external lib
Before this commit, the livechat button was not visible at all.
This is due to missing resources in the external lib of livechat.

Task: 1834875
2018-04-09 14:48:24 +02:00
Dharmang Soni 807c4c3f5e [REF] mail, note: move reminder feature from mail to note
This commit refactors f488dc58c3 that added reminder feature in activities.
After merging it was suggested specifications were not correct and it has
been decided to move the whole reminder feature in note.

Reminders are now notes instead of activities. Now when having note appµ
systray proposes to create a note / reminder. A note.note record is created
with info given by the user. If a date is given in the systray quick create
then an activity is scheduled on this note.

This means user can create records in activity systray that are not
activities but notes used as reminders. Those will use the first availableµ
note column for the user.

As reminders are now notes the support of activities not linked to any
document is removed, as well as archiving activities and tests linked to
that behavior.

This commit has been not carefully tested nor in-depth reviewied. It is
considered as too important for the upcoming freeze. This closes task ID
1833628. Closes #24129 . Many thanks to @dpr-odoo for its quick development
and good work on this task.
2018-04-09 14:35:06 +02:00
Dharmang Soni c56491b11b [IMP] note: pimp note form view
Purpose is to maximize size of editor to focus more on the note content
edition.
2018-04-09 14:18:15 +02:00
Dharmang Soni 77822180de [IMP] note: update summary of application
Indeed notes will soon be more about todo-list and reminders.
2018-04-09 14:17:24 +02:00
Dharmang Soni 75dd065eaa [IMP] note: update note default columns
Purpose is to have first column holding all todos and reminders. We then
add a few columns for today / tomorrow / later to help people organize
themselves.
2018-04-09 14:16:50 +02:00
Prakash Prajapati 92735de68d [IMP] product: product view change the group string
Rename 'Purchase Bill' into 'Vendor Bills' to be consistent with the
labels of module purchase.

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 5b12cac294 [IMP] stock: picking view completion date and filters
- We show the completion date of a picking when it's done
- We add the filter that show canceled picking
- We remove the filter that show confirmed picking as it doesn't exist
  anymore

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati f6d7b33d50 [IMP] stock: Lot/SN warning message improved
TASK-38741
2018-04-09 11:23:59 +02:00
Pierre Masereel 298327dc53 [IMP] stock: warehouse order point improvement
- Set groups on group by and filters

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 9473b94093 [FIX] stock: fixed width for responsible field on batch picking
TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 9046b9fa55 [IMP] stock_account: No create button in product valuation tree view
TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati ccafe50500 [IMP] product_expiry, stock, delivery: Delivery slip report improvement
- Delivery slip of a picking not done will show the initial demands
- Delivery slip of a picking done will show details of what have been processed
- Remove the shipment backorder message
- Remove the Weight and show the Shipping Weight

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 9a65dda391 [IMP] stock: Picking operation report improvements
- Remove the commitment date
- Remove 'Origin' term in picking report
- Add report header below barcode
- Arrange fields space
- Change fields sequence

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati 4dfea20569 [IMP] purchase: rename labels
TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati da9cc5cc7a [IMP] mrp: manufacturing order list view origin field
We always show the origin field in the tree view of manufacturing orders

TASK-38741
2018-04-09 11:23:59 +02:00
Prakash Prajapati f00c451f38 [IMP] mrp: production report improvements
- Remove 'Production Order #'
- Don't diplay source field if empty
- Change subtittle
- If MO not done, only shown reserved products
- If MO done, show what has been really consumed
- Show product barcode
- Show reserved product location
- Show reserved product tracking data

TASK-38741
2018-04-09 11:23:59 +02:00
jem-odoo e0ed50a724 [IMP] uom: unique reference UoM per category
Users can configure multiple references in a same
category. This might cause problems during conversion
and does not make sense.
Since this is a "late" constraint, we define it in
python to avoid conflict with existing data.
We allow user to have multiple unactive reference, but
force to have exactly one active. So when a new UoM
category is created, user have to encode the reference
unit first, and then the bigger/smaller ones.

This commit also update stock tests, since they were
redefining new reference UoM in the same category, and
finally, this commit provides some tests for this
uniqueness and custom UoM behavior.

Task #1820076
2018-04-09 10:13:18 +02:00
jem-odoo 2d32ff4bb8 [IMP] uom: measurement type on category
In order to restrict some uom field to some uom category, it is required to
add a measurement type on uom.category. Also, this will lessen the use of
master data.

Some technical justifications:
- measure_type is not required, to allow people creating their own
uom.category. Those ones will not interfere with addons business.
- measure_type is unique: we restrict to only one category containing
time, weight, ... in order to avoid mismatch category during conversion.
(2 different weight categories can not be converted).
- measure_type on uom.uom is stored: to allow search and domain on
field, we need to store it. Usually, UoM are not updated every day,
and the number of uom in a database is not that important.

To illustrate this mecanism, a domain is added on
'project_time_mode_id', in project module. This field
is use as timesheet default uom, and we obviously want to
restrict it to time category (timesheeting in liter does
not make sense ...)

Task #1820076
2018-04-09 10:13:06 +02:00
Martin Trigaux c71ce46b0e [FIX] hw_*: do not install the posbox modules
These modules are currently made to run with an odoo 8.0 server.
They are given as-it on the odoo repository but are intended to be run on the
posbox and not supported on a classic server.
2018-04-09 09:26:59 +02:00
Adrian Torres dc9525c3f0 Revert "[IMP] mail: check if template can be rendered on write (#20834)"
This reverts commit a094095ef3.

Context problems, see PR #20834
2018-04-09 08:12:27 +02:00
Hiral Bhavsar 9201f92a4f [IMP] mrp: add new bom and cost report
Add a new report in order to display:
- bom structure and cost
- bom structure
- bom cost
The user is allowed to print multiple bom reports at once.
Print the report dynamically depending what have been unfolded.

In html the rendering is lazy, when unfolding the client make a request
to the server in order to get the html that will be append to the DOM.

For the pdf the kwargs unfolded could be used in order to render everything
at once.

With the help of:
Dhaval Suthar <dut@odoo.com>
Jigar Patel <jat@openerp.com>

task-36741
2018-04-06 17:05:14 +02:00
Jigar Patel 5a22b79af5 [IMP] mrp: add cost by hour on workcenter
Move it from enterprise to community since it will
be used for bom structure report and set bom_cost on product
cost functionalities.
2018-04-06 17:05:14 +02:00
Arnold Moyaux 157459877e [IMP] stock: improve generic stock controller
Include set_html in the deferred of start
2018-04-06 17:05:14 +02:00
Arnold Moyaux f384db9b67 [IMP] base, web: define landscape in report template
Since report refactoring the function to override is get_report_values
that only returns a dict of value that are used in rendering.
In order to render a pdf with a landscape orientation, a context key could
be added however since it's not possible to return a report object in
get_report_values, it's difficult to add a contexti without using some tricks.

This commit add a report option to use in the template that will be used
in order to modify the pdf orientation. The process used was already existing
for other options like dpi,...
2018-04-06 17:05:14 +02:00
Arnold Moyaux 3242fced63 [IMP] mrp: add advanced demo data for mrp
Current demo data do not have advanced configuration.
This commit provides new demo data in order to test
bom report or advanced MRP configuration with sub bom
bom with kit,...
2018-04-06 17:05:14 +02:00
Hiral Bhavsar 7cb32d1f36 [REM] mrp: remove old report for BoM structure/cost
The pupose is to add the new dynamic bom report
Chekc the next commits in order to have more details
2018-04-06 17:05:14 +02:00
Commandant Custo 5ba54aa43e [IMP] sale: use widget handle on tree view
Closes #20161
2018-04-06 16:41:00 +02:00
jem-odoo 395db264bb [MERGE] *_timesheet: selling services, phase 3
Impacted modules: hr_timesheet, sale_timesheet and project.

This merge commit provides feature for service flow (selling
timesheet). The most important points are

1/ selling project based on template: on product configuration,
user can now set a template for the Sales Order to create a
project by duplicating this ones (stages, tasks, ... are duplicated
from the template). If several Sale Lines are based on the same
template, only one will be created. Same mecanism if multiple product
creating a project without template: only one project per SO.

2/ Project Overview Revamp: before this, it was based on a filter
domain on analytic line (aka timesheet). This causes many problem
as if you are selling prepaid services, you project plan was empty
as long as no timesheet was created. Moreover, this kind of domain
is not very usefull for the user (nobody want to see project plan of
timesheet containing "analysis" for instance). The project plan is
now a filter on project, to ease fetching data from the project (even
if no timesheet or forecast), and allow cross project analysis.
The overview table part is now available even when forecast is not
installed.

3/ Assign Tasks Massively: a wizard is provided to ease linking
task to the same Sale Order Line, to ease billing their related
timesheets.

4/ Usability Details: filter task per SO or SO line, stat button
on Sale Order now redirect to kanban project instead of global
project plan, generated task/project names are cleaner, ...

5/ Installing only timesheet module, user will be able to track
cost without selling time. Fields of cost and employee hourly cost
are moved from sale_timesheet to hr_timesheet.

To make this feature works, some technical efforts was required:

1/ Project and Analytic Account: To allow SO to generate multiple
project, we wanted them to share the same analytic account (the one
of the Sale Order). To do so, we had to remove the inheritS between
project.project and account.analytic.account models.
To allow timesheet on a project, an analytic need to be set manually,
or it will be automatically generated (like before with the inheritS),
if allow_timesheet is checked.

2/ Refactoring of SOL service generation: to allow SOL to generate
only one project (per template) for the SO, the part of service creation
on sale.order.line needed a refactoring.

3/ Revamping the overview also improve its performances: some part
are now based on SQL queries (table part), or on report (profitability
report). Doing a report allow the user to create its own filters, and
give him a more accurate tools to extract statistics then project plan.
The idea is to get only one source of information for reporting and
analysis.

Please see sub commits for more details.

Thanks for @tde-banana-odoo for his review and advices during
development,
and thanks to @bst-odoo for his functionnal ideas, testing and support.

Tasks #34702
Closes #22268
2018-04-06 15:38:48 +02:00
jem-odoo d50a1e2622 [IMP] project,hr_timesheet: no 'remaining hours' field in project
'remaining_hours' is defined in project as a simple
float field, manually updateable, only displayed
when the group "Time Estimation on Task" is activated.
But for now, there is no setting to active this group.

Those are legacy useless stuff, so we can remove it.
The purpose is to make 'time estimation' feature only
available when timesheet is installed.

Thie commit also split the compute methods of
'remaining_hours' and 'progress' fields to make
'remaining_hours' updateable, though inverse method.
Without splitting the compute method, the calculation
of the progress was done correctly during onchange
but not when saving.
2018-04-06 14:30:47 +02:00
jem-odoo 3a40ee0097 [FIX] sale_timesheet: correct uom xml id 2018-04-06 14:30:47 +02:00
jem-odoo 0cbcbf89d2 [IMP] sale_order: name and description of generated task
We want to split the sale order line description as follow:
 - first line will be the title of the task, prefixed by SO
   reference
 - the rest of SO line description should be the task
   description
The purpose is to avoid duplicating the first SO line
description in task title and description.

Task #1831934
2018-04-06 14:30:47 +02:00
jem-odoo 29d64be400 [IMP] sale_timesheet: group task by Sales Order
From task stat button from SO form view, it
is relevant to see the task of the SO only.
So, we add a filter to do so. AS the kanban
task use a read_group, it is required to store
the sale_order_id field on task.
2018-04-06 14:30:47 +02:00
jem-odoo 30f3d4144f [IMP] sale_timesheet: plan project when timesheet only
The code of the project overview is split to be used when only
timesheet is installed (no forecast). The table part only
display column for timesheeted time per month.
When forecast is installed and activated, other columns
comes to complete this table.

This commit also makes visible SO line having no timesheet
linked in project overview.
2018-04-06 14:30:47 +02:00
jem-odoo abfa921009 [IMP] sale_timesheet: tasks linked to SOL of project
When selling a project from a sale order, the SO line
creates the project. When we create a task in that
kind of project, by default, the task will be linked
to the SO line of its project.
However, for the SO line field to be visible on the
task form view, the customer must be set. This commit
set the customer from the SO line when changing
the project (billable project only).
2018-04-06 14:30:47 +02:00