Commit Graph
140847 Commits
Author SHA1 Message Date
Christophe Simonis 9035fb8a2a [MERGE] forward port branch saas-12.4 up to 618ea1ab67 2019-06-18 10:24:25 +02:00
Robot Odoo 0fc33c37c3 [MERGE][IMP] *_timesheet: customer portal for timesheets
Impacted modules: hr_timesheet and sale_timesheet

This merge provides the customer portal part to display timesheets. Timesheets
can be seen from 3 differents points of view: list of timesheets, timesheets on
tasks, and timesheet linked to invoices (only for delivered qty policy).

When tracking time (sale_timesheet not installed), all timesheets can be displayed
to portal. When sale_timesheet is installed, if the timesheet is billed (billable_type
field), we only display the ones coming from a delivered qty policy selling. Indeed,
it makes no sense to display the 'ordered qty' timesheets, as it can reveal you sold
more time than required to your customer.

To do, we decided to remove access rules for portal user: timesheet (analytic line
model) is now technical and is given with `sudo` to portal. Admin can still restore
some of them to allow third part application with XML RPC.

See subcommits for more details

Task-1932488

closes odoo/odoo#31703

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-06-17 20:15:26 +02:00
Hiral Bhavsar 3cd7ed07a2 [IMP] *: remove 'view_type' on window actions.
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.

Task 1937686

closes odoo/odoo#31243

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-17 11:34:17 +00:00
Andrea Ulliana 3ab5612e4f [IMP] website_forum: add sequences
When you had several forums, they were displayed according to the
creation order. Now, you can define a sequence on them and order forums.

task-2007173

closes odoo/odoo#34184

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-17 11:02:38 +00:00
Sébastien Theys e05442fe19 [IMP] product, *: clean test and demo set up with attribute lines
* = account, mrp, purchase_stock, sale, sale_product_configurator,
stock_account, website_sale

It is always better to create the product template attribute lines before
creating the variants. In a following commit, this will become mandatory.

The variants that are created should always match the combination of attributes
set on the template.

Finally explicitly call `create_variant_ids` when possible instead of reassigning
the attribute lines to implicitly call `create_variant_ids`.

closes odoo/odoo#34122

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-17 10:52:01 +00:00
Sébastien Theys 7316111aaf [FIX] product: better handle of product template copy with variants
Before this commit, copying a template with variants would not copy the
attributes lines, so it didn't work as expected.

closes odoo/odoo#34128

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-14 09:02:37 +00:00
Priyanka Kakadiya 0cf5c87ed7 [IMP] sale_timesheet: show all timesheets related to respective invoices
purpose of the commit is to show the timsesheet related to respective invoice
when invoicing based on delivered quantities,
only show those that have been invoiced

and also allow portal user to see
"(timesheet of visible task OR linked to portal's invoices) AND (billable_type in [billable_time, non_billable])"

task-1932488
2019-06-14 04:49:21 +00:00
Priyanka Kakadiya d74ee9a0cf [IMP] hr_timesheet: added a timesheet for portal user
Purpose of the commit is to add a timesheet section on portal
where you can see all the timesheets and user can see and use the filter
options on them (available when only hr_timesheet is installed)

task-1932488
2019-06-14 04:49:21 +00:00
Priyanka Kakadiya 562997b2bc [IMP] hr_timesheet: remove timesheet rule and access right for portal
Purpose of the commit is to clean the current portal right of
timesheet(analytic account line) and analytic account(no more ir.rule).

the idea is to remove ir.rule since the domain will be difficult with ir.rule
extension mecanism. Moreover, as this is "technical" data, we will use 'sudo' controller.
as we don't want to customize what is shown in portal.
End user is free to create its own ir.rule to connect odoo in xmlrpc
he will be the only responsible for that.

task-1932488
2019-06-14 04:49:21 +00:00
Juhil Somaiya 4642a6fab8 [FIX] sale: activate online payment with all payment methods of config bar
Previously, online payment option was only activated with
options which are predefined such as (paypal, stripe or manual).
but not with other payment acquirer settings

so now online payment will be activated with all the options including
'Pay with another payment acquirer'

Removed deadcode as following,
method _on_save_payment_acquirer as sale_payment module is removed.
method onchange_portal_confirmation_pay as the field
module_sale_payment is removed.

