Commit Graph
119975 Commits
Author SHA1 Message Date
Jeremy Kersten d8064099da [FIX] website: move action action_website_add_features
Since we use it in website_form which one is included before res_config_setting,
we need to declare it before.
2018-08-24 22:58:55 +02:00
Romain Derierde-odoojke-odoo
65d8177b55 [REF] website*: revamp res_config_settings for website
Reorder res.config.settings for website
Make website_id in no create in most view
Revamp res.configsetting and view Form simplified

Transform old 'useless' stored field for presentation by computed field.
We can consider that if there are not key, feature is disable.

Co-authored-by: rde-odoo
Co-authored-by: jke-odoo
2018-08-24 20:01:02 +02:00
qsm-odoo 0e43512f86 [REF] web: add a scss function to swap two values in a list
Needed for themes migration.
2018-08-24 17:28:13 +02:00
David Beguin 823958b69b [FIX] mass_mailing : remove duplicate from blacklist form view
As blacklist email is unique and email is the only attribute,
it's a non sens to allow to duplicate a record.
+ To avoid import error on blacklist if import a duplicated address,
the create return the existing record instead of creating a new one
(which is not possible due to unique email constraint).
The duplicate was only editing the existing record.
2018-08-24 17:11:47 +02:00
Pragya ladda 00ffef800a [FIX] project: fix sql injection in rating public controller 2018-08-24 17:08:22 +02:00
David Beguin bda6d60b8e [FIX] mass_mailing : renaming date GroupBy filters
Since modification on the group by filter on date field,
a forced value like group by date:month doesn't work anymore.
the user can choose the period but the forced value is not selected
when activating the group by.

Anyway, as it is more convenient to let the user choose the period
he wants to group by, the following groupby filters have been renamed
and the forced value have been removed.
In Mailings menu > Group By menu: rename 'Sent Month' by 'Sent Period'
In Mainling Lists > Group By menu: rename 'Creation Month' by 'Creation Period'
In Reporting > Group By menu: rename 'Scheduled Month' by 'Scheduled Perdiod'
2018-08-24 16:52:02 +02:00
qdp-odoo a86381831b [IMP] account: usability of journal
better names for journal sequences
2018-08-24 16:31:40 +02:00
Martin Trigaux bb86b51241 [FIX] do not translate useless t-attf-title
t-attf-title are translatable, do not use t-attf if a t-att is enough
2018-08-24 16:16:53 +02:00
qdp-odoo 97eff5b68b [FIX] account: usability in account.journal form view 2018-08-24 16:10:14 +02:00
Sébastien Theys 1addade28b [FIX] base: correctly detect when admin logs in
Since 2f7c03d9ca it's not possible to log in as user 1.

However, we reset the base url when the admin logs in, which is now user 2.

This fixes wkhtml2pdf was not able to load css file, and probably some other side effects.

PR: none
Task: 1879620
2018-08-24 15:55:46 +02:00
Odoo Translation Bot b8c6c24bbb [I18N] Update translation terms from Transifex 2018-08-24 15:54:45 +02:00
jem-odoo a7eb6832d1 [FIX] sale,pos_sale: use correct method to find conversion currency rate
Before this commit, if the currency of the company is not the reference
currency (rate = 1.0), then the conversion will be applied on the
sale.report with currency rate.
Example in the demo data:
- Company currency is USD
- Reference currency is EUR
- Currency rate of USD is 1.5289 (after 6th June)

Creating a SO with a total of 1000 USD in the USD company will
display 654.065 on the sale.report (= 1000 / 1.5289).

The applied computation simply takes the rate of the company currency,
which is not exactly correct. This does not cause many problem since,
usually, companies set their currency as the reference one
(with rate = 1).

Since e8f01b94ce, the rate is stored,
offering the possibility to make the code more robust and covering
the case detailled above.
The correct computation to apply is the one defined in `_convert`
method: 1000 * (1.5289 / 1.5289) (amount * (src rate / dst rate)).

This commit makes the correct convertion rate stored, instead of
the currency rate.
Doing that allow us to keep currency rates in the sale_timesheet
reporting test case.
2018-08-24 15:48:26 +02:00
Pragya Ladda 3c4c6b955d [FIX] project: use correct field name for rating
- Description of the issue
  Get internal server error while render page at website side

- Current behavior before commit:
  name field does not exist in rating.rating model
  because of this page should not be render and gives internal server error

- Desired behavior after commit:
  set proper field res_name which is already exist in rating.rating model

Closes #26568
2018-08-24 15:48:26 +02:00
jem-odoo 0c482b07b6 [FIX] web: force formatType for float_time after instanciation
Since in hr_timesheet, we are binding 'timesheet_uom' widget
on existing one (and it might change according to the session
info), we came to the case a formatType is different from the
one of the widget in the registry. Then, the AbstractField
fallbacks on the field type as formatter. Example;
timesheet_uom widget is blind on float_time, but their keys
are differents in field registry, so the formatter will be
'float' and not 'float_time'.

