Commit Graph
103218 Commits
Author SHA1 Message Date
Jeremy Kersten f39e5358bc [FIX] website_forum: decrease indexed pages which will return 404
Add filter in domain converter to remove some posts in sitemap.

Avoid to add in sitemap some pages that could not be read
by public user due to a karma restriction.
2016-02-01 12:16:43 +01:00
Jeremy Kersten 22c80fff6e [FIX] utm: use tracking_fields from utm.mixin and not from the current model
This function cannot be overridden in a model which inherit utm.mixin
Limitation by the heritage on AbstractModel

record_crm_lead.tracking_fields() will call tracking_fields() from module
utm.mixin (if not overridden on crm.lead) instead of the overridden method
from utm.mixin.

To force the call of overridden method, we use
self.pool['utm.mixin'].tracking_fields() which respects overridden
methods of utm.mixin, but will ignore overridden method on crm.lead

Eg:

 class utm_mixin(osv.AbstractModel):
    _name = 'utm.mixin'

    def tracking_fields(self):
        return "A"

 class utm_mixin_overridden(osv.AbstractModel):
    _inherit = 'utm.mixin'

    def tracking_fields(self):
        return "B"

 class crm_lead(osv.osv):
    _name = "crm.lead"
    _inherit = ['utm.mixin']

    def func_1(self):
        print self.tracking_fields()
        # print "A"

    def func_2(self):
        print self.pool['utm.mixin'].tracking_fields()
        # print "B"

It's the dispatch method of ir_http which save GET parameters in cookies,
ignoring the overridden tracking_fields method in inherited model.
2016-02-01 12:16:43 +01:00
Aaron Bohy 0de35ffa7f [FIX] mail,web: don't block chat windows when blocking ui
One will still be able to chat in chat windows during long RPCs...
2016-02-01 11:31:36 +01:00
Aaron Bohy db4cb5b74e [FIX] mail: set tabindex of composer's elements
Also focus the subject's input by default in extended composer.
2016-02-01 11:31:09 +01:00
Aaron Bohy 4bab99bdaf [FIX] mail: don't notify 'join/left' messages
Messages of type 'notification' and whose model is 'mail.channel' are
considered as 'system notifications'. This is the case of 'join/left' messages.
They aren't taken into account when computing unread messages anymore.

Also use the same heuristic to decide whether or not to display the message's
star, so from now on pure notifications (not system notifications), like status
change on a document, can be starred.
2016-02-01 11:31:09 +01:00
Aaron Bohy ef77e6821a [FIX] mail: systray: move Inbox counter to its own item
Clicking on that item redirects to the Inbox in Discuss.

The messaging menu's counter is now the number of conversations (public or
private channels, dm and livechat) in which there is at least one unread
message. Moreover, it is emphasized when one of those conversations is a chat.

Also make mass-mailing channels available through the messaging menu (for
consistency as its counter takes those channels into account) and allow to open
them in chat windows without input.
2016-02-01 11:31:09 +01:00
Christophe Simonis 68c928aca7 [FIX] purchase: correct tax for purchase order lines created from procurment
Error introduced during forward-port 2ce9311cfe
2016-02-01 11:19:58 +01:00
Denis Ledoux 29147f4a4a [FIX] web_planner: links to modules form
This partially reverts rev. 84ade6a861

In this specific part of the code, the goal wasn't
to check if the module was part of the installed modules,
but if the module was part the "known" modules, in order
to jump on its form.

Besides, as this link is most of the time used
to install the according module, it's quite dummy
to search it within the installed modules.

Before this revision, trying to click on the "Install" links
in the planners linked to an empty module form, instead
of the according module form.

opw-667407
2016-02-01 11:13:55 +01:00
qdp-odoo 9eb612c816 [FIX] account: aged partner balance fixed.
- Unkwnown partner line wasn't added to the totals
- Column 'not due' amount fixed (was not working properly in case of partial reconciliation)
- now also includes the partner that have _everything_ reconciled for the requested date but with a reconciliation made after the requested date
- Recompute the amount_residual instead of using the field as it is problematic when requested date is between 2 partial payments of a single invoice
2016-02-01 10:33:26 +01:00
Odoo Translation Bot 72983cac8e [I18N] Update translation terms from Transifex 2016-02-01 00:29:03 +01:00
Odoo Translation Bot 3b4bbb8c28 [I18N] Update translation terms from Transifex 2016-01-31 00:33:36 +01:00
Thomas Groutars 052da3e89a [FIX] lang: Add grouping when loading translation
Closes #10669
2016-01-29 18:47:20 +01:00
Christophe Simonis 2077c7dff4 [FIX] website: force (icon) update of "Website" menu item
Note: only relevant for enterprise web client as icon is not display in
ommunity version.
2016-01-29 18:23:28 +01:00
Denis Ledoux 56e3d2d512 [FIX] website_sale: get_pricelist_available from the backend.
The method `get_pricelist_available` can be called from the backend.

