Commit Graph
126770 Commits
Author SHA1 Message Date
qsm-odoo 291ea878d2 [REF] website_sale: move editor-related scss in a dedicated file
Part of https://github.com/odoo/odoo/pull/31147
task-1925327
2019-05-28 15:05:42 +00:00
Prakash PrajapatiandMohammed Shekha 77cd665645 [IMP] web: Hide the handle widget in grouped list view
when user in the group by list view it is not allow to change
the sequence of items by drag & drop with the handle widget,
so it does not make sense to display handle widget.

After this commit handle widget will hide in grouped list view.

Task-1964661

closes odoo/odoo#32855

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-04-22 09:17:57 +00:00
Prakash Prajapati b3aab58a59 [IMP] web: Hovering out of a systray menu item closes its submenus dropdown
While hovering in the systray a menu dropdown can only be open if user currently on his parent menu.

It should close when user hover on another systray menu.

Task: #1959678

closes odoo/odoo#32322

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-05-28 14:03:29 +00:00
Romain Derie 04b4818d84 [FIX] website: onchange new record adaptation
Before this commit, when you go on website config settings, you can't save.
This is because the website default lang field is not set anymore (supposed to
be set in onchange), and since it is hidden in the view if only one language,
there is no clue about the error field.

Following d0bb596f1d, x2many fields of new records are new records, meaning
that:
`self.many2one in self.x2many`
is not true anymore since self.x2many is a new record.

Also:
`self.many2one = self.x2many[0]`
is not working as before, the new record is not saved in the many2one

closes odoo/odoo#33716

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-05-28 10:13:36 +00:00
Priyanka KakadiyaandMohammed Shekha d9c33c4c78 [IMP] web: add accesskey 'b' for previous breadcrumb
Also, exclude 'b' for being automatically assigned to buttons

Issue : 1878248

closes odoo/odoo#33689

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-27 13:59:34 +00:00
Varun Raval a61f8c591f [IMP] mail: modify out of office field label on user
Replace name 'out of office' group string from 'Out of Office' to 'Chat Status'.

Replace 'out_of_office_message' field string from 'Out Of Office Message' to 'Message'.

Task 1999697

closes odoo/odoo#33552

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-05-28 09:07:45 +00:00
Robot Odoo 6069ea3fa8 [MERGE] web_editor, *: clean media dialog code
* web_unsplash, website, website_blog

Merge commit for PR: #33509

No big functional change, clean up media dialog code in preparation
of task-1930726.

See individual commits for more information.

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-28 14:17:46 +02:00
Sébastien Theys 5275f16f24 [IMP] web_editor: remove the unused onUpload option
This was introduced in b26ad79a8c
and only used in `addons/web_editor/static/src/js/editor/rte.summernote.js`
at that time.

Then that file has been removed in f296992317

PR: #33509
2019-05-27 16:32:52 +00:00
Sébastien Theys 3924abb71b [IMP] web_editor: make media widget save always return a Promise
Before this commit, the return value would be mixed. For consistency, make it
always return a Promise.

PR: #33509
2019-05-27 16:32:52 +00:00
Sébastien Theys d4b09c1146 [IMP] web_editor, web_unsplash: remove options duplicate attributes
Since a reference to the options is already kept, there is no need to keep a
reference to each option individually.

PR: #33509
2019-05-27 16:32:52 +00:00
Sébastien Theys b0acd056e9 [IMP] web_editor: clean up media file widget selectors
Avoid selectors based on DOM structure, use classes whenever possible.
Register all the selectors in start to avoid searching the DOM multiple times.
No functional change.

PR: #33509
2019-05-27 16:32:52 +00:00
Sébastien Theys 277c30e7e6 [IMP] web_editor, website: clean up media dialog
Restructure the code in a more logical manner. No functional change.

PR: #33509
2019-05-27 16:32:52 +00:00
Sébastien Theys 8ab696dc82 [IMP] web_editor, web_unsplash: split media widget (image & document)
The common code is kept in a generic File widget, while the split allows for
easier customization.

