Commit Graph
106440 Commits
Author SHA1 Message Date
stefanorigano 1fa0990a9a [FIX] mass_mailing: replace title of snippet menu in mass_mailing
The snippet menu title is only visible when choosing a theme for the
first time, so "Select a template" is better than "Add blocks".
2016-09-21 13:16:59 +02:00
Denis Ledoux 7233add42b [FIX] point_of_sale: picking creation after payment
Since the below revision:
32b5515a8f

It was no longer possible to create a payment
for a pos order without picking.

Indeed, if `picking_type` is not set,
`picking_id`, which is initialized to `False`,
remains as `False`, and you therefore can't
ask it's `.id` (`picking_id.id`).

opw-687597
2016-09-21 12:23:33 +02:00
Pierre Masereel 5ae29848ea [FIX] calendar: event display time timezone
If the method "_get_display_time" is called on an event and if the
user or partner has no timezone set. The string returned by the function
contains the value 'False' instead of a timezone.

To fix this, we replaced the "False" value by "UTC", because UTC is the
default timezone in Odoo.
2016-09-21 11:54:19 +02:00
Thibault Delavallée aaf5e6c3fb [IMP] res_partner: add email_formatted field on res.partner that is its email correctly formatted
It will be used in various email templates to avoid having either badly
formatted emails either not formatted emails. As this is a not stored
function field it does not impact model.
2016-09-21 11:20:21 +02:00
Jeremy Kersten 8b41933a9e [FIX] web_graph: force row title to be string
If the title was 'true' or 'false', the export failed, because we are tying to
concat bool and str. TypeError: cannot concatenate 'str' and 'bool' objects

How to reproduce, install sale, be sure to have one order with delivered = True
In Reporting / Sale analysis, add a group by 'shipped' filed to have 'true' as
title.

This commit closes issue odoo/odoo#13425
2016-09-21 10:59:39 +02:00
Stéphane Bidoul (ACSONE) dbd4114d38 [FIX] l10n_lu: fix reconcile flag in accounts template csv
Changes f -> FALSE and t -> TRUE, otherwise when installing the l10n_lu
COA, the reconcile flag is wrong.