(e.g. when using `website.pricelist_id`,
whic is a function field ultimately calling
`get_pricelist_available`).

In such a case, `request.website` is not available,
as the request is not done from the website.

Therefore, we have to fallback in a work-around
to detect the website for which we would like
to get the available pricelists.

Passing the `website_id` in the context
is kinda crappy, but as the website for which
we would like the available pricelists is
not passed in the method params (trough a parameter `ids` for instance),
this is one way to put it through.

opw-668230
2016-01-29 17:51:51 +01:00
Denis Ledoux 6c8bbc3d46 Revert "[FIX] fields: make related_sudo work for draft records (used by onchange)"
This reverts commits
 - 995b257a6c
 - 2ebdb5f36e
 - 748a719fd9.

The commit 748a719fd9 leads to an issue
bigger than what it aims to solve:
 - as demo user
 - create a new invoice
 - add a new line
 - select a product
-> traceback

opw-668141
2016-01-29 16:55:23 +01:00
xmo-odoo 19a1c18f57 [FIX] make m2m checkbox labels clickable 2016-01-29 16:24:14 +01:00
Denis Ledoux a157fcd8cd [FIX] sale: Sales configuration, ir.values for all users are restricted.
The global record rule `Defaults: alter personal values only`
(`base.ir_values_default_rule`)
ensures that all users can only create personal `ir.values`.

`ir.values` for all users must therefore be created as sudo.

opw-667140
2016-01-29 16:18:12 +01:00
Aaron Bohy 5e79439dee [FIX] mail: chatter: keep mentions
Message's body is kept when switching from 'New message' to 'Log a note' since
rev. f35b48aa. However, mentionned partners or channels were lost. This rev.
makes sure to preserve both message's body and mentions when switching between
composers.
2016-01-29 13:21:02 +01:00
Aaron Bohy c04103f4da [FIX] mail: various UI fixes/improvements
- don't print chat windows
- add missing 'width: 100%' on composer and Discuss sidebar inputs (required
  for community edition)
- center the Discuss sidebar inputs
- Discuss sidebar items layout: one line, text ellipsis if name is too long
- hide chatter in 'create' mode (messages wrote in the chatter need a res_model
  and a res_id, the latter is not yet existing if we are in 'create' mode)
