When website_quote is installed, the Terms and Conditions of the quote
template should replace the Terms and Conditions of the company.
However, if the T&C of the quote are not filled, they will be kept
empty. This fix uses the T&C of the company as a backup.
This fix also set the TéC in the lang of the partner.
opw-652390
The amount to show in payments_widget must be the opposite of amount_currency like
in the else condition:
amount_to_show = payment.company_id.currency_id.compute(-amount, self.currency_id)
opw:652478
Commit 4f9c9ad adds the context to the RPC call of 'message_post', but the
context was only defined for messages sent, and not for internal notes logged.
This causes a crash when logging a note on a calendar event as its method
'message_post' makes the assumption that it always exists, and tries to access
one of its keys.
opw-652470
Closes#9164
Fixes/hides a deadlock when running test_sale_order with either a single
database or a db_filter making a single database visible: the test
causes a report to be printed, which invokes wkhtmltopdf, which tries to
fetch assets using the registry which is being loaded. The asset request
thus waits on a lock which is held by the test which waits on the asset,
deadlocking the whole thing.
Using HttpCase means we're using the test_cr or something and bypassing
the deadlock, instead the asset requests just 404 as they do when using
the nodb routing.
.. instead of at the start. The reason is: if any rollback have to occur
during the call to `save_attachments`, we want to avoid rollbacking an
unlink on the ir.attachment table (because we cannot rollback the
removal of a file in the filestore).
This issue is especially annoying when we generate a bundle whose
ir.attachment record has the same hash than the invalidated one (for
instance when one of the source files in the bundle has been touched
but not modified) and of of these rollback occurs: the bundle has been
deleted on the filestore and cannot be served.
as save_attachment is only callded by js and css methods after an
empty return result of get_attachment, directly calling again
get_attachment is superfluous
If one of the javascript files of the bundle has been modified since the
bundle generation, we are sure that get_attachments will return an empty
list because it searches with the version of the bundle which takes into
account the last modification of any of the bundle's content.
Also, this check is not present in the css bundle generation.
It is not always possible to possess both the account number and the BIC at the
time of creation. Eg. bank statement import where few file formats provide BIC
When setting the quantity in a PO line, the field "date_planned" is changed
by onchange_product_id and this field is equal to:
-the date of today + seller.delay if there is at least one provider for the product
-the date of today if there is no provider set for the product
-the date manually set if there is no provider and already a scheduled_date set
To keep the similar behaviour to 8.0 for product without provider.
opw:652394
During new-api rewrite, some property fields wrongly lost their
company_dependent flag.
Despite it need a migration script to create the missing properties,
not updating the module does not lead to crashes.
In the refactoring of v9.0 accounting module (c04065a) the currency
field on account.bank.statement has been renamed currency_id.
sentry-32303830312e3239303433353734
A lead can be marked as won, it must be converted to an opportunity first.
Previous flow was problematic as we could still convert to opportunity a won
lead (which does not work and does not make much sense).
A lead can only be lost or converted.
Fixes#9076
When creating an invoice in a foreign currency,
and adding a line with a product,
the `onchange` failed,
due to the fact the field `date_invoice`
is not on the invoice line, but on the invoice.
In 6b55539dc7 the "container_row_stock"
group in stock.view_partner_stock_form was hidden using
groups="base.group_no_one". The issue is that the POS used a group
inside of this group that it modified to display the associated
barcode of the partner and the loyalty points of the partner. So
although the code still worked, the actual information was invisible.
To fix it we inherit the view directly from where it is created, namely
base.view_partner_form which is a bit nicer than inheriting from an
already inherited view.
The ISO weekday should be computed with isocalendar dateformat
The exact directive is '%V' according to GNU/Linux system strftime
http://man7.org/linux/man-pages/man3/strftime.3.html
However '%V' is not documented in official cross-platform syntax supported on
all python built, according to standardized by ANSI C formats
https://docs.python.org/2.7/library/datetime.html#strftime-and-strptime-behavior
as '%V' may not be supported on other platforms such as MS Windows, use the
cross-platform 'isoformat()' method.
Note that according to ISO 8601, the start and end of date may belong to the
previous or next year.
e.g.
>>> datetime.datetime.strptime('2005-01-01', '%Y-%m-%d').isocalendar()
(2004, 53, 6)
>>> datetime.datetime.strptime('2005-01-01', '%Y-%m-%d').strftime('%W')
'00'
Fixes#8927
In e9c6fd0 'accuracy' was added to the field list read for res.currency,
but since the accounting refactoring in 9.0 (c04065a), this field was no
more present (replaced by decimal_places).
Since this field in the current point_of_sale javascript code was never
used, this commit removes it from the field list.
sentry-32303830312e3239303433353734
The project and sale_timesheet modules both define a project_time_mode_id field on res.company but they are not dependent on each other. This causes problem because the first module that creates the field "wins" the xmlid and will delete the field on uninstall, regardless of the other module (which will then stop working until you do an update that will recreate the field).
To work around this in a stable version, we manually create xmlids for the field in each module; on uninstall the field will not be deleted if an xmlid still refers it (which will be the case if the other module is installed).
Inheriting fields from modules that are not dependent in a direct way (ancestor-child) is not supported, so normally you should use modularity to define the field in a parent module. Since 9.0 is a stable version, we need a small workaround.
When clicking on a partner in the thread of messages, it opens the DM with the
associated user if there is one (and if this user isn't the current user).
Otherwise, or when clicking on a record of any other model, the user is
redirected to that record's form view.
This change required a minor change in chat_manager: create_channel now
returns the created channel, as the client action needs it to switch to it.
Moreover, in the thread, when there is no partner associated with a message
(only an email address), we simply use html's mailto mechanism. This fixes a
bug as we formerly tried to open an unexisting record of res.partner.
The bus was allowed to restart polling, client side, to allow the user
to directly receive messages in new channels. This was only acceptable
as a temporary fix, the correct way to do this is to actually notify the
bus server side. This is even more urgent since the client was allowed
to keep multiple longpolls simultaneously, which degraded the experience
in some cases.
Channel types that disable the 'add a channel' feature like the livechat are
now only rendered in the sidebar of the client action if there exists at least
one channel of that type.
If a user does not have write permissions on a model, he should still be
able to remove himself from the many2many relation.
This caused a problem: some messages could not be modified by a user
(star/unstar or mark as read)
... from the same author, written within 1 minute (restricted to comments).
Also:
- Display stars and needactions on hover only
- Display the date of messages without avatar and info in the margin on hover
- Add 'selected' state of messages (mainly for touch screens to replace hover)
- Fix typo (msg_type -> message_type) on the computation of the avatar url
On firefox, the font-family of the counter was font-awesome instead of Roboto
because the counter was inside the <i> tag on which font-awesome rules applied.
This rev. simply moves the counter out of that <i> tag.