This commit override the formatType determined by the
AbstractField for the float_time widget.
2018-08-24 15:48:26 +02:00
Odoo Translation Bot 10c9f07286 [I18N] Update translation terms from Transifex 2018-08-24 15:22:47 +02:00
Martin Trigaux a183a5125a [I18N] export saas-11.5 source terms
Create the odoo-12 project
2018-08-24 14:34:57 +02:00
Raphael Collet 2f8b12f94b [FIX] base: put email on the right record 2018-08-24 13:39:45 +02:00
Kirti Choudhary 2aa36dd6a2 [IMP] stock: reordering rule hint to run scheduler
Add a warning on the reordering rule to inform the user he may have to run the scheduler manually.

TASK-ID: 1850406
2018-08-24 13:07:06 +02:00
Kirti Choudhary 6f6e262e7f [FIX] sale_order_dates: Adapt error message
The labels of the fields have changed so the error message is not valid anymore.

TASK-ID: 1850406
2018-08-24 13:07:06 +02:00
qdp-odoo 206a0eef72 [FIX] account: usability of bank accounts 2018-08-24 12:12:07 +02:00
Yannick Tivisse 89130b51b4 [FIX] base: Set a default email address for admin
Purpose
=======

Currently, as the admin as no email address, it's now impossible to install
the mail module without demo data, because of the following data:

        <record model="mail.message" id="module_install_notification" context="{'mail_notify_noemail': True}">
            <field name="model">mail.channel</field>
            <field name="res_id" ref="mail.channel_all_employees"/>
            <field name="message_type">email</field>
            <field name="subtype_id" ref="mail.mt_comment"/>
            <field name="subject">Welcome to Odoo!</field>
            <field name="body"><![CDATA[<p>Welcome to the #general channel.</p>
            <p>This channel is accessible to all users to <b>easily share company information</b>.</p>]]></field>
        </record>

Because when creating a mail.message a user error is raised if no email address is found.

    @api.model
    def _get_default_from(self):
        if self.env.user.email:
            return formataddr((self.env.user.name, self.env.user.email))
        raise UserError(_("Unable to post message, please configure the sender's email address."))

In a general way, all the users should have an email address.
2018-08-24 11:58:26 +02:00
qdp-odoo 21ab939b4c [FIX] account: access rights on account.account.tag
Accountants should be able to edit, create or unlink tagsµ
2018-08-24 11:36:26 +02:00
Cedric SnauwaertandAdrien Dieudonné ee5c316817 [FIX] account: reconciliation tour, set the url to use in python
Continuation and ending of 1f848bf.

Before this commit, the bank statement reconciliation still sometimes
crashed.
Each step of the tour waits 10 secs before timeout and in this case,
changing URL may take more time since this commit b0a29c9b because
we added 'debug=assets'. It was probably a mistake.

So, removing this from the URL would probably solve the error but
the second step would always be dependent on the first.
It's why we decided to load the tour with the correct URL defined
in Python.

Co-authored-by: Adrien Dieudonné <adr@odoo.com>
2018-08-24 11:06:24 +02:00
Raphael Collet d72ca98593 [FIX] odoo: db manager configures user_admin 2018-08-24 11:03:24 +02:00
Sébastien Theys 46846d8176 [FIX] various: replace t-field-options by t-options
The syntax changed but those occurrences were not updated.

Task: none
PR: none
2018-08-24 10:46:37 +02:00
Jeremy Kersten ceef32500d [FIX] website_theme_install: mode field in template.ir.ui.view are optionnal
+ remove duplicated arch
2018-08-24 10:42:37 +02:00
Romain Derie f6e4f3aa0f [FIX] website: don't suffix cloned menu/page with 'Copy'
This behavior is useless in the front end (`clone_page`) as people cloning a
page will leave the page with copy in the page name without even noticing it.

Furthermore, creating or copying a website will bootstrap (clone) some pages,
suffixing all of these page by 'Copy'.
2018-08-24 09:21:46 +02:00
Romain Derie 8c701f2c9b [FIX] website: move main_object_request event in website_root
`main_object_request` was added in the navbar widget.
It would not work with `PageManagement` widget as it is added in the
website_root widget and not the navbar.

Moving it to the website_root will make the event accessible when triggering up
the event.
2018-08-24 09:21:46 +02:00
Jeremy Kersten 0cdfc84be8 [FIX] base: fix authentication, wrong login/password raise an error 500
During rebase of 4f6ec1c, we remove accidently a part of aac21e4.
Side effect is that uid was False but success_login True.

Courtesy of @xmo-odoo for help
2018-08-24 09:21:46 +02:00
Christophe Monniez f00f4f3852 [REL] saas-11.5 2018-08-24 08:10:38 +02:00
Raphael Collet c3e8fe5da1 [FIX] test_mail: count for unread notifications 2018-08-23 21:38:57 +02:00
Raphael Collet f67649a6d1 [FIX] website: side effects in get_current_website() 2018-08-23 21:38:57 +02:00
Xavier Morel 568dd8f4c6 [FIX] product, uom: add access rights to system group 2018-08-23 21:38:57 +02:00
Raphael Collet 2f7c03d9ca [IMP] base: add regular user admin as uid 2
User 1 simply becomes a technical user (inactive, no password).
2018-08-23 21:38:57 +02:00
Raphael Collet 7ba9acea18 [FIX] fields: context on Many2many field 2018-08-23 21:38:57 +02:00
William Henrotin d78b6f5e25 [IMP] mrp: block updating live BoM
When modifying a BoM that is used in a MO not done, raise a blocking
warning to avoid inconsistenties at production.

