Commit Graph
123266 Commits
Author SHA1 Message Date
Jeremy Kersten 1e1ea00e66 [FIX] website_forum: avoid traceback on ack notif
Before this commit, notification_read raise a traceback on some button click.
Eg: Flag/unglaG

It was hidden in the console, but we can just avoid it too

closes odoo/odoo#30524
2019-01-23 17:03:04 +00:00
Jeremy Kersten 7805c55b0c [FIX] website_forum: small ui fix
Force image to stay in their container (img_fluid could be removed by end user)
Stop to use row_users
    now that we use bs4,
    allow to be more responsive,
    force height to be the same for each card.
Small imp replacing multiple if by elif
Decrease big margin between questions
Place tag on the top (if you have many tag, or very long, the ui is broken)
2019-01-23 17:03:04 +00:00
Jeremy Kersten fe62c45e70 [FIX] website_forum: use same dom for all icon
Before this commit we try to imitate the btn with the form (eg. flag button)
But if you style in a theme your button and not the form (like odoo.com) you
will see a difference between the 4 icons.
2019-01-23 16:35:32 +00:00
Jeremy Kersten c2b4ff9d4e [FIX] website_forum: prefix forum css rule to avoid side effect
prefix class where forum is not specified in the classname to
avoid to have some element on others pages that are stylized.
2019-01-23 16:35:32 +00:00
Jeremy Kersten fccef8d191 [FIX] web,website: use correct variable to define h* size + force fa font
if you have some style e.g. on btn, and use class="fa fa-bug btn btn-sm" the
icon will be rendered with font-family style of btn
2019-01-23 16:27:24 +00:00
Jeremy Kersten a172e4ab77 [FIX] im_livechat: typo 2019-01-23 16:27:24 +00:00
Jigar Vaghela 451fd6cc90 [IMP] l10n_in: Improve Indian localization to supports GSTR-1 reports
Purpose
=======

GST Invoice Report required to show tax amount product line wise.
This Tax amount is divided in CESS and IGST or CGST and SGST.

Improve GST Tax, Tax Groups and Tag.

Reverse charge under GST
As per GST rules tax will have to be paid directly by the receiver to the Government instead of the supplier.

Reseller(E-commerce) under GST
If you sale through ecommerce then need to specify ecommerce GSTIN.

Import/Export goods under GST
If you export the goods then need to specify
    -Export Type
    -Shipping bill number
    -Shipping bill date
    -Shipping port code

Credit or Debit Note
If u give Credit or Debit note then need to specify Refund reason.

Place of Supply is the state of customer.

Added GSTR reports

