Commit Graph
112425 Commits
Author SHA1 Message Date
Florent de Labarre 93d4da977a [IMP] account: improve error message raised
Add the code/name of deprecated account on the error message when it is used.

Was PR #19392. Courtesy of Florent de Labarre
2017-09-14 09:59:24 +02:00
Christophe Simonis e390b0d640 [MERGE] forward port branch saas-17 up to 1e17035f71 2017-09-13 20:07:38 +02:00
Christophe Simonis 1e17035f71 [MERGE] forward port branch saas-16 up to 268cf9d04a 2017-09-13 19:32:35 +02:00
Christophe Simonis 268cf9d04a [MERGE] forward port branch saas-15 up to 127dea7f66 2017-09-13 18:45:07 +02:00
Christophe Simonis 127dea7f66 [MERGE] forward port branch saas-14 up to 3d2a7a0d12 2017-09-13 18:21:23 +02:00
Christophe Simonis 3d2a7a0d12 [MERGE] forward port branch 10.0 up to 5b69f1a333 2017-09-13 17:48:37 +02:00
Christophe Simonis 5b69f1a333 [FIX] account_tax_python: correctly forward-port 7eb7e9fd6e 2017-09-13 17:47:34 +02:00
amoyaux 0f9302af1f [FIX] stock: recheck availability on mts move bypassing reservation
When running action_assign on a mts move bypassing the reservation,
we always created a new stock move line with the quantity of the move.
This proved to be too naive when running recheck availability.

Exemple: Let’s say I have a reserved move of quantity 5.
If I edit the initial demand to 7 and click on recheck availability,
I end up with a move line of 5 and a move line of 7. We adadapt the
code in a similar way that what’s done in _update_reserved_quantity,
by looking for a candidate move line and only increasing the reserved
quantity by what still needs to be reserved.
2017-09-13 17:30:20 +02:00
Christophe Simonis c8194a7647 [MERGE] forward port branch 10.0 up to c8b5c01340 2017-09-13 16:55:42 +02:00
Christophe Simonis c8b5c01340 [MERGE] forward port branch 9.0 up to 7eb7e9fd6e 2017-09-13 16:49:16 +02:00
Simon Lejeune 5b66c17ed2 [FIX] test_main_flows: adapt to rev 8bca882b56 2017-09-13 15:46:43 +02:00
Christophe Simonis 2bb30173ff [FIX] http_routing: python3 compat
In python3, exception variables are cleared at the end of the `except`
clause [1]

[1] https://docs.python.org/3/reference/compound_stmts.html#the-try-statement
2017-09-13 15:16:15 +02:00
Géry Debongnie 93cf24f73a [FIX] web: reimplement custom widgets in basic views
With the new views, we lost a (almost unused and undocumented) feature:
the ability to instantiate custom widgets in a form view, not linked to
a particular field.  For example:

<widget type="weekly_timesheet" attrs="{'readonly': [['state', 'not in', ['new', 'draft']]]}"/>

We reintroduce this feature in this commit, with a nice twist: it also
works for the list view and the kanban view.
2017-09-13 14:04:34 +02:00
Kishan Gajjar c1fa3b8ab3 [IMP] mail: pdf preview and small improvement
When you click on pdf it should show preview of pdf.
Don't show the previous/next arrows if there is only one attachment.
2017-09-13 12:46:52 +02:00
Jérome Maes 6552ae68d1 [IMP] sale,stock: rename DHL label on settings 2017-09-13 12:10:31 +02:00
Christophe Simonis 1788c3f584 [FIX] P3: url_for text model
Correctly forward-port 30a9e6602c
2017-09-13 11:27:15 +02:00
Martin Trigaux 052bc38805 [FIX] google_calendar: do not create an event with an invalid id
The id is useful to update existing events but sometimes we are getting some
ids that are not accepted by Google

Getting an error:
odoo.addons.google_account.models.google_service: Bad google request : {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid resource id value."
   }
  ],
  "code": 400,
  "message": "Invalid resource id value."
 }
}

Looks like existing events can have a _ in their id but new one, no longer.
It seems that these events are created by outlook calendar when synchronized
with Google Calendar.

opw-749752
opw-751294
opw-751348
2017-09-13 11:23:35 +02:00
Dan Čermák a52369274a [CLA] signature for D4N
Closes #19425
2017-09-13 11:22:00 +02:00
Prakash Prajapati 8bca882b56 [REF] stock: remove one level of menu in operations 2017-09-13 11:17:23 +02:00
Prakash Prajapati e9d8c7a097 [REF] stock: returns: wording of origin 2017-09-13 11:17:23 +02:00
Prakash Prajapati 7857770fe1 [REF] stock: wording when unlinking done move lines 2017-09-13 11:17:23 +02:00
Prakash Prajapati 9ba7f28062 [REF] stock_picking_batch: wording on name 2017-09-13 11:17:23 +02:00
Prakash Prajapati be55159342 [REF] stock: scrap: no quick create on product_id 2017-09-13 11:17:23 +02:00
David Arnold cc955698ce [FIX]sale_stock: copy devolution move without decreasing respective SO values
-Make a return picking from a SO, and condigure the items to be refunded on SO(in the wizard)
-Copy the return picking.
-Validate it.

