Daily updates from Odoo
Navigate
Branch
Monday, December 4, 2017
6 changes
New functionality added to Odoo
This update adds a server-side form tool that lets Odoo tests simulate real user form behavior, including defaults, field changes, required fields, and read-only rules. Several accounting, sales, stock, manufacturing, and product margin tests were updated to use it, improving confidence that business flows work as expected.
Original PR description
Adds a Form view object intended to be used in test, which *should* (barring bugs) properly: * perform default_get and subsequent onchanges when creating a new record * properly call onchanges when…
Adds a Form view object intended to be used in test, which *should* (barring bugs) properly:
* perform default_get and subsequent onchanges when creating a new record
* properly call onchanges when altering fields
* reject changes to readonly fields
* not save unchanged & readonly fields
* require view-required fields
* correctly handle modifiers
* support o2m fields including `*_view_ref` hooks
* should correctly handle the "edition reference" (editable list v form)
M2M support limited to adding & removing (pre-existing) records, I think the developer can just use a separate Form if they want to create/edit those via specific views?
Example:
```python
# create a pseudo form in creation mode (empty recordset) using the specified view for e.g. readonly/required modifiers, valid fields, …
c = Form(self.env['account.voucher'], view='account_voucher.view_sale_receipt_form')
# basic fields are set directly
c.partner_id = partner_id
c.journal_id = sales_journal_id
# for o2m, "create" or "edit" a line and set its fields
with c.line_ids.new() as line:
line.name = "Voucher for Axelor"
line.account_id = account_receivable_id
line.price_unit = 1000.0
# the line is saved (in the parent, not the server) at the end of the context
# save() returns the record created (or edited, though it's not really
# necessary for an edition you can just reuse the original record)
account_voucher_customer = c.save()
```
TODO: nice docstring?
Unresoved questions:
* should `invisible` modifiers have an effect? Possibly a variant of readonly (can't edit but properly sent to the server)?
* should buttons be supported directly via the form view? Unclear how they'd be invoked since the button name can be e.g. an action id.
Replaces #20894Imported bank statements now take users straight to the reconciliation interface after import. This saves accounting teams time by reducing extra navigation and helps them start matching bank transactions immediately.
Original PR description
Task: https://www.odoo.com/web#id=32667&view_type=form&model=project.task&action=333&active_id=131&menu_id=4720 Pad: https://pad.odoo.com/p/r.bb8322647b4beaf3f7dc0494b4031959
Enhancements to existing features
Currency exchange rates can no longer be set to zero or negative values, reducing the risk of incorrect financial calculations. New currency rates now start with a safer default value of 1, making setup less error-prone for users.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: Task: https://www.odoo.com/web#id=37899&view_type=form&model=project.task&action=333&active_id=131&menu_id=4720 Pad: https://pad.odoo.com/p/openerp-project.task-EWUDP6DE3T -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Vendor bills created from purchase orders now automatically use the same company and currency as the original purchase order. This helps avoid manual corrections and ensures the right accounting journal is selected by default.
Original PR description
…en creating vendor bills from it, passed, - 'default_company_id' and 'default_currency_id' in action method's context to set same company and currency as of the related purchase order - 'company_id' in action method's context so that it can set that company's journal by default by mean of execution of _default_journal() at https://github.com/odoo/odoo/blob/master/addons/account/models/account_invoice.py#L79 task: https://www.odoo.com/web?#id=35219&view_type=form&model=project.task&action=333&active_id=131&menu_id=4720 pad: https://pad.odoo.com/p/r.720d6fd8f772d455cd3ab162b605db6f Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The website signing app now makes signed documents easier to find, manage, and discuss by adding better filters, partner document shortcuts, chatter below the PDF viewer, and clearer menus. It also introduces role-based access for document users and managers, helping teams organize signing workflows more effectively.
Original PR description
Task : https://www.odoo.com/web#id=27473&view_type=form&model=project.task&action=327&menu_id=4720 Pad : https://pad.odoo.com/p/r.97b6442a45d064bf7753c24f877f083c
Features or functions removed from Odoo
The accounting configuration no longer lets users choose the number of digits used for account codes. This simplifies setup and keeps account code formatting consistent with the standard chart template behavior.
Original PR description
TASK: https://www.odoo.com/web#id=32750&view_type=form&model=project.task&action=327&menu_id=4720 PAD: https://pad.odoo.com/p/r.92cf020da159897ce632306d445d3868