[TMP]Add field reference in tree and Typo in model

This commit is contained in:
michel 2018-02-02 18:29:10 +01:00
parent 23caebbce9
commit 8b9eb0150f
2 changed files with 16 additions and 1 deletions

View File

@ -22,7 +22,7 @@ from odoo import models, fields, api, _
class AccountPayment(models.Model): class AccountPayment(models.Model):
""" Add number bank check""" """ Add number bank check"""
_inherit = 'account.payment' _inherit = 'account.payment'
reference = fields.Char(string='Payment Reference') reference = fields.Char(string='Payment reference')
class GolemPaymentScheduleDay(models.Model): class GolemPaymentScheduleDay(models.Model):
""" Schedule day simple model """ """ Schedule day simple model """

View File

@ -42,6 +42,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</field> </field>
</record> </record>
<!-- Trees -->
<record id="golem_payment_tree_inherit_account_payment" model="ir.ui.view">
<field name="name">Account payment list</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_tree" />
<field name="arch" type="xml">
<field name="state" position="before">
<field name="reference" />
</field>
</field>
</record>
<!-- Search --> <!-- Search -->
<record id="account_payment_search" model="ir.ui.view"> <record id="account_payment_search" model="ir.ui.view">
<field name="name">Account Payment Filters</field> <field name="name">Account Payment Filters</field>
@ -49,6 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="arch" type="xml"> <field name="arch" type="xml">
<search> <search>
<field name="payment_date" /> <field name="payment_date" />
<field name="reference" />
<group string="Group By"> <group string="Group By">
<filter name="group_date" string="By date" <filter name="group_date" string="By date"
context="{'group_by': 'payment_date'}"/> context="{'group_by': 'payment_date'}"/>