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
closesodoo/odoo#31703
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
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
closesodoo/odoo#31243
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
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
closesodoo/odoo#34184
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
* = 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`.
closesodoo/odoo#34122
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, copying a template with variants would not copy the
attributes lines, so it didn't work as expected.
closesodoo/odoo#34128
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
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
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
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>
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
closesodoo/odoo#33375
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
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>
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.
closesodoo/odoo#34117
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
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
closesodoo/odoo#33985
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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.
closesodoo/odoo#34089
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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.
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>
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.
closesodoo/odoo#33990
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
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).
closesodoo/odoo#33765
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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 #1965831closesodoo/odoo#33212
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
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 #1999537closesodoo/odoo#33932
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
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>
* 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.
closesodoo/odoo#34040
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
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
closesodoo/odoo#32924
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#32881
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
When using the print unfolded button, it will print only 1 product
and not the selected quantity on the report.
Task: 1939278
closesodoo/odoo#32340
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
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
- icon displayed next to field if user haven't set timezone
- added relevant tooltip
- test case added for field not set alert
Task: #1916132Closes: #29448
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
- 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
closesodoo/odoo#33542
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
- 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
closesodoo/odoo#33687
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
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
closesodoo/odoo#33686
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
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
closesodoo/odoo#33681
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
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
closesodoo/odoo#33677
Signed-off-by: Sébastien Theys <seb-odoo@users.noreply.github.com>
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
closesodoo/odoo#33680
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Due to a forward-port, the code updating the vendor_ref has been duplicated
a few lines apart.
Closesodoo/odoo#33334closesodoo/odoo#33676
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
closesodoo/odoo#33675
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
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
closesodoo/odoo#33653
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>