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.
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.
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.
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.
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
- 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
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
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
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
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.
- 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
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
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
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
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
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
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
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!
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.
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#10640fixes#10327
opw-665994
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.
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
* 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
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.
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
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
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