2 Commits
6.4 ... main

Author SHA1 Message Date
243a5ca765 chore: actualizacion nombre archivo 2023-07-25 16:35:42 -05:00
f2048d66a2 Add 'CONT' 2023-07-25 16:35:13 -05:00
11 changed files with 49 additions and 104 deletions

37
CONTRIBUIR.md Normal file
View File

@@ -0,0 +1,37 @@
# CONTRIBUIR
### requerimientos tecnicos
* python >= 3.9
* docker >= 20
* docker-compose >= 2
* pre-commit >= 2
* git >= 2.30
### consideraciones
* evito trabajo innecesario
* evito generalizar, primero hago pruebas y luego elimino duplicidad
* evito redundancia, si lo puedo automatizar lo automatizo
* evito usar `git add .`
* a todo momento hago expresivo lo escrito, renombro, muevo o elimino
* en todo momento debo poder ejecutar las pruebas
* en todo momento debo poder el programa
* en todo momento especulo, me ilustro y aprendo
### convencion commit
ante cada commit el mensaje se clasifica en:
* **feat(\<COMPONENTE\>)** una nueva funcionalidad accesible al usuario o sistema
* **fix(\<COMPONENTE\>)** correcion de una funcionalidad ya entregada
* **chore(\<COMPONENTE\>)** otros cambios que no impactan directamente al usuario, ejemplo renombramiento de archivo,clases,metodos,variables,carpetas,scripts, documentacion, recursos digitales, etc..
`COMPONENTE` nombre del directorio
ejemplos:
`git commit -m 'feat(<COMPONENTE>): venta de equipos opticos`
`git commit -m 'fix(<COMPONENTE>): se adiciona boton faltante`
`git commit -m 'chore(<COMPONENTE>): cambio de color en columna Producto`

View File

@@ -1,7 +0,0 @@
Analytic Operations Module
=========================
The *Analytic Operations Module* adds the concept of analytic account general
in invoice, purchase, sale. This allows added the account analytic to the lines of
operation more fast.

View File

@@ -2,7 +2,7 @@
# this repository contains the full copyright notices and license terms. # this repository contains the full copyright notices and license terms.
from trytond.pool import Pool from trytond.pool import Pool
from . import invoice, purchase, sale from . import purchase, sale
__all__ = ['register'] __all__ = ['register']
@@ -13,10 +13,8 @@ def register():
purchase.PurchaseLine, purchase.PurchaseLine,
sale.Sale, sale.Sale,
sale.SaleLine, sale.SaleLine,
invoice.Invoice, module='analytic_operation', type_='model')
invoice.InvoiceLine,
module='analytic_operations', type_='model')
Pool.register( Pool.register(
module='analytic_operations', type_='wizard') module='analytic_operation', type_='wizard')
Pool.register( Pool.register(
module='analytic_operations', type_='report') module='analytic_operation', type_='report')

View File

@@ -1,10 +1,6 @@
###################### #########################
Analytic Operations Module Analytic Operation Module
###################### #########################
The *Analytic Operations Module* adds the concept of analytic account general
in invoice, purchase, sale. This allows added the account analytic to the lines of
operation more fast.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2

View File

@@ -1,39 +0,0 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import Pool, PoolMeta
from trytond.model import ModelView, ModelSQL, fields
from trytond.pyson import Eval
from trytond.exceptions import UserError
class Invoice(metaclass=PoolMeta):
'Account Invoice'
__name__ = 'account.invoice'
_states = {
'readonly': Eval('state') != 'draft',
}
account_analytic = fields.Many2One('analytic_account.account', 'Analytic Account',
domain=[('type', '=', 'normal')],
states=_states)
class InvoiceLine(metaclass=PoolMeta):
'Invoice Line'
__name__ = 'account.invoice.line'
@fields.depends('product', 'unit', '_parent_invoice.type', 'analytic_accounts',
'_parent_invoice.party', 'party', 'invoice', 'invoice_type',
'_parent_invoice.account_analytic', '_parent_invoice.invoice_date',
'_parent_invoice.accounting_date','company', methods=['_get_tax_rule_pattern'])
def on_change_product(self):
super(InvoiceLine, self).on_change_product()
self.analytic_accounts = tuple()
try:
self.analytic_accounts += ({'root': self.invoice.account_analytic.root,
'account': self.invoice.account_analytic},)
except:
pass

View File

@@ -1,11 +0,0 @@
<?xml version="1.0"?>
<!--This file file is part of 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="invoice_view_form">
<field name="model">account.invoice</field>
<field name="inherit" ref="account_invoice.invoice_view_form"/>
<field name="name">invoice_form</field>
</record>
</data>
</tryton>

View File

@@ -1,15 +0,0 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:account.invoice,account_analytic:"
msgid "Analytic Account"
msgstr "Cuenta Analítica"
msgctxt "field:purchase.purchase,account_analytic:"
msgid "Analytic Account"
msgstr "Cuenta Analítica"
msgctxt "field:sale.sale,account_analytic:"
msgid "Analytic Account"
msgstr "Cuenta Analítica"

View File

@@ -10,13 +10,11 @@ class Purchase(metaclass=PoolMeta):
'Purchase Analytic Operation' 'Purchase Analytic Operation'
__name__ = 'purchase.purchase' __name__ = 'purchase.purchase'
_states = { account_analytic = fields.Many2One('analytic_account.account',
'readonly': Eval('state') != 'draft', 'Analytic Account', required=True,
} domain=[
('type', '=', 'normal'),
account_analytic = fields.Many2One('analytic_account.account', 'Analytic Account', required=True, ])
domain=[('type', '=', 'normal')],
states=_states)
class PurchaseLine(metaclass=PoolMeta): class PurchaseLine(metaclass=PoolMeta):
'Purchase Line Analytic Operation' 'Purchase Line Analytic Operation'
__name__ = 'purchase.line' __name__ = 'purchase.line'

View File

@@ -15,7 +15,6 @@ class Sale(metaclass=PoolMeta):
domain=[ domain=[
('type', '=', 'normal'), ('type', '=', 'normal'),
]) ])
class SaleLine(metaclass=PoolMeta): class SaleLine(metaclass=PoolMeta):
'Sale Line Analytic Operation' 'Sale Line Analytic Operation'
__name__ = 'sale.line' __name__ = 'sale.line'

View File

@@ -8,4 +8,3 @@ depends:
xml: xml:
purchase.xml purchase.xml
sale.xml sale.xml
invoice.xml

View File

@@ -1,10 +0,0 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath
expr="/form/field[@name='reference']" position="after">
<label name="account_analytic"/>
<field name="account_analytic" xexpand="1"/>
</xpath>
</data>