add new chanels
This commit is contained in:
parent
e6ced45fa4
commit
803cc1e07b
2
sale.py
2
sale.py
|
@ -14,7 +14,7 @@ class Sale(metaclass=PoolMeta):
|
|||
id_reference = fields.Char('Id Reference Api')
|
||||
is_paymented = fields.Function(fields.Boolean('Is Paymented'), 'get_is_paymented')
|
||||
products_string = fields.Char('Products String')
|
||||
channel = fields.Many2One('sale.web_channel', 'channel', readonly=True)
|
||||
channel = fields.Many2One('sale.web_channel', 'channel')
|
||||
uploaded_invoice = fields.Boolean('uploaded Invoice', readonly=True)
|
||||
document_invoice = fields.Char('Document Invoice')
|
||||
tracking_number = fields.Char('Tracking Number')
|
||||
|
|
6
sale.xml
6
sale.xml
|
@ -32,5 +32,11 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="name">invoice_form</field>
|
||||
</record>-->
|
||||
|
||||
<record model="ir.ui.view" id="sale_pos_view_form">
|
||||
<field name="model">sale.sale</field>
|
||||
<field name="inherit" ref="sale_pos.sale_pos_view_form"/>
|
||||
<field name="name">sale_pos_form</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</tryton>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- This file is part of sale_weight module for Tryton.
|
||||
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/form/notebook/page[@id='sale']/label[@name='origin']"
|
||||
position="before">
|
||||
<label name="channel"/>
|
||||
<field name="channel" widget="selection"/>
|
||||
</xpath>
|
||||
</data>
|
|
@ -15,7 +15,10 @@ STATES = {
|
|||
}
|
||||
|
||||
CHANNELS = [
|
||||
('mercadolibre', 'Mercado Libre')
|
||||
('mercadolibre', 'Mercado Libre'),
|
||||
('rappi', 'Rappi'),
|
||||
('melhous', 'Melhous'),
|
||||
('ifood', 'IFood')
|
||||
]
|
||||
|
||||
TYPE_INVOICE = [
|
||||
|
@ -35,9 +38,10 @@ class SaleWebChannel(Workflow, ModelSQL, ModelView):
|
|||
'Web Channel'
|
||||
__name__ = 'sale.web_channel'
|
||||
_rec_name = 'channel_name'
|
||||
channel_name = fields.Selection(CHANNELS, 'Channel', select=True, states=STATES)
|
||||
secret_key = fields.Char('Secret Key', states=STATES, required=True)
|
||||
app_id = fields.Char('Application ID', states=STATES, required=True)
|
||||
channel_name = fields.Selection(CHANNELS, 'Channel', select=True,
|
||||
required=True, states=STATES)
|
||||
secret_key = fields.Char('Secret Key', states=STATES)
|
||||
app_id = fields.Char('Application ID', states=STATES)
|
||||
redirect_uri = fields.Char('Redirect URI', states=STATES)
|
||||
authorization_code = fields.Char('Authorization Code', states=STATES)
|
||||
access_token = fields.Char('Access Token', states=STATES)
|
||||
|
@ -52,11 +56,13 @@ class SaleWebChannel(Workflow, ModelSQL, ModelView):
|
|||
('active', 'Active'),
|
||||
('finished', 'Finished'),
|
||||
], 'State', select=True, readonly=True)
|
||||
freight_product = fields.Many2One('product.product', 'Freight Product', states=STATES)
|
||||
bonus_product = fields.Many2One('product.product', 'Bonus Product', states=STATES)
|
||||
freight_product = fields.Many2One('product.product', 'Freight Product',
|
||||
states=STATES)
|
||||
bonus_product = fields.Many2One('product.product', 'Bonus Product',
|
||||
states=STATES)
|
||||
report = fields.Many2One('ir.action.report', 'Report', states=STATES)
|
||||
invoice_type = fields.Selection(TYPE_INVOICE, 'Type Invoice',
|
||||
states=STATES, required=True)
|
||||
states=STATES)
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
|
|
Loading…
Reference in New Issue