Without this fix, it would just keep decreasing the delivered value on SO.

opw:767429
2017-09-13 11:02:56 +02:00
pro-odoo 23ddd7d0fa [IMP] account: usability improvements
- menuitems reworked to add submenus for more clarity
- settings reworked

Was task 36452. Was PR#19301
2017-09-13 10:59:12 +02:00
Goffin Simon 8fbee7978f [FIX] purchase: PO state when validated
When nothing has been invoiced and the PO is validated with nothing to invoice
then the state of the PO must be "Nothing to invoice"

opw:769919
2017-09-13 10:16:34 +02:00
Raphael Collet 886003af93 [FIX] models: in onchange, consider all levels of subfields 2017-09-13 10:12:16 +02:00
Fabien Meghazi f2f99dc091 [FIX] bus: compatibility with Odoo's PAAS external long polling handler
Add a `peek` option in the bus event dispatcher polling in order to let
an external event dispatcher fetch the notifications and their
corresponding channels.
2017-09-13 09:48:25 +02:00
Fabien Meghazi a2ed3d3d5b [FIX] bus: compatibility with Odoo's PAAS external long polling handler
Only start the bus events dispatcher when needed (lazy starting).
On Odoo PAAS it's never started because the platform has its own event
dispatcher.
2017-09-13 09:48:19 +02:00
Jérome Maes aea183212e [MERGE] sale_timesheet: improvements for service company
Impacted modules: hr_timesheet, sale_timesheet, sale
and project_timesheet_holidays

The main change is the product configuration: a service
can create a task or a project, even if the update of
delivered quantities is manual.

Some code cleaning were done to ease comprehension and
maintenability.

This merge also bring usability changes and fine tuning
to manage your service like a pro.

For details, please have a look at sub commits.

Thanks for Thibault for the review and Benjamin (and Indian
Testing Team) for testing this. And Martin Trigaux that
did nothing, since he was on a stupid mountain ...
2017-09-13 08:42:40 +02:00
Jérome Maes 65bf4e4065 [IMP] sale_timesheet: ordered quantities are invoiced when timesheeted
When a so line base on ordered quantities is invoiced, the timesheet
logged after the invoice validation are not marked as invoiced. This
shows wrong number on the Project overview.
2017-09-13 08:41:32 +02:00
Jérome Maes 2e2cd56db3 [IMP] hr_timesheet: hide timesheet stuff according to user groups
You should be timesheet user to see 'Timesheet' tab
on task form view, and the project overview (on kanban
project).
2017-09-13 08:41:32 +02:00
Jérome Maes a9d5e45f2b [IMP] sale_timesheet: hide stat button on SO if user does not have the good rights
Only project user can see stat button for project and
task on SO form view, and only timesheet user can
see the detailled timesheet stat button.
This avoid to give malny access rights to user that
does not required them for their daily business.
2017-09-13 08:41:32 +02:00
Jérome Maes 04836cc257 [IMP] sale_timesheet: timesheet overview improvements
- Adding stat button for tasks, projects, and
timesheets
- Human readable hours amount
- ...
2017-09-13 08:41:31 +02:00
Jérome Maes d9cece2ef8 [IMP] project_timesheet_holidays: ease leave type configuration
A leave type now generate timesheet by default. So
the internal project/task are taken from the leave
type company (a default value for the company has
been added).
To allow the hr leave manager to select a project,
he should be alble to read the analytic account
(otherwise, crash when calling name_get).

Setting the default internal project/task is advanced,
so hidden in debug mode on timesheet config.
2017-09-13 08:41:31 +02:00
Jérome Maes d29242356a [IMP] hr_timesheet: menus and view usability
- better reporting menus
- views usability
- reporting split: entries for grouping by employee,
projet, and task, and billable rates
- ...
2017-09-13 08:41:31 +02:00
Jérome Maes fda8d77c69 [IMP] sale_timesheet: split non billable type for timesheet
Timesheet logged on project created from a SO line are
not exactly the same as the non billable ones.

To ease the reporting, we split the non billable type
of timesheet: when timesheeting directly on a project
(whatever the product config), the billable type will
be 'no task found'.
The Overview is adapt to display the 2 'non billable'
categories.
2017-09-13 08:41:31 +02:00
Jérome Maes 40beeed12d [IMP] sale_timesheet: projects of sale order
The stat button now shows all the project involved
in the sale order (created, or linked).

This commits introduce the field `project_ids`,
containing all the project involved in the sales
order (created, or linked via products).