GSTR Invoice report covers below GSTR-1 sections(this report is grouped by tax rate and journal entries
B2B, B2CL, B2CS, EXP, CDNR and CDNUR

GSTR payment report
This report is covered under GSTIR-1 section called AT(advance payment) and ATADJ(advance payment adjustment)

GSTR HSN report(it is based on the product HSN code)

GSTR Exempted report(it is based on nil rated and exempt tax)
This report is covered under GSTIR-1 section EXEMP

Added demo data to to have GSTR-1 reports out of the box

Solution
========

fetched values of CESS, IGST, CGST and SGST amount in invoice report from tax groups

added new taxes called "Nil Rated" and "Exempt" and also added it's related tax groups and accounts
added tax tags related to GST tax percentage

Set Reverse charge in negative tax

Improved account move line creation grouping machenism:
Now, move lines related to tax are grouped by product and uom instead of grouping them just by tax(this is for better reporting)

closes odoo/odoo#30332
2019-01-18 08:35:33 +00:00
Jigar Vaghela 8c0d62082f [REF] account, invoice: allow to alter grouping key of account.invoice.tax
Needed for the indian GST, or any localization that adds fields on account.tax.

  Was part of PR #26262
2019-01-18 08:35:22 +00:00
Jigar Vaghela 32f39fe2d9 [REF] account: add _prepare method in bank stmt reconciliation
_prepare_payment_vals() will prepare the dict of values to create the payment from a statement line.

  Was part of PR #26262
2019-01-18 08:35:08 +00:00
Jigar Vaghela 7c4fe6b3f2 [FIX] account: invoice validation with complex taxes with children
The field tax_ids on account.move.line created from an invoice was incorrect in case of a tax with children with type_tax_use!= 'none'. Hence, the tax_base_amount and the whole tax statement was wrong in that specific case.
Was part of (although not related) the PR #26262
2019-01-18 08:34:56 +00:00
Jigar Vaghela 86e90fcbea [REF] point_of_sale: refactoring of journal entries creation
* Allows to overwrite and change the account.move.line values that will be created upon a pos session closing for example to add additional data introduced by a localization module.
 * Small refactoring of _create_account_move() method: All the parameter values of _create_account_move could easily be found from pos.order recordset itself, hence removed them and adapted call to it everywhere.

Part of PR #26262 related to the indian GST
2019-01-18 08:34:32 +00:00
Martin Geubelle 212ca45660 [FIX] web, *: restore context key on search view field
Since the control panel refactoring, the `context` key on a `<field>` in the
search view was ignored (like <field name='pricelist' context="{'pricelist': self}".

The previous behaviour has been reintroduced and modified a little bit.

For way too long, an ugly hack was used to get a numerical value in self. This
ugly hack was still present but wasn't working since 8.0 (at least for the
numerical value). A counter hack (see odoo/odoo@4a81e8a) was then applied to
avoid really using a `selection` widget. To get even more confused, `self` was
replaced by the *last* user-specified value.

Well, it's time to clean this mess.

Now, the `self` key is replaced by an array of user-specified values (by value,
we mean the field value i.e. the `id` for a many2one, or the `key` for a
selection field).

Task 1902826

closes odoo/odoo#30368
2019-01-18 16:06:44 +00:00
Martin Geubelle 02d3655c7d [FIX] web: allow to build the doc
A wrong docstring was preventing the doc to build correctly.
2019-01-18 16:06:21 +00:00
Jeremy Kersten 199adbd0e1 [IMP] crm: revert renaming of subtype
Seems better to have wrong term for lead an correct for opportunity
that have not wrong for Lead an not wrong for Opportunity.

task-1932070 related to b6f4d97

closes odoo/odoo#30482
2019-01-23 13:59:00 +00:00
Jeremy Kersten b1f8d4fb6c [FIX] crm: track type on crm.lead
Until now, you cannot find easily if it is a lead or an opportunity that
 has been created.

"Opportunity created" is written in the log but it is in reality a Lead.

Now we track the change on the field type to know what was the type at the
creation AND when it has been converted to opportunity.

task:common-sense-in-real-life
2019-01-23 12:01:58 +00:00
Yannick Tivisse 3857473b57 [FIX] hr_contract: Reintroduce 'Contract Template' menuitem
closes odoo/odoo#30479
2019-01-23 14:03:23 +00:00
Jeremy Kersten 3a4b5164b1 [FIX] website: missing replace from type to redirect_type
website.redirect feature is broken since commit 2924b77

related to odoo/odoo#27599 and odoo/odoo#28112

closes odoo/odoo#30446
2019-01-22 15:02:58 +00:00
Odoo Translation Bot 0efff5f030 [I18N] Update translation terms from Transifex 2019-01-21 16:49:26 +01:00
Christophe Simonis 9d2e201692 [FIX] web: correct forward-port 2019-01-18 17:03:46 +01:00
Christophe Simonis d31306e07a [MERGE] forward port branch 12.0 up to 6e5ac01160
Also contains fixes for previous forward-port.
2019-01-18 16:18:17 +01:00
Christophe Simonis 6e5ac01160 [FIX] web: correct forward-port of 187c32c2c7 2019-01-18 15:27:22 +01:00
Christophe Simonis 7276e8203e [FIX] purchase: correct previous forward-port.
Domain was apply on the wrong model.
2019-01-18 14:37:51 +01:00
Christophe Simonis a337b9ec92 [MERGE] forward port branch 12.0 up to f854e01a98 2019-01-18 14:26:33 +01:00
Christophe Simonis f854e01a98 [MERGE] forward port branch saas-11.3 up to 4aa153e65c 2019-01-18 10:58:41 +01:00
Nicolas Seinlet f8e37d6a80 [IMP] improve overridden sql constraints support
If module A define an sql constraints and module B, which depends on 
module A, override the sql constraint, we must ensure having only the 
last definition in constraints list. Having the two versions in the list
makes the ORM continuously trying to drop the second version by the 
first one, then recreate the second version, when performing operations 
like an upgrade a module B.

An illustration of this is the login_key on res.users, which is unique
per login in base, but unique per (login, website) in website.

closes odoo/odoo#30334
2019-01-18 09:20:02 +00:00
Christophe Simonis 4aa153e65c [MERGE] forward port branch 11.0 up to 19558129f0 2019-01-17 20:49:36 +01:00
Christophe Simonis 19558129f0 [MERGE] forward port branch saas-15 up to c0471dd857 2019-01-17 19:07:34 +01:00
Christophe Simonis c0471dd857 [MERGE] forward port branch saas-14 up to 17adccd95c 2019-01-17 18:07:26 +01:00
Christophe Simonis 17adccd95c [MERGE] forward port branch 10.0 up to 50bae1c0c5 2019-01-17 17:08:39 +01:00
Julien (juc) Castiaux 71c4c13996 [FIX] web_editor: save less file
Modifying less files and saving them using the web editor can raise
and error. The error is due to the way odoo save the modified file.

It extends the view containing the URL of the file by filtering views
related to the xml bundle id and keeping those that have the said URL
in their content.

This lookup fails to give just one result in case there are multiple
file containing the said URL. This fix change the filter from a
bare `if url in view.arch` to a correct xpath lookup.

The "/web/static/src/variables.less" less file was one of the
problematic files.

opw-1889794

closes odoo/odoo#30186
2019-01-17 15:19:54 +00:00
Nans Lefebvre ba41c3c1cc [FIX] base: disable prefetching during module uninstall #2
Create any module that inherit 'res.lang'.
Define any new field that is added with that inheritance.
Install that module. Then try to uninstall it. Traceback ensues.

When trying to write 'state': 'uninstalled' on the module,
the prefetching tries to read a column that has been deleted
by the _module_data_uninstall.

opw 1917369

closes odoo/odoo#30176
2019-01-17 15:08:31 +00:00
Jorge Pinna Puissant e6b5a0e2eb [FIX] payment: Acquired deployed in production
Before this commit, in the config bar (Sales or Invoicing) when you configure a payment
acquirer,  it was deployed in test mode, and not in production mode. Note that, the config
bar wizard asks for the production credentials.

Now, when you configure a payment acquirer, from the config bar, the acquirer is deployed
directly in production mode.

opw-1918412

closes odoo/odoo#30319
2019-01-17 14:25:25 +00:00
Denis Ledoux 8865d63134 [FIX] res_partner: a partner is portal if he has no employee users
Currently, a partner is considered a portal
if he has no users
or
if at least one of his users is portal.

This causes problems if an employee has two users,
one portal, one employee
and gets notified in a thread (e.g. @ Marc demo):
The email sent won't contain the action buttons (e.g. view opportunity)
because the employee is considered as portal.

A partner of an employee can have multiple users
linked if at some point two partners were merged,
and the partners had each a user, one a portal
and the other an employee.

This revision changes this behavior,
to consider a user as not portal (employee)
if one of its users is not a portal (an employee).

This is uniform with to the behavior of the
`share` field of `res.users`,
which is `True` when the user is part of the group employee.
```
user.share = not user.has_group('base.group_user')
```

opw-1914103

closes odoo/odoo#30314
2019-01-17 13:08:35 +00:00
Nicolas Martinelli 4da161244d [FIX] stock_account: ctx after group by
- Set valuation to FIFO
- Make a PO for a product
- Validate the picking
- Execute the Inventory Valuation report
- Apply group by Category
- Click on the 'Valuation' info button

A traceback occurs because of the usual `group_by` context key which is
kept.

opw-1918915

closes odoo/odoo#30313
2019-01-17 13:00:47 +00:00
Lucas Perais (lpe) 0dd38282c3 [FIX] crm: test lead from email needs second company
Because of a742813c36fc8cdf4e41c72e00944b6901be6017.
Apparently when crm is installed alone, there is only one company

closes odoo/odoo#30312
2019-01-17 12:53:08 +00:00
wan 50bae1c0c5 [FIX] account: journal dashboard graph wrong value
OPW 1918926

Current behavior:
  The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values.

Desired behavior:
  There is no override of the values correctly computed.

closes odoo/odoo#29936
2019-01-17 12:37:36 +00:00
Lucas Perais (lpe) 187c32c2c7 [FIX] web: pivot correct context after reload
Open a pivot view with default filters automatically activating
Disable those filters

Change the groupBys on the rows and cols of the pivot

Save your result as a favorite filter

Before this commit, the filter did not contain the context information for columns groupby
Also, the search view did not exploit the context of the new filter as it should be

After this commit, the flow works as expected

OPW 1913732

closes odoo/odoo#29415
2019-01-17 12:37:25 +00:00
Jorge Pinna Puissant 91fb15510f [FIX] hr_timesheet: task view in mobile
Before this commit, there were not specific view for the mobile devices.
The analytic account views were used.

Now, there are specifics views for the timesheet in the tasks.

opw-1913371

closes odoo/odoo#30309
2019-01-17 12:26:20 +00:00
Hardik Prajapati 81c090751f [FIX] mrp: Barcode on Manufacturing Order Report
opw-1925956

closes odoo/odoo#30304
2019-01-17 12:17:33 +00:00
Nans Lefebvre 01cd87794d [FIX] web: remove the report_layout from studio selectable widgets
Open studio to modify the widget displaying a relational field.
The report_layout widget can be selected, say, to display payment terms.
Obviously it doesn't make sense.

We remove its supported field, as the field is not generic
(indeed there is only one use for it in the codebase).

opw 1919369

closes odoo/odoo#30303
2019-01-17 10:19:23 +00:00
Lucas Perais (lpe) 15cd94b746 [FIX] base: merge contacts linked to by an o2m field with caps
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)

