Commit Graph
127612 Commits
Author SHA1 Message Date
jem-odoo 8b0110df87 [MERGE] sale_timesheet: include expenses in overview
These commit mostly modify the profitability report to
extend it in order to include expense cost of a project.
If analytic entries are created on an analytic account
linked to a project, they will be count as expense
cost for that project.
So, if several project are linked to the same AA, the
same expense cost will appear in all those project
overviews, as they are linked to AA and not project.

This merge also provide test for the reporting view, as
it will probably change in future devs.

Task #49214
Closes #24593
2018-06-11 15:50:13 +02:00
Alexis de Lattre 66182a5645 [FIX] account_bank_statement_import: access right fix
This commit fix an access right issue when a user that belongs to account.group_account_user (and not to account.group_account_manager) imports a bank statement file.

Was PR #25041. Courtesy of Alexis De Lattre (Akretion)
2018-06-11 15:42:01 +02:00
Goffin Simon e15990489c [FIX] mrp: Produced Lot is not updated if multiple productions with the same Lot
Steps to reproduce the bug:

- Create two products P1 and P2 requiring a lot
- Create a BOM B for P1 and requiring 3 P2
- Set on B a routing with a work order
- Create an inventory adjustment with 2 lots for P2:
   - Lot1 with 20 P2
   - Lot2 with 10 P1
- Create a MO for 10 P1
- Start the production and create a current lot Lot3 in Current Production sheet
- Set as current Qty 5 with Lot3 as current lot and Lot1 as Product Lot
- Click on DONE
- Set as current Qty 2 with Lot3 as current lot and Lot1 as Product Lot
- Click on DONE
- Set as current Qty 3 with Lot3 as current lot and Lot2 as Product Lot
- Click on Done

Bug:

When you checked the produced qty on the MO in the Finished product sheet, it only displayed 5 instead of 10.

opw:1849796
2018-06-11 15:19:17 +02:00
Laurent Mignon (ACSONE) 3c628bae49 [FIX] base: allow erp manager to set multi-company on a user
If a user member of group 'group_erp_manager' create a new user and adds
the user in multiple companies, the system raises an AccessError on ir.ui.view

When adding a user in multiple companies, he is automatically added in
the 'base.group_multi_company' group.
Modifying a 'res.group' record recomputes the view architecture.
The ir.ui.view records is writable by 'base.group_system' users.

Closes #21207
2018-06-11 15:04:15 +02:00
Lucas Perais (lpe) bf0fffff44 [FIX] base: rng tree def: js_class must be included
Before this commit, the js_class attribute on a tree arch was not present in the RNG of the tree view.
This is inconsistent with what is done in Odoo, where that attribute is used for kanban views,
is defined in the view_manager to select the widget,
yet unusable for other views.

After this commit, we add this attribute in the RNG to be able to use it in tree views

Linked to OPW 1837565
closes #25088
2018-06-11 15:01:00 +02:00
jem-odoo 92b57a5781 [IMP] sale_timesheet: expense in project plan dashboard
On project overview, user can now see the expense
costs of the analytic account linked to the project.
It also displays the reinvoice amount of those costs
(based on their related SO lines), and computed like
the amount to invoice for invoice.

This commit also provides some tests to avoid problem
when modifying the SQL query of profitability report.

Task #49214
2018-06-11 14:52:04 +02:00
jem-odoo 7724bd0c2f [IMP] sale_timesheet: simplify the profitability report SQL query 2018-06-11 14:52:04 +02:00
jem-odoo 23b8b91fcd [FIX] sale_timesheet: exludes expense service SOL in plan project
In the table of the project overview, we don't want to
see sale lines generated from expenses and vendor bills.
2018-06-11 14:52:04 +02:00
Pratima Gupta 3935bdc3de [IMP] mrp: update mrp tests to the new 'Produce' wizard
New test :
- Create a MO with a finish product tracked by SN with a dozen as
quantity
- Click on produce button in order to open the produce produce wizard
The quantity to do is 1 dozen although the tracking is by serial number

Task #55494.
2018-06-11 14:46:53 +02:00
Pratima Gupta 2678eba0be [IMP] mrp: produce wizard improvement.
This commit makes several improvement in the 'Produce' wizard on Manufacturing Orders
such as :

1) In produce wizard, all components will be visible. (Regardless of tracking)
2) Quantity done will be equal to expected consumption.
3) Produce wizard line data filled from an onchange on final product
4) Reserved column is added to 'produce' wizard
5) When production order is done, we hide the column 'reserved'
6) In produce wizard, if consuming products are not available or in too small quantity,
the lines is displayed red

Task #55494.
2018-06-11 14:43:03 +02:00
Goffin Simon f6d69ff2d3 [FIX] odoo: copy_translation translates the wrong view
With website_version, when publishing a version and copying the current version,
the copy_translation wrote a new translation for the copy of master in the published
view instead of the copied view.