The stat button now shows all involded projects (if
many) or the timesheet overview of the single project.
2017-09-13 08:41:31 +02:00
Jérome Maes 26905ec24a [IMP] sale_timesheet: name of generated project/task on SO confirmation
The project name should take the customer ref into
account, when creating project.

The task name should be the first line of the SO description
to avoid having multiple tasks generated with the same name.
2017-09-13 08:41:31 +02:00
Jérome Maes 063987c989 [IMP] project,hr_timesheet,project_issue: clickable zone of project kanban box
When clicking on kanban box, the first action is trigger; the user
have to click on the label of the box to see the 'timesheet' (for
instance), otherwise he will see the tasks.

Since HTML5 supports `div`, `table`, ... being wrapped by `a` tag,
we can use it to make the entire kanban box clickable. (See
https://www.w3.org/TR/html5/text-level-semantics.html#the-a-element)
2017-09-13 08:41:31 +02:00
Jérome Maes 7c1a1d15ee [IMP] sale_timesheet: assign task to so line
When assigning task to a SO line (through procurement),
related timesheet should become billable (according to the
product of so line), and have their revenue recomputed.

This commits also add a test.
2017-09-13 08:41:31 +02:00
Jérome Maes 0e648b9e54 [REF] hr_timesheet,sale_timesheet: cleaning create/write overrides 2017-09-13 08:41:31 +02:00
Jérome Maes 3890f8d694 [REF] sale_timesheet: test suite improvements
Tests of sale_timesheet were using many demo data. This
is a practice we want to avoid. A common class setting up
test data (product service, partner, ...) is created to
help writting good test cases.

All tests has been adapted, moved, and some were added
to cover the new flow (new product configuration).
2017-09-13 08:41:31 +02:00
Jérome Maes 38b4a95940 [IMP] sale_timesheet: remove duplicate field definition
The field `project_time_mode_id` on res.company is
already defined in project module. This came from the
good old days where timesheet was not totally depending
on project.
In sale_timesheet, the field was redefined, and a hack
with xml id was done. It is time to remove this crap.
2017-09-13 08:41:30 +02:00
Jérome Maes 538e62e53a [IMP] sale_timesheet: product config for service
The purpose is to simplify the product configuration.
Adding detailled options about the service tracking
(create task and/or project) make the setup less
confusing for users.

The invoice policy is replaced by "Invoice based"
(only for services). We don't support "ordered
quantities" with "manual" tracking anymore. The
supported use cases are :
- Ordered quantities (using timesheet)
- Timesheet on task (delivered with timesheet)
- Milestones (delivered manually)

Also, even when selecting 'Milestones', the SO line
can generate a task/project, but timesheeting on
thoses objects will not change the delivered
quantities on the SOL. So, a task can always be created
whatever the service invoice policy of the product.

Every generated task or project are linked to their SO
line. But this SO line is only incremented (on delivered
quantity) if its product 'service_type' is timesheet.
2017-09-13 08:41:30 +02:00
Jérome Maes 0d50bf5d5b [IMP] sale: rename 'project_id' into 'analytic_account_id'
Since this field is an analytic account and not a project, its
name should be more explicit. This commit makes the code more
understandable. Naming things correctly improve developper's
sleep.
2017-09-13 08:41:30 +02:00
Jérome Maes 1382f63da1 [IMP] sale: remove useless field
Now, new view send the value, even if the field
is in 'readonly' mode. No need to have a related
field to allow the edition.
2017-09-13 08:41:30 +02:00
Jérome Maes 9e00dacded [IMP] sale_timesheet: so line create project
As so line already generate task, and project
for the SO sometimes, making it always create the
project seems to be a good idea.
Grouping all the logic is better for maintenability
and readability.
2017-09-13 08:41:30 +02:00
Jérome Maes 5261cdceae [REF] sale_timesheet: clean task creation from so line
Make the code more readable and callable on
a recordset.
This commit prepare the so line to also
generate a project (and not simply a task).
2017-09-13 08:41:30 +02:00
Jérome Maes 5cf4c350cb [REF] sale,sale_timesheet: cleaning sale analytic
The handling of analytic lines to sell is a little
mess. We can reinvoice analytic lines from timesheet
or expenses, or manual lines.

This commit tries to clean the code, factorize it,
make proper hook (see _sale_postprocess method)
and move specific in its corresponding modules.

Code was properly split, in order to make modules responsible
for only their own features:
- sale module handle the link of SO line to an analytic
line, and increment the delivered qty accordingly.
sale also provide the mecanism of determine magically
the SO lines of an analytic line with an expensable product
to reinvoice it at cost.
- sale_timesheet identifies the so line concerned when
timesheeting on a project directly. Also provide the domain
of analytic line when setting the SO line on AAL.

Cleaning is necessary for futher dev.
2017-09-13 08:41:30 +02:00