Commit Graph
105499 Commits
Author SHA1 Message Date
Yannick Tivisse bf1bfb06fe [FIX] hr_holidays: Allow a employee to reset to draft his own leaves
If a leave request is refused by the manager, the button reset to draft is displayed, but the employee cannot use it because he doesn't have the write access rights on his own leave requests

In 'refuse' state, all the form is readonly, but the employee should be have to reset his own leave to draft to modify it and re-submit it.
2016-09-20 12:01:53 +02:00
Yannick Tivisse 2c4bc2ffce [FIX] survey: Remove remaining onchange_template_id on survey_email_compose_message
This view is bad, and you should feel bad about it.
2016-09-20 11:27:30 +02:00
Yannick Tivisse f8a0634899 [FIX] hr_expense: Add coherence between menuitems and action title 2016-09-20 10:04:20 +02:00
Damien Bouvy 78296e29ef [IMP] sale: use read_group instead of search_count
Particularly for computed fields displayed in the kanban.
2016-09-20 07:44:22 +02:00
Damien Bouvy 90037dbbfd [IMP] account,crm,sale: add groups on views that need them
Some view extension (in this case mainly counters on partners, like
small Sales Orders counter badges etc.) should not be visible if you
don't have the relevant rights.
2016-09-20 07:44:22 +02:00
Fabien Meghazi 4e546cdb0d [ADD] shell: add support for more REPLs in shell mode 2016-09-19 16:35:10 +02:00
Yannick Tivisse e04b44dad1 [FIX] sale: Correct sale order management on accounting entries creation
If an analytic account is not linked to sale order, do nothing (and do not return False which is not a valid value for a write ({} would have been valid)). We should allow the simple analytic accounting without sales order.
2016-09-19 15:40:08 +02:00
Martin Trigaux db42c46eb7 [I18N] export 10.0 source terms 2016-09-19 15:38:47 +02:00
Richard Mathot 33e7413b90 [IMP] ir_sequence: ease debug in multicompany dbs
It often occurs that users get nasty error messages like "missing value
for column xxx" when trying to create objects. It can happen if the
objects uses a sequence as default value that is not defined in an
available company.

