Add Galatea User in sale

This commit is contained in:
resteve 2015-11-19 19:01:05 +01:00
parent c4d5957c06
commit 47565c3cd9
8 changed files with 73 additions and 8 deletions

View File

@ -4,6 +4,7 @@
from trytond.pool import Pool
from .galatea import *
from .menu import *
from .sale import *
from .sale_cart import *
from .shop import *
from .product import *
@ -15,6 +16,7 @@ def register():
GalateaWebSite,
GalateaUser,
PaymentType,
Sale,
SaleCart,
SaleShop,
Template,

View File

@ -122,7 +122,7 @@ msgstr "Slug idiomes"
msgctxt "field:product.template,esale_thumb:"
msgid "Thumb"
msgstr "Miniatura"
msgstr ""
msgctxt "field:product.template,esale_thumb_filename:"
msgid "File Name"
@ -130,7 +130,7 @@ msgstr "Nom fitxer"
msgctxt "field:product.template,esale_thumb_path:"
msgid "Thumb Path"
msgstr "Ruta miniatura"
msgstr ""
msgctxt "field:product.template,esale_upsells_by_shop:"
msgid "Upsells by Shop"
@ -152,6 +152,10 @@ msgctxt "field:sale.cart,template_id:"
msgid "Template ID"
msgstr "Plantilla ID"
msgctxt "field:sale.sale,galatea_user:"
msgid "Galatea User"
msgstr "Galatea Usuari"
msgctxt "field:sale.shop,esale_discount_tax_include:"
msgid "Discount Tax Include"
msgstr "Descompte impostos inclòs"
@ -208,11 +212,11 @@ msgstr ""
msgctxt "help:product.template,esale_thumb:"
msgid "Thumbnail Product Image"
msgstr "Imatge miniatura producte"
msgstr ""
msgctxt "help:product.template,esale_thumb_filename:"
msgid "Thumbnail Product File Name"
msgstr "Nom fitxer miniatura producte"
msgstr ""
msgctxt "selection:galatea.website,esale_stock_qty:"
msgid "Forecast Quantity"

View File

@ -122,7 +122,7 @@ msgstr "Slug idiomas"
msgctxt "field:product.template,esale_thumb:"
msgid "Thumb"
msgstr "Miniatura"
msgstr ""
msgctxt "field:product.template,esale_thumb_filename:"
msgid "File Name"
@ -130,7 +130,7 @@ msgstr "Nombre fichero"
msgctxt "field:product.template,esale_thumb_path:"
msgid "Thumb Path"
msgstr "Ruta miniatura"
msgstr ""
msgctxt "field:product.template,esale_upsells_by_shop:"
msgid "Upsells by Shop"
@ -152,6 +152,10 @@ msgctxt "field:sale.cart,template_id:"
msgid "Template ID"
msgstr "Plantilla ID"
msgctxt "field:sale.sale,galatea_user:"
msgid "Galatea User"
msgstr "Galatea Usuario"
msgctxt "field:sale.shop,esale_discount_tax_include:"
msgid "Discount Tax Include"
msgstr "Descuento impuesto incluido"
@ -208,11 +212,11 @@ msgstr ""
msgctxt "help:product.template,esale_thumb:"
msgid "Thumbnail Product Image"
msgstr "Imagen miniatura producto"
msgstr ""
msgctxt "help:product.template,esale_thumb_filename:"
msgid "Thumbnail Product File Name"
msgstr "Nombre fichero miniatura producto"
msgstr ""
msgctxt "selection:galatea.website,esale_stock_qty:"
msgid "Forecast Quantity"

14
sale.py Normal file
View File

@ -0,0 +1,14 @@
# This file is part galatea_esale module for Tryton.
# The COPYRIGHT file at the top level of this repository contains
# the full copyright notices and license terms.
from trytond.pool import PoolMeta
from trytond.model import fields
__all__ = ['Sale']
__metaclass__ = PoolMeta
class Sale:
__name__ = 'sale.sale'
galatea_user = fields.Many2One('galatea.user', 'Galatea User',
readonly=True)

20
sale.xml Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0"?>
<!-- This file is part galatea_esale module for Tryton.
The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="sale_view_form">
<field name="model">sale.sale</field>
<field name="type">form</field>
<field name="inherit" ref="sale.sale_view_form"/>
<field name="name">sale_form</field>
</record>
</data>
<data depends="sale_pos">
<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>

View File

@ -6,8 +6,11 @@ depends:
esale
product_esale
sale_cart
extras_depend:
sale_pos
xml:
galatea.xml
menu.xml
payment_type.xml
product.xml
sale.xml

9
view/sale_form.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part galatea_esale 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=&quot;esale&quot;]/field[@name=&quot;esale_coupon&quot;]" position="after">
<label name="galatea_user"/>
<field name="galatea_user"/>
</xpath>
</data>

9
view/sale_pos_form.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!-- This file is part galatea_esale 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=&quot;esale&quot;]/field[@name=&quot;esale_coupon&quot;]" position="after">
<label name="galatea_user"/>
<field name="galatea_user"/>
</xpath>
</data>