Closes #13282
opw-688957
2016-09-20 17:46:13 +02:00
Yannick Tivisse 329cf0b485 [FIX] survey: Change 'Test' filter, as 'test' is not a state anymore
Currently there's a boolean 'test_entry'
2016-09-20 17:03:52 +02:00
Yannick Tivisse 17c61f54e9 [FIX] survey: Change the help label according to changes
The option name has changed.
2016-09-20 16:54:05 +02:00
Richard deMeester 4f0ca6d923 [FIX] base: res.config name_get fix (#13513)
name_get function needs to ensure that read passes the required
ids as a list, not a single value.  This is very important if
the method is inherited.
2016-09-20 16:19:46 +02:00
Yannick Tivisse 3a381a1783 [FIX] hr_payroll: Remove stupid record rule that became buggy
In saas-12, a stupid record rule authorizes an employee to create a payslip only for him (dafuq)

In saas-13, sine the HR access right splitting, this record rule authorizes an payroll user ti create a payslip only for him (bug). A consequence of this is that the rule is also applied to the payroll manager (bugx2)
2016-09-20 15:43:04 +02:00
Yannick Tivisse e4c7c36c3a [FIX] hr_contract: Allow a employee user to read contracts 2016-09-20 15:42:29 +02:00
Yannick Tivisse b1add6a96e [FIX] hr_attendance: Allow a not attendance user to create an employee
Remove a groups_id in the view inherintence + remove the groups on the model
2016-09-20 14:35:29 +02:00
Raphael Collet 5c5d0865b9 [FIX] models: reflect inherited (by _inherits) custom fields
When a custom field is created, it now appears in `ir.model.fields` on the
model's children models (by `_inherits`).  This makes the reflection more
accurate (inherited custom fields are visible), although not perfect (they
appear as "base" fields and thus cannot be overridden).

The reflection of fields in `ir.model.fields` has been improved to deal with
custom field creation, modification and suppression.

Note that custom fields are still not inherited through `_inherit` relations.

opw-687626
opw-645065
2016-09-20 14:08:55 +02:00
qsm-odoo 745d1e3328 [FIX] web_editor: adapt code which updates editor bar after image edition
This fixes a bug where the media dialog reopened after closing after
edition of a t-field="image_small" block.
2016-09-20 14:06:29 +02:00
Christophe Matthieu 12a6889088 [FIX] website_sale: wrong help menu name to create new product.
Issue: Missing Menu on E-commerce because the user click on the wrong menu
opw-681201
2016-09-20 13:53:57 +02:00
qsm-odoo 9a1939bbcb [MERGE] mass_mailing, *: add new mass mailing theme system
* web_editor, website

-> Move some website options to web_editor to use them in mass_mailing
(margin and resize)
-> Rework on themes design and declaration conventions
-> Review theme switching to bring default layout on first edition and
to be able to define theme images
-> Move theme design in their own asset
-> Edition and saves fixes
2016-09-20 13:52:41 +02:00
qsm-odoo 4868b045a7 [FIX] web_editor: remove breaking cache of transcoder
The web_editor transcoder, who is in charge to change mail css style
into inline style and vice versa, has a cache to improve its
efficiency. The problem is that it was designed to work only if a
particular "<tag>.className" has always the same css style no matter
what its parent or neighbors are. This is obviously not compatible
with theme switching. Indeed, only by switching from one theme to
another, the parent of every snippet have a different className which
is used in css to design differently every snippet. Also inside a same
theme, we obviously want to be able to style a particuler .myClass
element differently from one snippet to another without having to
multiple css classes.

This commit removes the cache system to allow theme switching and
liberty in theme designing. This however make the edition start and
the saving really slower...
2016-09-20 13:52:29 +02:00
qsm-odoo a430c81b79 [IMP] mass_mailing: review theme style location and convention
* Use the theme class selector as root for the less file
-> Allow to style the editor as applied to the body
-> Split in editor/color/layout/snippets

* Create an assets to contain all mm themes so that the compilation is
made by the odoo system, and allow minification and variable sharing
between themes
-> Remove css files

* Reformat the LESS files content
2016-09-20 13:52:29 +02:00
qsm-odoo edb58e6beb [IMP] mass_mailing: automatically include the o_mail_wrapper element 2016-09-20 13:52:29 +02:00
qsm-odoo a0cfc0e88b [FIX] mass_mailing: remove website dependency 2016-09-20 13:52:29 +02:00
qsm-odoo 9749b93250 [IMP] website, web_editor, mass_mailing: move margin and size options
website -> web_editor so that they are available for mass_mailing.

To allow setting margins on td elements:

As the above mentionned option allows to control the mt and mb classes
on the mass mailing items, the problem is that we would ideally want it
to be functionnal on td element as they are the main part of a mail.
As they don't support margins, there were many options to fix the
problem:
- Add more JS to place the mt and mb classes on children of td element
- Place the option on children of td element and not td element itself
but in that case, the width control of td would imply a lot of parent
option hierarchy, or the width control had also to be adapted to control
children
- Control padding instead of margin. This forces to add lots of
css rules like pt4 pt8, ... (or td.mt4, td.mt8, ...).

The last solution has been chosen. Padding is more supported than
margins in mail client anyway and the css rules will be isolated in
the mail editor anyway. Using td.mt4 instead of pt4 had the advantage
to not require any JS modification.
2016-09-20 13:52:29 +02:00
stefanorigano 4f93d5c687 [IMP] mass_mailing, web_editor: improve themes/snippets/templates 2016-09-20 13:52:29 +02:00
qsm-odoo e3635494ea [IMP] mass_mailing: add default layout for mail themes
When there is no content in the mail, the user is now forced to choose
a theme. Once the choice is made, the theme introduces default content
(series of snippet to simplify user edition).

The default images are also changed when the theme is switched. To do
that, JS code was implemented so that on theme switch, all the images
are changed to check for images in the static theme folder or use a
theme related xml_id.

+ Refactore theme data management.
2016-09-20 13:52:29 +02:00
Martin Trigaux e5755b12cf [FIX] base_setup,hr_expense: missing closing tag, typo 2016-09-20 13:43:12 +02:00
qsm-odoo c4784fc75b [FIX] web_editor: activate autoplay feature for videos
The checkbox was there to activate autoplay... but was not doing
anything since the web_editor/website split.
2016-09-20 13:40:53 +02:00
Yannick Tivisse 080158c1fe [FIX] fleet: Fleet user rigths implies employees user rights
Create users having only manager or user rights on fleet, cannot acces \web pages, We should add the employee rights, as when we give fleet rights
2016-09-20 12:55:15 +02:00
Jeremy Kersten 6d8ae0a039 [FIX] crm: fix bug introduced by new api in #aa44700
Before migration:
  'phone': customer and customer.phone or lead.phone,
After migration:
  'phone': customer.phone if customer else self.phone,

So if a customer exists and that it has no phone, the phone
on the lead need to be preserved during convertion in opp.
2016-09-20 12:25:45 +02:00
Yannick Tivisse 92fa0d0207 [FIX] hr_holidays: Show only my Leaves under 'My Leaves' menuitems
The menuitems under 'My Leaves' show all the records if the user is a manager. It shouldn't. My means my.
2016-09-20 12:20:07 +02:00
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
Martin Trigaux f978d85f05 [I18N] l10n_be: add missing translations for CoA 2016-09-19 17:49:58 +02:00
Martin Trigaux 0576b7af19 [FIX] account: translate refund by note de crédit 2016-09-19 17:00:16 +02:00
Fabien Meghazi 4e546cdb0d [ADD] shell: add support for more REPLs in shell mode 2016-09-19 16:35:10 +02:00
Martin Trigaux fe0cbf897d [FIX] add missing tag and correct typo
Thanks Transifex reporters
2016-09-19 16:20:30 +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
Fabien Meghazi 5dec69c35d [REV] fix ir.qweb#render() return type
This commit reverts the API change introduced in b3302398bc
that changes `ir.qweb#render()` to return a unicode string instead of a utf8
encoded bytestring.

Returning a unicode string is undoubtedly cleaner and a step in the direction
of python 3 but still is an API change that can break third party modules.

Let's wait the migration to python 3 before breaking other people's toys.
2016-09-19 15:22:46 +02:00
Nicolas Martinelli d2707fa7d7 [FIX] pad: initialize pad at creation
When a pad is created programmatically (e.g. through a project task or a
note), the pad is empty when it is first displayed. It is necessary to
edit the record and save it in order to be able to see the content.

This is because the pad is normally initialized by the JS layer, at the
first edition, thanks to a call to `pad_generate_url`. Therefore, a
programmatic pad creation won't initialize it.

opw-685826
2016-09-19 11:41:38 +02:00
Jeremy Kersten 06032f8883 [FIX] purchase: don't check subtype if not in the context of purchase order.
Before this commit, we check everytime the subtype.
In some case (eg: portal user on the forum) don't have access to subtype of
type internal.

This commit fixes opw-688403
This commit closes #13510
2016-09-19 11:27:31 +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
Odoo Translation Bot 6a1ecef775 [I18N] Update translation terms from Transifex 2016-09-18 03:05:57 +02:00
Odoo Translation Bot 9413bafdd3 [I18N] Update translation terms from Transifex 2016-09-18 00:34:39 +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