We try to give a hint to the glory support person who could be confused
by that.
2016-09-19 15:29:27 +02:00
Christophe Matthieu 0777af3e60 [IMP] qweb: Add extra condition branching (t-elif) (closes #3b3dbcd)
To have the same feature client and server side (t-elif was added in the qWeb client side)
2016-09-19 11:24:56 +02:00
Yannick Tivisse 4c0184923b [FIX] hr_expense: display taxes correctly on expense report 2016-09-19 10:02:22 +02:00
Raphael Collet f642727248 [IMP] models: in _read_group_fill_results, rewrite the merge of results 2016-09-16 17:35:24 +02:00
Raphael Collet fa082019a0 [IMP] models: change API of _group_by_full
The dictionary `_group_by_full` is replaced by a field parameter `group_expand`
that is assigned to the method name.  The API of the method has been simplified
as well:

    @api.multi
    def _read_group_stage_ids(self, domain, read_group_order=None, access_rights_uid=None):
        # the stages are given by self.ids (wrong model);
        # read_group_order is the order given to read_group() on self;
        # return stages.name_get(), {stage.id: stage.fold)

    _group_by_full = {'stage_id': _read_group_stage_ids}

is now written:

    stage_id = fields.Many2one(..., group_expand='_read_group_stage_ids')

    @api.model
    def _read_group_stage_ids(self, stages, domain, order):
        # stages is a recordset;
        # order is the order to use on stages' model;
        # return a recordset which is a superset of stages
2016-09-16 17:35:24 +02:00
qsm-odoo fe0478a5c4 [FIX] web_editor: remove dead code and refactore show_blocks method
Following commit e634a52cac, the
show_blocks method had to be refactored to remove the dead code and
refactore the old one it contained.
2016-09-16 17:02:33 +02:00
Josse Colpaert 911de68e70 [FIX] purchase: when updating amounts in picking, you need to take into account existing procurements
When increasing the amount on a confirmed purchase order line,
an extra move is created in the incoming picking.

When the purchase creates the moves in the picking on confirmation, it takes into account
the procurements that triggered the purchase order and creates a move for every procurement.
This is necessary in order to make the next steps ready.

With this commit, when you increase the quantity, it will take into account the amounts of moves
already created for a procurement and not link the new move with a procurement if not necessary.

This case can be tested by confirming the PO with less than foreseen by the procurements and increasing
the amount afterwards.  (which is more of a corner case, but it is good to do things right)
2016-09-16 15:58:20 +02:00
Damien Bouvy a9a4863034 [FIX] website: improve ACL support
The dashboard must be visible for non-'group system' users, hence
the sudo call + only display the link to modify the client id
if the user has sufficient access rights.

Small visual correction for live users counter in the dashboard.
2016-09-16 15:48:48 +02:00
Damien Bouvy 98e3d639a8 [IMP] website_crm: make the website admin graph acl-aware
This is linked to the previous commit.

This commit adapts the widget extension and backend controller of
the website admin dashboard to prevent a crash if the user does not
have sales rights.
2016-09-16 11:46:39 +02:00
Damien Bouvy 0ed6621e03 [IMP] website_sale: make the website admin graph acl-aware
This is linked to the previous commit.

This commit adapts the widget extension and backend controller of
the website admin dashboard to prevent a crash if the user does not
have sales rights.
2016-09-16 11:46:39 +02:00
Damien Bouvy 904f06f070 [IMP] website: make the website dashboard ACL aware
The Website Admin dashboard displays graphs for sales, analytics,etc.
using a (somewhat easily) extensible js framework.

Unfortunately, this framework is ACL unaware, meaning that it will
completely and silently crash if you are missing any of the required
access rights.

To solve this, extensions must now specify not just a graph name
but a necessary group for it and set the value for this group in
the extension of the backend controller.

This commit also
- make the icon visible for the group 'Website Designer and Editor'
  (not juste the Settings group, which is extremely restrictive)
- make the button to set the Google API key only visible to people
  with sufficient access rights
2016-09-16 11:46:39 +02:00
Christophe Simonis a256e1ed34 [FIX] core: adpat 9874892b9 to multiple manifest files 2016-09-16 11:34:22 +02:00
Jitendra Prajapati c129ae36aa [FIX] web: Set focus on first field when opening a modal
This will improve the onbarding of project and the usability in general.

Project: When creating a project a small modal opens with one or more fields, and you have to click on it just to type the project name.

Usability: one many2one (and others), when clicking on "Create and Edit", the focus is set on the first field.
2016-09-16 11:19:15 +02:00
qdp-odoo 89cbef8540 [FIX/REF] account: set default behavior of apply_taxes to False on creation of account.move.line.
This allows to import acccount.move.line via csv and provide the field 'tax_ids' (which is needed for the tax statement).
This option is now a context's key, replace the key 'dont_apply_taxes' which was now useless
2016-09-16 11:13:51 +02:00
Christophe Simonis f4fc3985b6 [MERGE] forward port branch saas-12 up to 10cde43 2016-09-16 11:03:50 +02:00
Christophe Simonis 10cde43fd4 [MERGE] forward port branch saas-11 up to 4c2b536 2016-09-16 10:34:39 +02:00
Yannick Tivisse d4b878af53 [FIX] hr_timesheet: Move correctly 'allow_timesheet' to hr_timesheet module
The field was move but not the view definition
2016-09-16 09:15:15 +02:00
Christophe Simonis 4c2b536031 [FIX] core: adapt method api
Forward-port problem, once again
2016-09-15 19:00:26 +02:00
Christophe Simonis f8a601cad7 [MERGE] forward port branch saas-10 up to e634a52 2016-09-15 18:55:01 +02:00
qsm-odoo e634a52cac [FIX] web_editor: mark snippets which can't be dropped in the page
The system was lost with the editor refactoring which came with saas-10
and commit bf39884a5c.
Indeed the show() method of the BuildingBlock class was removed as the
widget is now always showed but the show_blocks() method it called was
not removed (and thus was not called anymore).

As a fix, the show_blocks method is now called again, on snippets
initializations and each time a snippet is dropped or removed.
2016-09-15 16:47:15 +02:00
Christophe Simonis 784eaf28dc [MERGE] forward port branch 9.0 up to 6647e1f 2016-09-15 16:45:13 +02:00
Christophe Simonis a4f9c25cf0 [FIX] account: handle move line without partner in Aged Balance 2016-09-15 16:41:58 +02:00
Simon Lejeune 6647e1f8a9 [FIX] barcodes: correctly unbind quantity event listener
The quantity event handler is not correctly unbound when its action
is deleted, resulting in multiple window.prompt asking the quantity
of the products if you go mulitple times trough a view when a widget
implementing the barcode thing is used.

There seems to be a bug in the framework ("barcode_scanned" events
are registered the same way than the "keypress" one on core.bus
but they don't have suffer from the same issue).
2016-09-15 16:20:18 +02:00
Yannick Tivisse 24205f8153 [FIX] Don't display subtask_project_id on a project if it doesn't allow timesheets management 2016-09-15 16:13:41 +02:00
Yannick Tivisse c303d2b644 [FIX] project,issues,timesheet: Hide links and buttons if not activated on project
Uncheck use tasks and/or use issues and/or allow timesheets
all links are still available from the kanban
timesheet is available from the form view
tasks and issues hidden in the form view

NB: allow_timesheets was defined in timesheet_grid, but it should be standard in hr_timesheet
2016-09-15 15:52:18 +02:00
qsm-odoo 5e6df42800 [FIX] web_editor: use valid bootstrap for m2o editor options
The .dropdown is in a .btn-group environment while a .btn-group can
only contain .btn or .btn-group elements.

This induced problems where the m2o options covers the full overlay
environment, preventing clicks on the customize dropdown.
2016-09-15 15:43:32 +02:00
Christophe Simonis 1d457006e5 [FIX] core: handle NewId in result of onchange
When an onchange return a NewId for a many2one, the expected result is
a False value.
It appear for computed many2one that can return currently created
record like `res.partner.commercial_partner_id` field.
2016-09-15 15:37:50 +02:00
scosist 5006ec9ca4 [FIX] stock: typo in _get_orderpoint_date_planned
orderpoint.lead_type should be 'supplier' instead of 'purchase'

opw-687311
Closes #11389
2016-09-15 14:51:15 +02:00
Christophe Matthieu 9791265635 [FIX] hr_recruitment: can't change the applicant category color for the kanban view 2016-09-15 14:38:36 +02:00
qsm-odoo c64f58358f [FIX] website: refactore parallax snippet (perf / browser compatibility)
* Do not read multiple DOM data on each scroll. Simply read this when
necessary (edition / initialization).
* Throttle scroll event and debounce resize events (-> performance in
edition and navigation improved).
* Do not save useless data in the DOM.
* Have the parallax state consistent if the page undergo other changes
* Simplify DOM structure and LESS
    - Allow to better see how to place snippets inside the area
    - Before this commit, default parallax had different height on
    chrome and firefox
2016-09-15 14:33:07 +02:00
qsm-odoo cd244a40f3 [FIX] website, web_editor: remove born-dead code
This code was introduced in 8.0 and has never been called.
2016-09-15 14:12:50 +02:00
qsm-odoo ee6cbf751e [FIX] website: missing JS module dependency
Commit 3c98c78fc7 removed a JS
dependency by mistake.
2016-09-15 14:12:49 +02:00
Nicolas Martinelli f83b5a8e56 [FIX] survey: search by title
It's not possible to search on any field on the `survey.survey` model.
Due to commit ed589ca.

opw-688157
2016-09-15 14:04:30 +02:00
Mansi Gandhi 5a104fcb1a [FIX] website_quote: Notification 'viewed by customer' should be received by the responsible only
Currently some customers receive the automatic notification 'Quotation
viewed by customer'. This should not be the case as this notifciation
is purely internal and should only be sent to the quote responsible.

Notification is now a note with the responsible being directly in the
recipients.

Conflicts:
	addons/website_quote/controllers/main.py

Backport of 14f07cb96f
opw-687957
2016-09-15 13:40:33 +02:00
Thibault Delavallée dac08836bc [FIX] website_blog: fix use of undefined variable 2016-09-15 12:49:33 +02:00
Christophe Matthieu a2946f72d9 [FIX] web: error when click twice on "Salary Structures Hierarchy" 2016-09-15 11:44:37 +02:00
Nicolas Martinelli ce3341a906 [FIX] account: tax amount at reconciliation
When doing a reconciliation, make sure that the tax amount is properly
rounded to the currency precision. Otherwise, if the rounding policy of
the company is "round globally", the amount recorded won't be rounded.

opw-688399
Closes #13452
2016-09-15 11:22:07 +02:00
Nicolas Martinelli c3f4c73953 [FIX] account: monetaryIsZero
An issue arises in the following use case:
- Company rounding policy in "round globally"
- Tax excluded of 20 %
- Create a statement of 3.80 EUR
- Reconcile the statement thanks to the reconciliation widget
- Click on "Choose counterpart" in order to manually create a line to
  reconcile with the 3.80 EUR statement
- Add an amount of 3.17 EUR, and choose the 20 % tax

The widget creates an extra line of 0.00EUR . This is because the
remaining amount is 0.004.

The reason lies in the `monetaryIsZero` function. There is a hardcoded
decimal precision of 4, while it should be 2 for EUR.

We add an extra parameter to the function so it is possible to adjust
the decimal precision required. Only the problematic calls are modified
to avoid unnecessary intrusive modification.

Closes #13452
opw-688399
2016-09-15 11:22:07 +02:00
Nicolas Martinelli 143ec37391 [IMP] account: compute_all rounding
In some specific cases,it is necessary to call the `compute_all` method
and prevent any rounding to be done. This adds some flexibility in the
method to override rounding thanks to a 'round' context key.

Related to #13452 and commit 2e4777bb32

opw-688399
2016-09-15 11:22:07 +02:00
qsm-odoo 04e9c94147 [FIX] web_editor: allow to remove image from gallery thanks to remove button
Commit b309f3ab54 made the snippet remove
button always be there by removing the "preventParentEmpty" mixin.
Instead of preventing to remove the only child of a snippet, the system
was changed to remove the parent if this only child is removed. This
also applies on the system which hide the remove button if the child
cannot be dropped anywhere in the DOM.

Unfortunatly the image gallery snippet relied on the remove button to
be hidden for its content images. Indeed, it was implemented so that
the "remove" button is hidden but a "remove image from gallery" was
there in the customize menu. The solution is to remove this option and
copy its behavior on the standard remove button.

Note: this probably was not done before because the on_remove feature
was broken (fixed with commit 5e9ebcfb01).
2016-09-15 11:06:58 +02:00
Christophe Simonis 5adca2bc46 [MERGE] forward port branch saas-6 up to 2fa3591 2016-09-15 11:02:44 +02:00
Christophe Simonis 2fa3591a9b [MERGE] forward port branch 8.0 up to 9874892 2016-09-15 10:49:55 +02:00