Proudly pair programmed with pim <pim@odoo.com>.

Some mrp tests has been adapted to not raise the new error. They used
demo data while they should created inside the test.

This commit is related to task id : 1855566
2018-08-23 20:32:27 +02:00
RomainLibert dc91e3cb0e [FIX] sale: use m2o instead of integer
The field order_id is a many2one on sale.order and not an integer
2018-08-23 17:44:13 +02:00
jem-odoo 02645a6005 [IMP] uom: sql constraint is better than python one
Since we got 2 constraints checking the same
thing (one python, one sql), it is better
to remove the python one, which is not
very performance friendly in case of huge
import.
2018-08-23 17:28:07 +02:00
jem-odoo 69a898cf8b [IMP] uom: add constraints to force reference factor
When importing big amount of data, user can import
a list of uom. There is no constraint in Odoo to
force the factor to be equal to 1.0 for the reference
UoM in a category.
Onchange is not enought to ensure that constraint,
so this commit adds one in SQL for data intergrity
and to avoid problem in '_compute_quantity'
method.
2018-08-23 17:20:47 +02:00
jem-odoo aa1b7072f7 [IMP] hr_timesheet: Analytic account implies UoM
Since the employee is not required on a timesheet, and that
the employee implies the uom, and that the UoM is required
for the timesheet unit amount to be included in the delivered
quantity of a SOL, we now deduce the uom from the company of
the AA, and not from the company of the employee anymore.
2018-08-23 17:20:47 +02:00
Raphael Collet 5701d93624 [FIX] *: decorator returns on message_post 2018-08-23 17:01:22 +02:00
qsm-odoo 883da1d4d7 [FIX] hr_attendance: fix mistake in linear-gradient rule 2018-08-23 16:45:40 +02:00
jpr-odoo 966a13d03f [FIX] website_forum_doc: BS4, restore search bar design 2018-08-23 16:45:40 +02:00
qsm-odoo 9fc771dd5d [FIX] web: BS4, restore slider checkboxes
Take advantage of the new BS4 checkbox structure to simplify the
widget too.
2018-08-23 16:45:40 +02:00
Christophe Simonis 6fd68c28cd [FIX] core: use actual chrome/chromium executable on macOs. 2018-08-23 16:37:17 +02:00
Florent de Labarre d5357e4488 [IMP] uom: force factor to be 1 if reference unit
The _onchange_uom_type was already making sure it was the case but this
constraint ensure it is always the case.

Closes #25465
2018-08-23 16:29:21 +02:00
Aaron Bohy f6e5bd13d4 [FIX] web: Kanban QuickCreate: create on 'ENTER'
Rev. 241704536d highlighted a bug in the Kanban RecordQuickCreate
widget, when a form view is used inside the widget.

Let's assume a quick create form view with a char field. The user
fill in this field and press 'ENTER' (without focusing out). The
record is about to be created. But first, we have to ask all fields
to commit their value (through 'commitChanges'), in case they
wouldn't have yet. The char field thus notifies its parents of its
new value at that moment. The form controller handles this request
in its '_applyChanges' function, but this is done in its mutex (to
prevent overlapping onchange RPCs). Unfortunately, this leads to a
deadlock as the quick create form controller already executed the
'commitChanges' request in this mutex.

Actually, there is no need for the quick create form controller to
execute the 'commitChanges' request in the mutex, as it is already
properly mutexified upstream. This rev. thus remove the use of the
mutex at that spot.

Note that before rev. 241704536d, the bug didn't occur because the
'commitChanges' function of InputField didn't return a deferred,
and thus the mutex was unlocked directly.

To be complete, let us mention that there are still some
concurrency issues with the quick create widget (like multiple
records creation on double clicks or double 'ENTER' keypress).
Those issues will be tackled in a future commit.

Task 1878977
2018-08-23 16:18:32 +02:00
RomainLibert 3f2bc7b11f [FIX] various: adapt code to new datetime fields
Some code was still using the date and datetime fields as if they were
strings, but they are now dates and datetimes
2018-08-23 16:03:55 +02:00
Swapnesh Shah 0562fc0ffd [IMP] point_of_sale: add domain on field
Make sure the selected tip product is one available in the point of sale

Closes #25406
2018-08-23 16:00:26 +02:00
Mitali Patel ac41cd8195 [IMP] mrp: Change the condition 'and' to 'or' in product variants having the same attribute value
For example: I want to consume a component A if the product is grey OR yellow.
Currently,the component A will be consumed if the product is grey AND yellow. But this variant never exists as grey and yellow are values for the same attribute. So if the values are for the same attribute, odoo should check for a product that is GREY OR YELLOW (and not GREY AND YELLOW).

TASK-ID: 1865604
2018-08-23 15:54:23 +02:00