Hi
I've created and displayed a simple module that creates a selection drop down menu in sales.order .... Big smiley face :)
However ... :(
Question 1 How do I display this value in stock.picking - None editable?
Question 2 How do I display this value in account.invoice - and editable?
from odoo import fields, models class SaleHoldNoteModel(models.Model): _inherit = 'sale.order' #Create new field containg note for shipping shipping_note = fields.Selection([ ('oktoship', 'Ship'), ('awaitingpayment', 'Hold')], default='oktoship')
<?xml version="1.0" encoding="utf-8" ?> <odoo> <record id="add_field_shipping_sales" model="ir.ui.view"> <field name="name">shipping_hold</field> <field name="model">sale.order</field> <field name="inherit_id" ref="sale.view_order_form"/> <field name="arch" type="xml"> <xpath expr="//field[@name='payment_term_id']" position="after"> <field name="shipping_note"/> </xpath> </field> </record> </odoo>
I tried creating a copy of the above but keep getting field not known
Do I have to transfer the field and value between models?
Odoo10rUS