task-1945749
closes: #33384

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-06-12 10:07:44 +00:00
Varun Raval cba643bf2d [IMP] sale: improve backend redirection from a document preview
When both sales & crm applications are installed and a user opens any SO from
sales application and open frontend preview and returned back to edit mode it
will land back in crm rather than in sales application.
So this commit will land back user in sales, not in crm.

task: 1960405

closes odoo/odoo#33375

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-15 06:57:21 +00:00
Prakash Prajapati 7108264fe5 [REV] product: Product variant name should not be clickable.
Because when the user comes from the sales order and click on product
variant name it will redirect on the product template page, so it looks weird.

Revert commit : https://github.com/odoo/odoo/commit/7d581fa66fcd389006dc9330f885eef31aeabe05

task-1968151

closes odoo/odoo#33368

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-17 05:00:42 +00:00
Sébastien Theys 9bdecc7b61 [IMP] product, *: remove deprecated fields and methods
* = mrp, sale, website_forum, website_sale, website_sale_comparison

closes odoo/odoo#34121

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-14 12:17:35 +00:00
Prakash Prajapati cecb3db386 [FIX] generic: fix typo in email templates.
Replace the email template content form if you have any question to if you have any questions.

task-1962924

Closes #33520

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-06-10 07:06:29 +00:00
Christophe Monniez d858e275e3 [FIX] packaging: add missing polib packages
The use of polib as introduced in commit 632fa04.
The nightly packaging system uses Docker to test the packages and they need to
be updated when a new library dependency is introduced.

closes odoo/odoo#34117

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-06-14 07:53:33 +00:00
Rishabh Jadia 5d877e7dd7 [IMP] web: make the summary field mandatory on calendar view.
while creating the event directly from calendar it opens a
quick create with summary field which is not mandatory.

Task-1917002

closes odoo/odoo#31236

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-05-02 05:32:26 +00:00
rhe f54bab69d1 [IMP] point_of_sale: set sales team from pos config
When an invoice is set on a pos config, it is not set on the invoice
generatde from a pos order.

So we are now storing the pos config sale team on the invoice instead of
the default sales team.

TASK-ID: 1998051

closes odoo/odoo#33985

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-06-14 09:15:03 +00:00
qdp-odoo 3309ecbd7a [IMP] account: find easily draft invoices for a partner
Requested in issue #28729

closes odoo/odoo#34114

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-06-14 07:29:27 +00:00
Jeremy Kersten f727cd2645 [IMP] base, model, website[*]: add get_base_url helper
Before this commit, when we want to make an external url, we need to know
if the record is related to a specific website or not, and choose base_url
or website domain.

Now each model have a fonction get_base_url (public to be callable from email
template, ...) and website override this function to add the website domain if
the record is website specific.

closes odoo/odoo#34089

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-13 09:26:54 +00:00
Lucas Lefèvre 22437e331a [IMP] hr_contract: Sync employee and contract calendars mismatch
Purpose
=======

An employee and its current contract should have the same
calendar. Currently, if the contract's calendar is changed,
the employee's calendar is not changed.
In the same way, if a contract is created directly in `open`
state, the employee's calendar is not changed.
Finally, the calendar synchronization when the employee
contract is changed is only done in payroll, for no reason.

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

Fix the three issues described above.

If the employee's calendar is nonetheless manually changed, a warning
should be displayed if there is a mismatch between both calendars.
2019-06-13 10:02:10 +02:00
Romain Derie 55e7b702bb [REM] base, website: remove deprecated code from qweb and bundle
The _get_asset method was deprecated since df4072b0b4
Last use of this deprecated method was removed with d7da1d648c

Also, remains and to_html were deprecated since 9cd982bcc8
test_assetsbundle was still using the deprecated method to test..

Closes #33432

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-06-12 14:02:34 +00:00
Antoine Prieels 283313a06c [FIX] point_of_sale: New IoT Box build dependency
A new dependency (`polib`) has been added in commit:
a7621137cb

Since it is used in the part of the code that is copied to the IoTBox,
we need to add it to the list of packages that are installed during the
build of the image.

closes odoo/odoo#33990

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-06-11 07:38:49 +00:00
Sergio Teruel c470c08e30 [IMP] sale_stock: custom group on so line
Allow to create a specific procurement group for
each so line. The purpose for different group is to
have a specific behavior for each delivery depending
it's group. It also allow to pass extra values to
procurement group creation that would be common between
multiple line (instead of passing the common values to
each lines values argument).