Reason:

When writing in the view, odoo checked in the context the current version and
wrote in the view corresponding to the key and the verion seen in the website.
So when copying a view, it translated the copied view instead of the copy of
the view.

The write is made by the function copy_translation with the line:

   "new_wo_lang[name] = old_wo_lang[name]"

opw:1856150
2018-06-11 13:22:01 +02:00
David 1f30260f85 [FIX] website_form: metadata recording 2018-06-11 13:04:13 +02:00
tslai ada4235582 [FIX] website_sale_wishlist: avoid traceback when product has been unpublished
Before this commit, if you add in your wishlist a product, and that this product
become unpublished, the user will have a traceback.

After this commit, we filter the wishlist product to only show published product.

This commit closes #24857 and closes #24618
2018-06-11 12:56:40 +02:00
Ivan Yelizariev 4f9d9d169f [IMP] website: multi-website snippets with the same key
Allow duplicate snippets to have different versions for different websites

This commit closes #24429
2018-06-11 12:45:09 +02:00
Duc Dao 91bcd84a02 [FIX] account: Only allow admin to set the first invoice sequence
Purpose
=======

When a Access Rights user create the invoice for the first time, when
click save it will raise an access right issue

A user belong to group Access Rights, when he create a invoice he'll
be able to edit 'sequence_number_next'
The reason is he belongs to 'group_erp_manager' which makes _is_admin
return True.

However, he does not have rights to edit on model 'ir.sequence.date_range'.
So that we should not allow him to edit the sequence of invoice in any case

Specification
=============

Since only users belong to 'group_system' can edit model ir.sequence.
We should not allow other users edit sequences on invoice form, so
the field won't be displayed for them to edit
2018-06-11 12:44:11 +02:00
Flavien Chêne a023a55f95 [CLA] signature for Zelwak 2018-06-11 12:14:36 +02:00
Flavien Chêne 8dc3bd4b63 [FIX] website_sale: Correct set 'checked' attribute on variants list
Purpose
=======

In the website_sale.product_variants template, for the "checked" attribute in the radio input,
it must be " checked' if variant_id_index == 0 else None " instead of "' checked' if
variant_id_index == 0 else '' ".

For this moment, it checked the last variant because we get " checked="checked" " for the
first and " checked="" " for the others.

Specification
=============

Use None instead of '' for the checked attribute if it shouldn't be checked.
2018-06-11 12:13:19 +02:00
Pedro M. Baeza 1bf483b047 [FIX] website_event_track: Properly sort tracks on website with P3
On Python 3, dict.keys() doesn't return a list, so we can't sort it, but
converting to a list on the fly before calling to sort() is not going to
change the original dict_keys object. Storing directly the list in the
variable, we get the expected result.

Side note: the daylist2 variable is there just for the t-set and was
already present in the code. Renaming it to dummy would be clearer
but that should not be done in stable.

Closes #25113.
2018-06-11 12:03:38 +02:00
Adrien Peiffer (ACSONE) 31f3687124 [IMP] payment_stripe: Fill email on stripe modal to avoid retyping it
Purpose
=======

Currently, users have to retype email in the stripe payment popup.

For event registration, the email address must be typed 3 times (the first
for the registration information, the second for the billing information
and finally for the payment on the stripe popup)

Specifications
==============

As the email is already filled on billing information view, isn't
necessary to retype in the payment form.
2018-06-11 11:27:49 +02:00
Adrien Peiffer (ACSONE) 52f5bb27ce [FIX] website_event: improve registration modal behavior
Currently there are 3 ways of going out of the modal: clicking cancel
registration, hitting the close button or clicking outside the modal.
The latter one however does not trigger the close event for modals and
therefore buttons of event registration are not reset correctly. This
commit fixes that behavior by preventing to close modal by clicking
outside of it. Buttons should be used and flow is now fixed.

Closes #25174 .
2018-06-11 11:23:28 +02:00
Olivier Colson 042e7862be [FIX] account: properly link bank account created via setup wizard with existing journals when choosing to do so
[IMP] account_bank_statement_import: bank account manual configuration wizard: when linking to an existing journal, change its statements source if the journal had an 'undefined' source.
2018-06-11 11:18:57 +02:00
Simone Rubino 56e8a4a82a [FIX] website_project_issue: put 'view task' button in email to portal users
Commit
https://github.com/odoo/odoo/commit/9e981f6535cc7d8e46bc53ebd279b377c805e6a2
removed the 'view task' button for the groups 'customer' and 'portal'.
Since this button works fine for portal users, we put it back for them.