PR: #33509
2019-05-27 16:32:52 +00:00
Sébastien Theys d25d3324e2 [IMP] web_editor: split search out of MediaWidget
The search is not used on VideoWidget for example, so it makes more sense to
split it out of the basic MediaWidget.

PR: #33509
2019-05-27 16:32:52 +00:00
Sébastien Theys e378aebc24 [IMP] web_editor, website_blog: clean up save/saved events
The web_editor had two different events `save` and `saved` doing more or less
the same thing but with a different signature.

In this commit we keep only the `save` event and adapt the code accordingly.

PR: #33509
2019-05-27 16:32:52 +00:00
Varun Raval dece93d5be [IMP] mail: hide integrations tab if no integrations are available
When we're on a channel, we can see the "Integration" tab even if integrations
are not available. So now whenever any integrations are available then only the
"Integrations" tab will be shown otherwise it will be hidden.

task-1973976
closes #33184

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-05-16 05:28:36 +00:00
Priyanka Kakadiya e71f954da3 [REF] purchase,mrp,repairs,stock: enforce uom domain
Enforce the domain of the UOM not by an onchange but by a domain.

Exemple of issue if the domain is enforce by an onchange:
- create a picking
- add a move
- select the product
- select an uom
> the uom presented are the one from the product category.
-Save
- edit
- select an uom
> all UOM are presented even the ones of other categories

This commit enforce this new logic at most places.

task: 1886272

closes odoo/odoo#33083

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-28 08:36:58 +00:00
Deiber Rincón 818ff8c406 [IMP] point_of_sale: use more unique identifier
When custom modules load a different partner field set for a completely
unrelated purpose AND this loading takes place prior to the stock odoo
one, then the load_new_partners method will infer the wrong field set
as the first in row hit is returned by _.find.

It is not optimal code quality to use `res.partner` as if it was a
unique identifier, while not inhibiting multiple loads of on a single
model.

Adding a (more) unique label and refer it in the find solves this
problem and makes the code more robust.

closes odoo/odoo#32351

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-28 09:54:56 +00:00
Jigar Patel 9bd647ac88 [FIX] web: avoid flickering when click on action defined using href tag
Before this commit,
Defining action using <a type="action"> outside of normal views(like qweb view)
css style does not apply to it because missing the href tag. by defining href
tag on a link will first open home screen then perform do_action thus it will do
flickering.

After this commit,
Prevent event default behaviour so it will stop flickering and restore css style
for action by defining href tag on it.

closes odoo/odoo#33703

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-28 06:40:33 +00:00
Xavier Morel 16cd987a53 [IMP] validation error messages through optional use of jing
A long-standing issue with data files is that lxml (libxml2) has
trouble reporting useful errors, often going no further than "the file
is not valid" (libxml2 apparently has issues reporting useful errors
within non-trivial <choice>, which Odoo's data file schema makes
extensive use of) e.g. if a data file has some stray text in an
unexpected place (in this case, after a `</field>` tag in a
`<record>`), libxml2 will report:

ERROR:RELAXNGV:RELAXNG_ERR_EXTRACONTENT: Element odoo has extra content: data

Jing (the reference implementation) provides significantly better
error reporting:

error: text not allowed here; expected the element end-tag or element "field"