closes odoo/odoo#33765

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-06-12 08:54:50 +00:00
Varun Raval cbd77876fc [IMP] web,mail: support line break in activity feedback
Purpose of the commit is when writing feedback on an activity it
doesn't have a line break in it so feedback was printed in a single line.

After this commit feedback will support line break.

Split the line by '\n' in feedback xml template to avoid t-raw.
Avoid `preventDefault` in kanban record when hitting <ENTER> on a textarea.

Task #1965831

closes odoo/odoo#33212

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-12 09:26:55 +00:00
Pierre Rousseau 047e0ba708 [IMP] iap: align buy credits to the left
In the settings, align the link 'buy credits' to the left.

Task-ID: 2007611

closes odoo/odoo#34027

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2019-06-11 11:52:35 +00:00
MaxLarue 00d0789bd9 [IMP] hr_expense: reduce employee visibility on report creation
When creating or editing an expense report, we have to select the corresponding
expenses. Since it is constrained that these expenses belong to the same
employee as the one from the report, it is not practical to see other
expenses in the dialog when adding them.

This commit extend the domai of the field in the expense report form so
that it doesn't show expenses from other employees.

task #1999537

closes odoo/odoo#33932

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-06-06 07:54:02 +00:00
Kaushalya Mandaliya 8922ab710d [IMP] im_livechat: display country with a known partner name
When talking via the Live Chat to a known partner,
should be able to see his country with his name to avoid checking
the partner view form to get that information.

And improving a test case, in which we're checking for the known partner's
country name along with his name in the chat window title.

task-1940407
closes #31346

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-06-10 04:43:32 +00:00
qsm-odoo d7da1d648c [IMP] website, *: improve customize dialog no-reload updates
* base