opw 1849770
2018-06-11 11:07:24 +02:00
Nicolas Martinelli e2ea066360 [FIX] point_of_sale: refresh when qty changed
- In the POS screen, select a product.
- Set the keyboard on "Price" mode
- Change the unit price
- Set the keyboard on "Qty" mode
- Change the qty

The product qty and the total price doesn't refresh until you go to the
payment screen.

We manually trigger a change when the quantity is updated.

opw-1855970
2018-06-11 11:01:18 +02:00
Odoo - OpenERP - Acysos S.L 2d12a361e3 [FIX] base: Navarre official name (#24851)
The official name is Navarra, not Nafarroa

Closes #24851
2018-06-11 10:57:00 +02:00
David 407f52e86c [FIX] website_mass_mailing: Use the correct model to unsubscribe
Purpose
=======

When a contact in a mailing list receives a mass_mailing with an
unsubscription link, then he is automatically unsubscribed once the
unsubscription link in clicked instead of opening the
unsubscription form.

Specification
=============

Now the user can decide wether to unsubscribe or not.

Closes #24969
2018-06-11 10:53:23 +02:00
Gustavo Valverde fc252fa6a1 [FIX] base: specify Dominican Republic formats
Dominican Republic had no formatting for the address, the code country code was
not being evaluated to '1' and the label was set to TIN or NIF, when it should
be RNC.

Address format wasn't regulated, and it's not explicit in the regulation, but
the invoice formats given by the regulators use this formatting
Source:
    http://dgii.gov.do/contribuyentes/personasFisicas/inicioOperaciones/ComprobantesFiscales/Paginas/FormatoDeFactura.aspx

Closes #24820
2018-06-11 10:48:57 +02:00
Rod Schouteden 5c03430d9f [FIX] service: do not break on gevent 1.3
gevent 1.3.0 removed backward compatibility on gevent.wsgi.
make the new path the default

While the recommanded version on requirements.txt is 1.1, a server can not
launched with the 1.3

Closes #24780
Fixes #24779
2018-06-11 10:42:09 +02:00
Rod Schouteden 84ce2ead86 [CLA] signature for schout-it
Done at #24780
2018-06-11 10:42:09 +02:00
jem-odoo 5e9cd951d6 [IMP] sale_timesheet: changing ordered qty update planned hours on task
When changing the ordered quantity on a Sales order line, the
planned hours of its related task will be updated too.
This is obviously applicable for SO line that have created
a task at SO confirmation.
If the SO is cancel, or put in draft state, updating the ordered
quantity will change the planned hours of the task. This operation
is however prevent on locked SO, since ordered quantity is a
protected field.

Task #1856984
2018-06-11 10:39:24 +02:00
Nicolas Martinelli 0d35f569f4 [FIX] point_of_sale: prevent product unlink
- Create a product with variants which can be sold in the POS
- Open a POS session
- Delete a variant (e.g. change the attributes)
- Sell the product in the POS, validate

The POS order cannot be created because the product ID doesn't exist
anymore.

We extend the existing constain on `product.template` on
`product.product`.

opw-1850598
2018-06-11 10:39:18 +02:00
Katherine Zaoral d1d529cbfc [FIX] project: fix warning when archiving still talking about issues, now merged with tasks
Closes #25111 .
2018-06-11 10:35:46 +02:00
David 561ac24ca7 [FIX] website_form: set meta field
backport of 682ae1cc64

Before this commit, if you enable website_form_enable_metadata, that
will crash with a "KeyError: 'meta'"

This commit closes #24888
2018-06-11 10:35:42 +02:00
Nicolas Martinelli 61c9921596 [FIX] mrp_repair: return move with owner
- Create Product A with 5 Unit(s) on hand
- Created SO for 5 Units(s) A, validate SO and picking
- Return of the same quantity, but assign an owner
- Created RMA for 5 Units(s)

A warning generated: 'A is not available in sufficient quantity in ...'.

By assigning an owner on the return, the product is not considered
available. However, this makes sense since we are not owner of the
product, so it should not be valued.

Ideally, we would need a field `owner_id` on the RMA. Since it is not
available, we use `partner_id`. the logic is the following:
- try to reserve with owner_id = partner_id
- if the available qty is not sufficient, try without owner

When the stock moves are created, we apply the same logic to know
whether we need to create the move with an owner. Note that this is not
really sufficient. Ideally, we should reserve the quantity to repair
when we check if the quantity available is sufficient.

opw-1854346
2018-06-11 10:02:09 +02:00
Adrian Torres 9422b3272e [FIX] sale_timesheet: reset service_type on uninstall
`sale_timesheet` adds a value to the selection field `service_type`, if
any product.product or product.templates are set to this new
`service_type` and then the module `sale_timesheet` is uninstalled, the
`service_type` field won't be implicitly reset to the default, existing
value of `manual`, due to this, when accessing a view displaying
product.product records the view will crash and won't be accessible as
long as it contains an undefined selection value.

this commit explicitly resets the field to the base value upon
uninstallation.

opw-1856776
2018-06-11 09:48:20 +02:00
Adrian Torres 503b8ed692 [FIX] *: cleanup (un|re)installation hacks
Replace hacks introduced in V11 by the proper solution.
2018-06-11 09:47:34 +02:00
Adrian Torres b680dac375 [FIX] website: properly unlink res_config_settings recs
res_config_settings.website_id should be ondelete='cascade', however
that is not suitable for stable, so we emulate the ondelete cascade
with an SQL query during ir.model unlink (website uninstallation).

Fixes #25078
2018-06-11 09:45:20 +02:00
Nicolas Martinelli 1ce2536095 [FIX] point_of_sale: vat_label if no country
- Do not set a country on the company information
- Create a POS order, validate

A crash occurs because of an undefined value.

opw-1856267
2018-06-11 08:24:09 +02:00
Nicolas Martinelli e9b21c37f4 [FIX] payment_authorize: state code
According to Authorize.net documentation, the state code should only be
used for United States. For the other countries, use the state name
instead.

opw-1854278
2018-06-11 08:11:39 +02:00
Odoo Translation Bot 9a6ef3c99c [I18N] Update translation terms from Transifex 2018-06-10 07:03:54 +02:00
Odoo Translation Bot 3adeb46cdd [I18N] Update translation terms from Transifex 2018-06-10 04:40:02 +02:00
Odoo Translation Bot 11515e14f7 [I18N] Update translation terms from Transifex 2018-06-10 00:27:35 +02:00
Fabien Pinckaers c0aacce182 [IMP] crm: removed crm.opportunity.report, replacec by crm.lead 2018-06-09 20:53:50 +02:00
Fabien Pinckaers 9690685d65 [IMP] crm: removing object crm.opportunity.report
Use crm.lead instead of a the crm.opportunity.report object for
reporting. This allows to show more fields (e.g. tags_ids). The only
field not accessible in the report is #activities, but there is a
deicated report dedicated to activities.

Improved the default search. Example: when reporting on leads, you want
leads+opps by creation date (and not only leads) as an opportunity has
been a lead created too.
2018-06-09 20:45:09 +02:00
Joren Van Onder e1a9546334 [FIX] event: print time on badge using the event timezone
Otherwise the time is printed using the timezone on the user printing
the badge. This fix is inspired by how the times are rendered by
website_event (e.g. website_event.index).

Using the date_{begin,end}_located fields was considered, but their
formatting is not configurable and they result in lines that don't fit
well on the badge.

opw-1853238
2018-06-08 15:00:37 -07:00
Olivier Colson 27c9705c00 [FIX] test_main_flows: fix tour, to make it work with the new stuff in accounting's dashboard 2018-06-08 22:53:47 +02:00
qdp-odoo 660be186fd [FIX] test_main_flows: let the redbot go green 2018-06-08 20:50:48 +02:00
Olivier Colson b30fed7a7b [IMP] account: facilitate bank account and bank journal config
With this change,
 * some modules are now set to be automatically installed by default
 * the setup bar of accounting has been changed in order to allow more easiliy the configuration of bank accounts/journals (and the step to oversee the opening entry has been removed)
 * the kanban view in the dashboard has been enhanced (mostly for bank journals, but not only)

Was task: 32668
Was PR #23049
2018-06-08 17:48:03 +02:00
Thibault Delavallée c879fb0f00 [IMP] calendar: improve scheduling meeting activities
After feedback from various uses, some improvements are made on the form view
to schedule an activity linked to meeting type

 * renaming the button to be more obvious that the user will be redirected
   to the calendar to schedule the meeting;
 * remove the note field to have a smaller form;

This commit is related to task ID 1819812. Closes #24169.
2018-06-08 17:39:30 +02:00
Thibault Delavallée 6b4ccf3e34 [MERGE] mail, various: make (some) templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.

Main work of this merge is to ease the propagation of setting the
notification layout specification through various layers of mail.thread
post processing and to improve the various templates proposed in several
applications.

Impacted modules in this merge: event and event track, project (including
rating), gamification, product email template.

This merge is linked to task 51122. Closes #24052.
2018-06-08 17:27:25 +02:00
Pratima Gupta e1467490e0 [IMP] sale_coupon: make email templates bioutifoul
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.

Including
  * revamping of coupon email to match current notification guidelines. It
    was using a very strange and different design. We choose to standardize
    it;
  * use the light notification template to encapsulate coupon emails when
    sending them by email;

This commit is related to task ID 51122 (and PR #2060).
2018-06-08 17:11:54 +02:00