* Correctly bind "input" (instead of "change") or "mousedown" event
according to the anchor type. Also, only valids left clicks.
* Correctly unbind these events.
If the method return false, when a user write require="1" on a x2many field, the content is valid that there have none or a value.
The method was overwrited for a visual change (display the field x2m in readonly mode when they are not value) but is_false is priority use to ensure datas.
[IMP] improved planner content
[IMP] Misc usability improvement:
cost instead of sale price on product form
improved views and terminologies
journal entry is RO
1/ Modify the no content help message for hr_expense with a dynamic part
which describe how to create a new expense by mail
2/ Mail gateway mechanism. New customizable email alias expense@domain
that creates a new expense by sending an email to it. Check several things
- Check that the email_from is the same than one of the employees or than
on of the related users to employees. If not, send back an email to say that
the expense will not be created.
- If the email address is valid, check if something is between brackets '[]'
If it is the case, check if it is linked to a product internal reference
and set it accordingly. If nothing is found, use a default product
'Fixed Cost'
- If one/several float(s) are found in the mail subject, take the last
occurence and set it as the expense total amount.
3/ If a product template is created, to not add taxes on it. We don't expect it
to have additional taxes
4/ Under Expenses -> Configuration -> Expense Product, use a simplified product
view with only the needed fields.
5/ When generating the account move lines, use the account defined on the expense
line, not the sheet
6/ When creating a payment, make a reconciliation on the payable account move lines
That way, if the total amount on the expense is paid, the expense will be set to
paid automatically when registering a payment
7/ Add a one-page planner to explain how to use the email alias
8/ The field account_id on the expense sheet was informative. After some tests, it
seems that it's more confusing than helping. So we removed it
9/ Add a domain on the field 'bank_journal_id' to select journals of
type 'cash' or 'bank'
10/ If the number of expense lines is equal to 1, the expense summary on the expense
sheet should be the same name the line. So the process can be done in one click
Rev e37ba61 forward-ported 8.0 revision f02b230 from PR #12379.
This patch introduces extra tests and views for o2m onchange behavior,
including new fields in the test models.
In 9.0 a new convert_to_onchange() mechanism had been
introduced at 9f81c6d
The combination of both requires some adaptation to the
expected results of the new tests and adaptation of existing tests.
The test models in `test_new_api` have an implicit depencies between
models which cannot be express on ORM:
messages depends on participants of their discussion.
So, when editing a discussion, the field `participants` should be
processed before field `messages`. This is not always done because
field processing order depends of the iteration order of a `dict` (which
is undefined in python).
The testing tour `widget_x2many` worked by chance until now.
Adapt the tour to save the participants before the messages.
Since the new QWeb engine, `groups` directives on template
rendered in a route with auth=none is simply ignored, since
all is done as SUPERUSER_ID, it was impossible to instanciate
the webclient to check if the session is valid and to display
meeting info or redirect to event form view.
It seems that we don't want to fix this because routes auth=none
are rare, and special. So it is not considered as a bug.
The fix for calendar is, however, to do redirection or template
rendering server side.
show logo, merchant name, description, currency and amount on the stripe
checkout page.
Add the field stripe_image_url to display the logo that was configured according
to https://stripe.com/docs/checkout
Do not use company logo as there is no guarantee on the image ratio.
Closes#12378
If a user is disabled but in a implied_ids group, it was ignored and
so not added.
Eg: public_user is by default disabled,
So:
<record model="res.groups" id="base.group_public">
<field name="implied_ids" eval="[(4, ref('foo'))]"/>
</record>
will not add the public_user in group foo.
It is coherent with the method execute of resConfig which already use the
active_test=False.
Courtesy of @odony for review
Context in new API is not more a parameter.
Before this fix, context was interpreted has attribute parameter
and so the fields_get return empty dict.
This commit fix tracback when we try to export data in list view from
any model. The wizard try to know the fields from current model and a
traceback is raised (key error for field['string'])
Commit 358e285 introduces fiscal positions on the PoS. The new taxes
applied should be used in the form view of the pos order lines and in
the detailed sales report.
opw-680796
As explained in 15f27b26, the transaction information should be computed when
hitting the "pay now" button, not at page rendering (e.g. in case of users going
back to previous page).
Stripe do not work as typical providers as it does not redirect to the provider
page but opens a popup.
The route /shop/payment/transaction/<id> needs to be called manually.
Setting NOT NULL constraints on required fields may fail if there are
any row with unset value for this column.
The ORM handle this case by catching the exception raised and warning
user.
However, not commiting the current transaction before, will rollback
changes made before like setting default values or renaming a column.
Some one2many fields have a domain specified
in their definition
e.g.
`mail.thread`.`message_follower_ids`
`hr.applicant`.`attachment_ids`
`project.task`.`attachment_ids`
which is required for the one2many field to make
sense. For the mail thread, it does not make sense
to include the followers of other models with the same
`res_id`.
This domain must be took into account when doing a
'like' search on the one2many field
e.g. Followers contains demo
Otherwise it will include threads from other model
opw-680825
When a product is a kit and a discount is applied thanks to a pricelist,
the discount is counted twice if the invoice is created from the stock
picking.
This is because the pricelist will modify the price unit, but moreover
the discount will be applied a second time by the method
`_compute_price` of the account move line.
opw-676838
l is not defined, it is line.
Bug introduced with commit odoo/odoo@5f5f8d8.
But it was never detected before because there was
no value for b2b/b2C before commit odoo/odoo@e6184aeb37
so total/subtotal in report was never print.
Before this fix, you was in an 'unknow' mode before to have selected the mode
in the sale res config after the install of sale.
Side effect:
Empty value in ecommerce
Missing column subtotal in 'sale.order' and related report
Now, with fix, mode B2B is set by default (was the only mode in old version)
Using same behavior that the method execute of class resConfigSetting.
Usability: set the default option as the first choice in the res config.
Our usage of domain on fields One2many seems to trigger an obscure behaviour on
onchange.
With the following (simplified) config:
Message(models.Model):
_name = 'test_new_api.message'
important = fields.Boolean('Important')
Discussion(models.Model):
_name = 'test_new_api.discussion'
name = fields.Char('Name')
important_emails = fields.One2Many('test_new_api.emailmessage', 'discussion',
domain=[('important', '=', True)])
Email(models.Model):
_name = 'test_new_api.emailmessage'
_inherits = {'test_new_api.message': 'message'}
discussion = fields.Many2one('test_new_api.discussion', 'Discussion')
message = fields.Many2one('test_new_api.message', 'Message')
Steps:
- We change 'name' on discussion, triggers an `onchange()` call
- we ends up filling cache on virtual record (on secondary fields, we calling
record.mapped('important_emails.important'))
- we get a cache miss ('important' field not provided, only 'important_emails' ids,
i.e with no change on existing records)
- we fill the cache, this mark 'important' field as modified
- because of commit 5676d81 and because 'important' is that case is a related (i.e
computed) field we triggers cache recomputation
- as there is no way to recompute 'important_emails' for virtual record (no real
ID) we ends up with empty 'important_emails' generating removal of existing records.
=> Finally changing any value for 'test_new_api.discussion' that trigger an onchange
will always reset 'important_emails' to empty
Fixed by Raphael Collet <rco@odoo.com>, and test by Xavier Alt <xal@odoo.com>.
When user reset master password from web database manager, the
config file is saved.
If server was started in dev_mode the param dev_mode was saved
in openerp_serverrc silently. (in 9 or always in trunk)
Remind: --dev_mode should be never used on a production server.
Do not redefine the view arch but do a proper inherit.
It was a problem as the redefinition removed some fields (headers,..).
It was also a problem if crm_profiling was uninstalled as the redefinition was
not removed.
Closes#12454
Allow to display price on the website tax included or not.
Price for product is computed with a new function display_price
which one compute an estimated price based on taxex and fiscal
position of the current partner for the current product.
Once the product is in the cart, it is the behaviour of previous commit
odoo/odoo@5f5f8d8 which is used to diplay price with or without taxes.
New API use a frozendict for context, so when a function in the call
chain is overrided by new API (eg: render function of ir.qweb) the code
now changed by this commit would cause an error.
Instead this code duplicate the context frozendict as a dict removing
the need to set back the intial language in the context.
opw-681167
note: no need for >=saas-11
Allow to set in configuration mode b2b or b2c.
Change the column of order line in sale view and in reports depending of sale.
Fix price_reduce field (wrong if tax was included in price)
and merge with code discounted_price from website_sale.
Change header from reports "Price Tax Excluded' by 'Price' in report.
That is wrong, sometime the amount can haxe tax included in the price.