Before this commit, if an option was customized thanks to the customize
dialog, the page was not reloaded, only the new scss <link/> elements
were retrieved and replaced in the DOM.
There were two problems with this:
- The <script/> and <style/> tags were also retrieved for no reason (as
the whole result of t-call-assets was returned)
- This made use of a deprecated ir.qweb method that we want to remove
(see https://github.com/odoo/odoo/pull/33432)

This commit removes the use of the deprecated method by improving the
system: only the <link/>'s new URLs are returned on customization.

closes odoo/odoo#34040

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-06-11 16:06:07 +00:00
Jeremy Kersten b5091c7017 [ADD] website: ability to restrict groups on website menu
Courtesy of @Yenthe666

This commit closes odoo#32580

closes odoo/odoo#34039

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-06-11 15:41:25 +00:00
Robot Odoo b4480db386 [MERGE] hr_payroll_account: Group accounting entries on payslips
Purpose
=======

From a busines point of view

Integration with accounting. A period of pay include journal entries and
payments. We need to generate both from a batch.

The entries must be grouped
- 1 line for salaries
- 1 line for all ATN
- ...

Payroll generate a Sepa document to send to the bank

+ as this part is managed by an accountant add menu entries in the
accounting app.

From a functional point of view:

Debit and credit accounts are defined on the rules (hr.salary.rule)
The journal should be defined on the structure to be foced

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

- Usability: the module l10n_be_hr_payroll Should install the accounting
(right now it install invoicing). On the structure, add a journal m2o.

- On rule: add group accouting items on salary rule

- Improve method 'action_payslip_done' to support multiple entries by move.
Generate only one big entry with all payslip. Generate one total line total
for reconciable if group is set.
Now the payslips are no longer calculated individually,
all accounting entries are grouped together when the pay slips are
validated.
This allows you to have a single accounting entry for all validated
payroll records.

- Buttons on batch
- Add 2 buttons on the batch form
- "Create Entry": it will generate a grouped entries according config of
the rule
- "Payment": it generate an xml with all line to send to the bank
See https://www.odoo.com/documentation/user/11.0/accounting/receivables/customer_payments/payment_sepa.html
- Payroll directly generate the xml (no payments in accounting)

- Button on payslips: Everything should be done through the payslips
- create draft entry
- Create SEPA payment xml
- Make appear those buttons on the form only if batch is not set

- Belgian rules for the entries:
- In data for Belgium: https://docs.google.com/spreadsheets/d/1HlnwoExR_O833sij01p7UizSkrMqcm6oF4GvOeIz5lg/edit#gid=0
example of one of our OD: https://drive.google.com/file/d/0B_hhLmdks1wEdXZSQzJIeVBDOXNiNVctczJzUTBQZVBuNkgw/view?usp=sharing

- Create a Journal salaries (type miscelaneous) and apply all structure on
this journal

- Create new accounts to manage this.

- Sepa for payroll should be an option in the setting of payroll
(like in accounting)

- Configure the accounts on the rules when setting a CoA on a company.

Now the payslips are no longer calculated individually,
all accounting entries are grouped together when the pay slips are
validated.

This allows you to have a single accounting entry for all validated
payroll records.

Other notable point in this commit:
- When installing the Belgian Localisation or when installing the
Belgian CoA on a company, configure the accounting data (journal,
accounts on the salary rules)
- Don't create automatically a payslip batch when creating a payslip

TaskID: 1935200

closes odoo/odoo#32924

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-06-12 01:37:45 +02:00
Martin TrigauxandRaphael Collet 8f88570ca1 [FIX] base: proper removal of xmlid after update
Context:
After a module update, the records present in ir_model_data table but not in
self.pool.loaded_xmlids are considered as no longer needed and should be
removed.
An exception is done with noupdate=true entries.

Bug 1:
Entries with noupdate=NULL are not considered in the evaluation and are ignored
while it may be worth deleting.

Bug 2:
Some records with their external id being automatically created are not present
in self.pool.loaded_xmlids and may get removed after updating a module.

By a lucky coincidence, bug 1 make it so that records targeted by bug 2 are
ignored and not deleted (the "automagically" created ir.model.data often lack
a noupdate value).

Fix Bug 1:
Use a COALESCE to find both records with noupdate=NULL and noupdate=false

Fix Bug 2:
Depends on the source of the generated external id:

- ir.model:
The entries created through _reflect_model were not loaded in
self.loaded_xmlids
Use the proper ORM method _update_xmlids that correctly populates
self.pool.loaded_xmlids

- ir.model.category:
The categories were generated when the db was initalised, doing SQL was not
avoidable.
Create the categories in noupdate to avoid it being considered for removal.

- ir.property:
Are always created in noupdate in data files but in stock_account it was
manually created without being in noupdate

closes odoo/odoo#32881

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>


Co-authored-by: Raphael Collet <rco@odoo.com>
2019-06-11 12:04:08 +00:00
Arnold Moyaux 2843dcfaa0 [FIX] mrp: print selected quantity
When using the print unfolded button, it will print only 1 product
and not the selected quantity on the report.

Task: 1939278

closes odoo/odoo#32340

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-06-11 12:44:51 +00:00
Arnold Moyaux 36b976ccee [FIX] mrp: display all information for pdf
mrp_plm in OE uses the child_bom and prod_id from lines obtains
by _get_pdf_line in the case of a pdf report. It was already pass
by _get_bom_lines with the html report. It implies that the pdf and
html report could be different.

Task : 1939278
Closes #32340
2019-06-11 12:44:14 +00:00
Florian Gilbert 9d758e9cfe [IMP] hr_contract: Hide bank account when no partner is set on employee
As the bank account should be linked to the same partner than the
address_home_id, it makes no sense to display it if this field is not
set.
2019-06-11 09:31:56 +02:00
Florian Gilbert 2b5b22dcdc [IMP] l10n_be: Add some accounts in the Belgian CoA
Mainly for payroll purpose
2019-06-11 09:31:56 +02:00
mgh-odoo a8f64e6e22 [IMP] base : Timezone alert
- icon displayed next to field if user haven't set timezone
- added relevant tooltip
- test case added for field not set alert

Task: #1916132
Closes: #29448

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-05-31 06:58:57 +00:00
Damien Bouvy 90af6254ba [FIX] mrp_byproduct: missing oldname
Impacts migrations

closes odoo/odoo#32900

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-04-24 08:53:29 +00:00
Denis Ledoux b71b78035b [MERGE] forward port branch saas-15 up to 0c46c8a929 2019-04-24 10:04:05 +02:00
Denis Ledoux 0c46c8a929 [MERGE] forward port branch saas-14 up to 6fd092e131 2019-04-24 09:31:49 +02:00
Anang 5d0d6e4827 [CLA] Sign Odoo CLA for 0yik
closes odoo/odoo#32896

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-24 07:31:14 +00:00
Toufik Ben Jaa 153f708792 [FIX] hr_holidays: access issue on employee's manager update
- If the current user doesn't have write access to `hr.leave` or
`hr.leave.allocation` and tries to modify the manager (`parent_id`) of
a `hr.employee` record, an access right issue is raised.

This commit fixes the issue.

OPW-2000569

closes odoo/odoo#33542

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-05-21 15:19:26 +00:00
Nicolas Martinelli cdd5b78c63 [FIX] stock: quant of zero with S/N
- Install the sales and stock applications
- Create a stored product tracked with unique S/N
- Create an initial inventory for this product with 2 SN 001 and 002 and
validate it
- Create a SO for 1 unit of the product, and deliver it using SN 001
- Display the product form view

In the form view of the product, the quantity on hand is 1 (correct).
But when we click on the smart button, we see that the Stock location
has a quant for SN 001 and a quantity of 0.

The vacuum should be run when we access the stock information from the
'On Hand' stat button.

opw-1999545

closes odoo/odoo#33687

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-27 12:49:31 +00:00
Jorge Pinna Puissant 904e237d78 [FIX] sale,product_email_template: match the help with the behaviour
Before this commit, the help of the product_email_template module said
that the email is sent when the invoice is paid. This is not the case,
the current behaviour of the module is that the email is sent when the
invoice is validated.

Fine-tuning of : 4b5265b9b9,
10eee18a04
and 33a413eb29

opw-1973946

closes odoo/odoo#33686

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-05-27 12:43:14 +00:00
Nans Lefebvre a98c15f443 [FIX] mail: fix multi-company access rights check when creating activities
When checking the rights when creating a new activity, c38a0d6768
made the choice to bypass the check if the multi-company case.
However the "multi-company case" was determined by checking that
len(target_user.company_ids) > 1; however if target_user.company_ids contains
companies to which the current user doesn't have access, then this is wrong.

Let the active user be Ua in companies C1, C2, currently in C1,
and the target user be Ut in C2, C3, currently in C3.
Then target_user.company_ids == [C2] for Ua, so the check would be False.

This shows that we need len(target_user.sudo().company_ids) > 1.

opw 1998709

closes odoo/odoo#33681

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-27 11:32:56 +00:00
Sébastien Theys 0ac7635b54 [FIX] sale: fix get_combination_info RPC when product_id given
Follow up of 51ef8514ea

The RPC would fail to return the correct value for `is_combination_possible` if
a product_id is given instead of a combination.

opw-2003069

closes odoo/odoo#33677

Signed-off-by: Sébastien Theys <seb-odoo@users.noreply.github.com>
2019-05-27 11:45:18 +00:00
Nicolas Martinelli 72b4469c3d [FIX] account: test if currency not USD
The test assumes that the company currency is in USD. However, if it is
not the case, the test fails.

We make the test more robust by simply checking the amount.

opw-2000681

closes odoo/odoo#33680

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-27 11:15:16 +00:00
Graeme Gellatly 6db361bf6a [FIX] purchase: remove duplicate code
Due to a forward-port, the code updating the vendor_ref has been duplicated
a few lines apart.

Closes odoo/odoo#33334

closes odoo/odoo#33676

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-27 10:03:14 +00:00
Jorge Pinna Puissant f4bb6e5d34 [FIX] hr_holidays: allocation with leave type in hours and with a different mode than 'By Employee'
When an allocation have as leave type hours, and have the mode different
from 'By Employee', the stored duration (in days) is calculated dividing
the filed number of hours by 8 (number of hours per days).
During the validation, an allocation is created for each employee that
match the mode chosen.

In these allocations, before this commit, the number of hours displayed
is calculated by multiplying the stored duration (in days) with the
average number of hours of the employee.
The problem is that in may cases the average number of hours of the
employee is different from 8, and the display number of hours is not
correct.

Now, the number of hours is calculated with 8 when the allocation is
created from another allocation.

opw-1972133

closes odoo/odoo#33675

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-05-27 09:32:24 +00:00
Odoo Translation Bot b24e0441b9 [I18N] Update translation terms from Transifex 2019-05-26 01:15:48 +02:00
Nans Lefebvre 4c3698aa3f [FIX] mail: add all attachments at template onchange
Fine-tuning of 516f22c398.
This commit missed attachments that are linked to a mail.template,
which should be added to every mail sent using the template.

To make sure that we both fix the duplicates and the generation issue,
we add a test.

opw 2000515
opw 1998782

closes odoo/odoo#33653

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-24 13:45:50 +00:00