create two objects of that class, each one linked to a different partner with the new o2m

merge the partners

Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name

After this commit, the second object still exists

OPW 1925060

closes odoo/odoo#30300
2019-01-17 12:30:20 +00:00
qsm-odoo 606bae9e92 [FIX] web_tour: ensure Tip template is loaded
The 500 page has `session.is_frontend === undefined` as it has its own
whole HTML template.
In that case, the ajax.loadXML is not done, making the tour crash when
visiting a 500 error page.

This is needed for #29957 that has a test tour on 500 error page.

closes odoo/odoo#30240
2019-01-17 11:53:09 +00:00
pha-odoo 649ea4927e [FIX] hr: move print_employee_badge to the hr module
closes odoo/odoo#30302
2019-01-17 09:59:57 +00:00
Lucas Perais (lpe) ba39efdfc6 [FIX] base: merge contacts linked to by an o2m field with caps
Define a field on a model as:
- o2m to res.partner
- the field's column, hence its name, has capital letters in it
(studio does that)

create two objects of that class, each one linked to a different partner with the new o2m

merge the partners

Before this commit, the object linked to the second partner, was deleted
This was because merge partner sql requests did not quote the column name

After this commit, the second object still exists

This commit is tested in v12.0 with PR #30300 only. In v10.0 it is not testable as
the model concerned is in CRM, and that no new fields in business modules can be added in stable