It's in java which is inconvenient and expensive for baseline
validation (and as a hard dependency), but there's now a "jingtrang"
package which bundles the relevant jars & invocation on
pypi (https://pypi.org/project/jingtrang/), making for a convenient
optional dependency for better development experience.

closes odoo/odoo#33666

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-27 06:58:48 +00:00
Kaushalya Mandaliya 9b823c9c6a [FIX] stock: traceability report printed version and backend view
Before this commit:
Print button was hidden in traceability report from commit: 9378552a89

After this commit:
Print button is visible.
Removed a css rule which caused horizontal scroll in pdf report.
Also removed unnecessary and redundant styles.

Task-1974338
Closes #33289

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-21 09:35:59 +00:00
Kaushalya Mandaliya f2bd331e08 [IMP] stock: making traceability report full-width in backend view
Task-1974338
2019-05-21 09:35:59 +00:00
Kaushalya Mandaliya 7b65e6c6bb [FIX] stock: no formatting while printing traceability report for the first time
While generating the traceability report for the first time,
if the assets are not in cache, the report will be having simple markup with
no styles applied. To workaround this issue, we manually commit the writes
in the `ir.attachment` table. It is done thanks to a key in the context.

Task-1974338
2019-05-21 09:35:59 +00:00
Xavier Morel ff02bf1137 [REM] multi from ir.actions.act_window
Task 1843603

* src_model is redundant with binding_model_id
* multi -> binding_view_types (if empty => all views) (maybe should be
empty by default yo?)
* in convert, type => rec.get(type) but no @type possible on <act_window>...
* removed deprecated auto_refresh & auto_search (not used anywhere (?))

closes odoo/odoo#24738

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-27 12:00:39 +00:00
William Henrotin 6bc26ff5e9 [IMP] mrp: alternative workcenters
Purpose: link workcenters that can do the same job together.
Planning a workorder will be done by choosing, among the similar
workcenters, the one that will finish the production the soonest.

This commit adds a new many2many field on the mrp.workcenter
model. Planning the workorders will:
1. Loop on the operation's workcenter and all the alternative ones.
2. Compute the first available work slot for each of those workcenters.
3. Choose the soonest finished slot

Furthermore, planning workorder is done thanks to the resource module.
Each workorder is saved on its own workcenter calendar by a resource.calendar.leaves
The two date fields are thus computed from the leave date.

Task : 1892819

closes odoo/odoo#33018

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-28 06:50:58 +00:00
William Henrotin 2c299e7b21 [REF] resource: relax ir rule on leaves
The field user_id on resource.resource is optional but the access rules
on resource.calendar.leaves request that field set. Which means a user
can only see his own leaves but not the ones of a machine's calendar for.
instance

This commit relax those rules to give access to the user's leaves and the
one not assigned to a specific user

Task : 1892819
2019-05-28 06:50:00 +00:00
Jigar Patel 9ab3270c5a [FIX] web: avoid flickering when click on action defined using href tag
Before this commit,
Defining action using <a type="action"> outside of normal views(like qweb view)
css style does not apply to it because missing the href tag. by defining href
tag on a link will first open home screen then perform do_action thus it will do
flickering.

After this commit,
Prevent event default behaviour so it will stop flickering and restore css style
for action by defining href tag on it.

closes odoo/odoo#33703

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-28 06:40:33 +00:00
Xavier Morel 10f1a1a0c4 [REM] multi from ir.actions.act_window
Task 1843603

* src_model is redundant with binding_model_id
* multi -> binding_view_types (if empty => all views) (maybe should be
empty by default yo?)
* in convert, type => rec.get(type) but no @type possible on <act_window>...
* removed deprecated auto_refresh & auto_search (not used anywhere (?))

closes odoo/odoo#24738

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-27 12:00:39 +00:00
William Henrotin 0679d0d542 [IMP] mrp: alternative workcenters
Purpose: link workcenters that can do the same job together.
Planning a workorder will be done by choosing, among the similar
workcenters, the one that will finish the production the soonest.

This commit adds a new many2many field on the mrp.workcenter
model. Planning the workorders will:
1. Loop on the operation's workcenter and all the alternative ones.
2. Compute the first available work slot for each of those workcenters.
3. Choose the soonest finished slot

Furthermore, planning workorder is done thanks to the resource module.
Each workorder is saved on its own workcenter calendar by a resource.calendar.leaves
The two date fields are thus computed from the leave date.

Task : 1892819

closes odoo/odoo#33018

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-28 06:50:58 +00:00
William Henrotin 6fad651883 [REF] resource: relax ir rule on leaves
The field user_id on resource.resource is optional but the access rules
on resource.calendar.leaves request that field set. Which means a user
can only see his own leaves but not the ones of a machine's calendar for.
instance

This commit relax those rules to give access to the user's leaves and the
one not assigned to a specific user

Task : 1892819
2019-05-28 06:50:00 +00:00
Davor Bojkić 6dde6b98a5 [IMP] fleet: replace hardcoded ids by reference
More stable to changes

closes odoo/odoo#32960

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 16:15:33 +00:00
Pierre Masereel 3345056c5c [FIX] point_of_sale: fix syntax error
When calling function AND from expression, two arguments are given
instead of one.

closes odoo/odoo#33693

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-27 14:08:08 +00:00
Prakash Prajapati 9181133c1b [FIX] website_crm_partner_assign: fix layout related to lead on the portal
After this commit, lead portal layout alignment looks the same as another portal
layouts like an opportunity.

task-1946124

closes #33610

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-23 05:08:34 +00:00
Shreya Modi 393a824d66 [FIX] product: change in product name
we have changed the product name from Sale Description to
Description For Customers considering the same logic used in
other product namings and to make it more readable.

task-1987076

closes odoo/odoo#33554

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-23 11:27:06 +00:00
Swapnesh Shah ae92cddf60 [IMP] base: correct fields labels
Typos and grammar

closes odoo/odoo#33544

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 15:42:09 +00:00
Yannick Tivisse d83890dd14 [IMP] hr: Display certificate on employee form
closes odoo/odoo#33496

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-05-27 14:06:11 +00:00
Swapnesh Shah 316b33c869 [IMP] web: correct typo
closes odoo/odoo#33070

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 11:02:07 +00:00
Parth ChoksiandMohammed Shekha 745c7384e0 [IMP] base: notify user when there are modifications in settings
When user will modify something in settings, there will be a message
shown that will tell the user that he/she has unsaved changes.

task-1917637

closes odoo/odoo#31900

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-27 09:13:08 +00:00
Christophe Monniez ad2feb07f0 [FIX] base, account: allow AllL10n test case to start
Since a5b6f31, an attribute allowed_company_ids is set on request when
calling the module button_immediate_install method.
This method is called during the test TestAllL10n which does not have a
bound request and makes it fail.

With this commit, the attribute is set only if request is bound.

By the way, a small improvement is added in the test.
Before this commit, when the test was failing  because of the
button_immediate_install, it was immediately stopped.

The same problem was arising during the test method, it was stopped at
the first failure.

As this test is run as a nightly test, one have to wait the next day to
discover the next problem.

With this commit, the exceptions are catched during the l10n_ modules
installation and a simple error line is written in the logs. That way,
the runbot will still detect the error.

Also, the main test method that installs all the chart of accounts
splits those install into subtests. This prevent the method to stop at
first failure.

closes odoo/odoo#33654

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-05-27 09:17:21 +00:00
mreficent 27c0da9cb9 [IMP] website_livechat: correct typo in a template id
Was livecaht

closes odoo/odoo#33446

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 09:31:56 +00:00
wan 3c67bb20fe [REF] account_analytic_default*: split into multiple modules and add support for PO
Move the SO part in a new module
Add the functionality to PO

Task 1945220

closes odoo/odoo#33282

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-05-24 09:24:17 +00:00
Prakash PrajapatiandMohammed Shekha 4107dc11de [ADD] web: Allow to add multiple records in m2m_tags widget.
Before this commit when user want to add multiple record at that time
they only allow to add one record at a time.

After this commit user can add multiple record from search more wizard.

Added function _getSearchCreatePopupOptions so that it can be overridden
in FieldMany2ManyTags, options for FieldMany2ManyTags will differ, like
FieldMany2ManyTags SearchCreateDailog should have multi record selection,
Many2ManyTags' SelectCreateDialog should display record other than selected

This commit is related to task id: 1945912

closes odoo/odoo#32453

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-05-22 13:43:44 +00:00
William Henrotin 199bb65b42 [IMP] mrp: rename final_lot_id
Commit 5ef46664a2 share code between produce
wizard and workorder. Field final_lot_id is now commonly used but not very
well named. This commit rename it into finished_lot_id as it represent the
lot number of the finished product.

Task : 1998064

closes odoo/odoo#32761

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-27 07:45:07 +00:00
rhe f17beeef4b [FIX] sale: Adapt sales count on product
When the sales count on the product form doesn't take into account the
sales done in point of sale.

So we've extend the list of done states to take the ones from point of
sale.

TASK-ID: 1985493

closes odoo/odoo#33422

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-24 09:04:46 +00:00
Xavier Morel 0e1a471144 [IMP] web: warn admin on login if their password is "admin"
* We want to limit the obtrusiveness of the mechanism & at the same
time show the warning immediately, so send the warning through a
private channel between the superuser and the admin user rather than
the regular mail.thread's message_post which would likely send the
warning though email.
* Ignore issue when the request comes from a "private" IP (likely a
local dev box where it doesn't matter).
* Only check for "admin" on the admin user: passwords created manually
are already length-checked (required) and strength-checked (visual
indicator).

Task 31122

Supersedes #22428

closes odoo/odoo#33254

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-05-13 12:08:53 +00:00
Robot Odoo 079fcd6232 [MERGE][IMP] project, *_timesheet: link analytic account and project
Impacted modules: hr_timesheet, project, sale_timesheet and sale_timesheet_purchase

Currently, the link between the Analytic Account and the Project is non existant if
Timesheets is not installed, and we track any cost linked to the AA set on the Project,
but we only track the revenues linked to Timesheets.

The purpose of this merge is to allow simple project (no timesheet installed or
activated) to track their costs and revenues. This is done through the analytic account; indeed, all
purchase order, sales order, invoices and vendor bills can generate analytic entries. It could
then be interessting for user to see the costs and revenues for a project.
We decided to redirect user from the project dashboard to the "costs/revenues" action of the analytic
account itself, or (if timesheet is allowed on project) to the overview.
This commit also integrates purchase orders on the project overview.

Implementation:
This PR aims to improve the link between Project and Analytic Accounting, by several actions:
* Move all the analytic account business to project
* Add an Other Revenues field in Project Overview,  which represent the positive analytic entries
from the AA set on the Project AND that are not linked
to a Timesheet
* Add two smart buttons on Project Overview to Purchase Orders and Vendor Bill of the project's AA
* Add the results (Sales Orders and Timesheets) linked to the project's AA in the respective smart
buttons of Project Overview
* Add a "Profitability" link on the Kanban card of the Project bringing to the Costs & Revenues of
the AA set on the Project to allow profitability tracking when there are no Timesheets.

To do so, it was required to move back the analytic dependency from hr_timesheet to project, like
before 3dd3e26483 (but without the inheritS).

Limitation:
This will only make sense for project having a "one-to-one" relation with analytic account. If 2 projects
are linked to the same AA, we have no way to deduce from which project the cost entry is linked.

Task-1975022

closes odoo/odoo#33237

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-24 14:15:52 +02:00
Lucas Perais (lpe) af86bc7288 [IMP] point_of_sale: restrict print sale datails
Have two pos config opened, with at least one connected to a POS box with a printer
Do some sales on both
Click on the printer icon in the pos UI to print today's sales

Before this commit, the ticket that was printed contained sales for
both point of sales

After this commit, it only contains sales of the point of sale from which
the print request has been sent

OPW 1958885

Before this commmit everyone could print the sale datails for all day
for the current PoS Config from the UI.

After this commit cashiers can only print the current session,
disregarding the date.

TASK-ID: 1978713

closes odoo/odoo#33036

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-24 09:51:01 +00:00
Geoffroy Larue 3ab9b5192c [IMP] project, sale_timesheet: usability
Fix a tiny typo in project and rename two fields in Project Overview
to improve usability.

Task-1975022
2019-05-24 09:46:46 +00:00
Geoffroy Larue 5837b6c320 [IMP] project, hr_timesheet: profitability link
In order to improve the tracking of costs and revenues on projects,
this commit adds a "Profitability" link on the Kanban card of the
Project which appears for analytic accounting users when the
"Timesheets" / "Overview" link does not appear.

This link brings to the  tree view of the lines from the analytic
account linked to the project.

Task-1975022
2019-05-24 09:46:46 +00:00
Geoffroy Larue f3999314af [ADD] sale_timesheet_purchase: bridge module
Add two smart buttons in project overview : purchase orders and vendor
bills, linking purchases and bills pointing to the project's analytic
account.

Task-1975022
2019-05-24 09:46:46 +00:00