- revert 2d2dacc: print chatter by default (classname 'hidden-print' can be
  used for specific models for which we don't want the chatter to be printed)
- thread: ensure the displayed message's date is in the past
- re-render threads every minutes to update dates
- don't squash messages in mass mailing channels
2016-01-29 13:21:02 +01:00
Nicolas Martinelli 628a6146d2 [FIX] account: keep only taxes of the company
If the SUPERUSER creates an invoice, we should make sure to keep only
the taxes related to the company of the invoice. This is for example the
case in the PoS, where the invoice is created with the SUPERUSER.

Fixes #10648
2016-01-29 13:16:53 +01:00
Nicolas Martinelli a9a4a2e6b9 [FIX] point_of_sale: invoice Salesman
Commit a29e291 uses the SUPERUSER in order to create the invoice.
However, we should still link the Salesman of the invoice to the PoS
user.

Fixes #10647
2016-01-29 13:16:53 +01:00
Denis Ledoux a842199687 [MERGE] forward port of branch saas-6 up to 2616def 2016-01-29 12:29:17 +01:00
Goffin Simon bafa1a677e [FIX] stock: creation of stock inventory adjustement
The system cannot create two inventory adjustements in state 'in Progess'
with the same product, with the same location, same package, same lot and
same owner.
Example:if two adjustments(ADJ1, ADJ2) are created with the same product(P)
and with the same location(L), let's say:
qty_available for P is 10
in ADJ1: Theoritical Quantity=10 and Real Quantity=20 => a quant with +10 is created
in ADJ2: Theoritical Quantity=10 and Real Quantity=30 => a quant with +20 is created

When ADJ1 is validated then qty_available for P is now 20(that 's ok)
When ADJ2 is validated then qty_available for P is now 40(that's wrong because
the Real Quantity is expected which is 30)

This is why this fix is required.

opw:660658
2016-01-29 12:25:30 +01:00
Nicolas Lempereur f5fedbcb18 [FIX] mail, portal_sale: conserve action in /mail/view
Methods get_formview_action can be called by sudo() so for knowing the
real user they should prefer context['uid'] to uid.

Without the action `/web` can't figure out that e.g the view we want is
the one for portal user and not the default one.

With this fix, portal user (not in base.group_user) get to the intended
view with the intended menu when clicking on a invoice/sale order portal
mail link. As for other user there is no change.

closes #10681
opw-666260
2016-01-29 12:08:24 +01:00
Goffin Simon 1414d60b7b [FIX] stock: creation of stock inventory adjustement
The system cannot create two inventory adjustements in state 'in Progess'
with the same product, with the same location, same package, same lot and
same owner.
Example:if two adjustments(ADJ1, ADJ2) are created with the same product(P)
and with the same location(L), let's say:
qty_available for P is 10
in ADJ1: Theoritical Quantity=10 and Real Quantity=20 => a quant with +10 is created
in ADJ2: Theoritical Quantity=10 and Real Quantity=30 => a quant with +20 is created

When ADJ1 is validated then qty_available for P is now 20(that 's ok)
When ADJ2 is validated then qty_available for P is now 40(that's wrong because
the Real Quantity is expected which is 30)

This is why this fix is required.

opw:660658
2016-01-29 12:03:14 +01:00
Denis Ledoux 2616defe35 [MERGE] forward port of branch 8.0 up to edeb5a8 2016-01-29 11:41:24 +01:00
Richard Mathot cf79fc899d [FIX] purchase: state "approved" has been replaced by "purchase" in Odoo 9.0
(thanks to @tfr-odoo for spotting the bug)
2016-01-29 10:23:00 +01:00
xmo-odoo edeb5a8c0f [FIX] module finder path parameter should be optional
According to PEP302, the signature of `Finder.find_module` should be 
`find_module(fullname, path=None)`.

Ever since it was introduced in 64ec5f36df the addons import hook 
defines the second parameter as mandatory, which is an issue for
systems relying on the specified behaviour (and not needing to
provide a path) like the stdlib's `pkgutil.find_loader`.

fixes #10670
2016-01-29 10:20:08 +01:00
Raphael Collet ca7983a40f [FIX] account_budget: in test, use float_compare to compare amounts 2016-01-29 09:37:27 +01:00
Raphael Collet 812332855a [IMP] fields: speedup Float.convert_to_cache by not rounding the value 2016-01-29 09:37:27 +01:00
Raphael Collet f0646cb51b [IMP] fields: use a "lazy" cursor to compute attribute digits
Borrowing a cursor each time you access `field.digits` may be costly, because
of the connection reset.  Moreover, in most cases, the cursor is not used at
all, since the decimal precision are kept in cache.

For the installation of module `product` with its demo data, the number of
cursor allocations was reduced from ~1500 to about 50!
2016-01-29 09:37:27 +01:00
Joren Van Onder 6f4e7867f0 [IMP] hw_escpos: add the MAC address to the ticket printed at startup
Usually when setting up a POSBox you want it to have a static IP. The
best way to do that is by configuring whatever DHCP server is
used (usually just on the router) to always assign the same IP to a
certain MAC address (naming depends on what is being used, sometimes
it's called static DHCP but it's also known as DHCP reservations and a
bunch of other names).

The process of setting this up is complicated for a non-technical user,
and this attempts to make it a little bit easier to do by immediately
giving them the correct MAC address they should use. To avoid confusion
this only prints the MAC addresses for interfaces which have an IP
address.
2016-01-29 09:25:15 +01:00
Denis Ledoux 433732aa8c [FIX] hr_timesheet_sheet: fields displayed twice in configuration
Regression introduced by rev.
024546919e

This layout is consistent with the rest of this
configuration view.

Fixes #10510
opw-668129
2016-01-28 17:55:43 +01:00
Nicolas Lempereur 29be9ae80b [FIX] web: conserve /id for saved export list
With 003d85b instead of getting the name of the relation
field_relation we get field_relation/id which will get us an xmlid
instead.

But the data about related fields are not gotten all at once when
opening the export modal. They are gotten by clicking on the arrow of
the related record.

It is in this data that the /id will be appended for the field, but when
getting a saved export list, this data may not be available.

This commit immediately add the `/id` when a field is put in "Fields to
export" column, so this inconsistency is no more.

closes #10640
fixes #10327
opw-665994
2016-01-28 17:27:18 +01:00
qsm-odoo 1982ef993e [FIX] web: listview editable, non editable elements
When editing a line, leave the buttons visible.
Also remove the 3px gap between fields so that readonly field texts
does not move when entering the edition mode.
2016-01-28 17:18:24 +01:00
Nicolas Martinelli 1b04b1d71a [IMP] purchase: default account journal
When the user clicks on the stat button "Invoices", then creates a new
invoice, the default currency of the new invoice will be based on the
default account journal. If the default account journal is not in the
currency of the PO, this will lead to an invoice which is not in the
same currency than the PO. This is not a bug in itself, but most of the
time, the user will want to create an invoice in the same currency than
the PO.

If no invoice is linked to the PO, the fix sets a default account
journal in the currency of the PO, as long as one can be found. If an
invoice is already linked to the PO, it uses the same account journal.

opw-667743
2016-01-28 17:14:42 +01:00
qsm-odoo 31e8cd0949 [FIX/IMP] project,web: kanban cover image dialog
* Fix the grid display of images (use the column property)
* Use Dialog class
* Allow removing a cover image
* Add image selection before choosing it (or double click to choose)

+ add less mixins in web for columns property
2016-01-28 17:11:39 +01:00
Denis Ledoux fd038801c0 [FIX] im_livechat: Strict MIME type.
Backport of revisions
 - 100d604cb0
 - ddd3e08fbc
opw-667814
2016-01-28 16:48:46 +01:00
Raphael Collet 995b257a6c [FIX] fields: make related_sudo work for draft records (2)
Traversing new records in a different cache requires that all new records on
the path are copied across caches.  Make the copy across caches recursive when
the first record on the path is a new record.
2016-01-28 16:33:09 +01:00
Nicolas Martinelli 79c20415b2 [FIX] purchase: source document of invoice
When a vendor bill is created, no source document is added
automatically. Moreover, since the field is hidden when empty, there is
no way for the user to fill it.

The fix fills in automatically the source document field from the list
of PO.

opw-667055
2016-01-28 15:59:04 +01:00
Nicolas Lempereur 657b2213b1 [FIX] website_theme_install: search view cause oddness
Sometimes, the custom search view of website_theme_install would get
called instead of the true default view.

opw-667778
opw-667779
2016-01-28 15:34:01 +01:00
Denis Ledoux afd2dbfb7f [FIX] mrp_repair: quotation report, shipping and invoice address
Copy the structure of the sale order report regarding the
partner, invoice and shipping address.

Besides, on a repair order, this is possible
to set a shipping address without setting
an invoice address (if no invoicing is set).

In such a case, the `Invoice address:` must be hidden.

opw-666506
2016-01-28 15:08:06 +01:00
Christophe Matthieu d958cf541a [FIX] web_editor: enter keydown create new td only if the caret is on the last char of the last line of the td 2016-01-28 14:57:21 +01:00
Christophe Matthieu d1abc952cc [FIX] tools: XMLTranslator doen't use self.parser arguments to create new instance of XMLTranslator
issue: When a translation contain valid hmtl but invalid xml the content is escape (translate.py: line 218).
2016-01-28 14:57:21 +01:00
Christophe Matthieu 2b4fb7e195 [FIX] web_editor: remove style attribute if empty 2016-01-28 14:57:21 +01:00
Jeremy Kersten 28e2dcf043 [FIX] website_payment, website_mail: fix route declaration typo
Missing s of method for allowed methods.
2016-01-28 14:00:26 +01:00
Goffin Simon ca343f7b04 [FIX] purchase: currency_id in purchase report
The field currency_id must be in the view to group by currency_id.

opw:667869
2016-01-28 13:40:57 +01:00
Nicolas Martinelli 9052bdc9cb [FIX] account: calculation of amount residual
When an account move line is reconciled with debits and credits, both are
subtracted from the original amount. This is not logical, since if the
line is a credit (debit) we should subtract (add) the debits and add
(subtract) the credits.

opw-667137
2016-01-28 13:33:43 +01:00
Martin Trigaux c5923774a0 [FIX] web_settings_dashboard: missing terms in .pot
Get more features with the Enterprise Edition!
opw 666709
2016-01-28 17:44:28 +05:30
Luc De Meyer b493faf595 [FIX] account: pass context as kwargs
context -> context=context in writes within validate.
This is required for super().write with new api.

Closes #10645
2016-01-28 17:30:41 +05:30