OPW 1925060

closes odoo/odoo#30301
2019-01-17 09:59:23 +00:00
Christophe Matthieu 586dc9e025 [FIX] web: can reopen ModelField selector widget
Before this fix, in studio when the user select the field then focus out
then focus in and selected a child field, an exception is triggered because
the last page is visible but the data are removed.

backport of 12.0's 9eef25ae0a

opw-1928453
closes #30277
2019-01-16 16:18:59 +00:00
Christophe Simonis 83cc046e9a [MERGE] forward port branch 11.0 up to 4c93e4be0d 2019-01-16 14:26:14 +01:00
Christophe Simonis ff2efcd1a9 [FIX] base: force label of ir.actions.server field crud_model_name
Avoid warning due to duplicated field labels.
2019-01-16 14:06:37 +01:00
RomainLibert 2f526dcd65 [FIX] hr_payroll: do not display conflicting leave button when no type
Basically you can have two types of error when using benefits, the
conflicting leave error and the no benefit type set error.
You can have either one of them or both of them at the same time.

The problem is that when there is an error, we currently have no way of
knowing which error it is.

To resolve this we only display one error at a time starting with the
no benefit type error and then if there is a conflicting leave we
display the next error

closes odoo/odoo#30259
2019-01-16 12:47:47 +00:00
RomainLibert dad7d80a93 [FIX] mail: fix typo in _onActivityUpdated
closes odoo/odoo#30260
2019-01-16 12:40:56 +00:00
Nicolas Martinelli 4c93e4be0d [FIX] event_sale: ticket
- Create a SO with an ticket for an event, confirm
- On the attendees wizard, click on 'Apply'

The event ticket is remove from the registration.

This is because the event ticket wasn't saved when creating the
registration line.

Complement of commits 7492c97bf4 and 0717bb6c0d

opw-1920464

closes odoo/odoo#30262
2019-01-16 10:47:40 +00:00