mirror of
https://bitbucket.org/presik/trytonpsk-syncronize_companies.git
synced 2023-12-14 04:52:52 +01:00
Remove model not used
This commit is contained in:
parent
6e1e23ce15
commit
a365314975
|
@ -16,7 +16,6 @@ def register():
|
||||||
sale.SaleGoalAnnualRankingStart,
|
sale.SaleGoalAnnualRankingStart,
|
||||||
sale.SaleDetailedStart,
|
sale.SaleDetailedStart,
|
||||||
sale.ShopDailySummaryStart,
|
sale.ShopDailySummaryStart,
|
||||||
sale.InvoicesStart,
|
|
||||||
account.PrintBalanceSheetCOLGAAPStart,
|
account.PrintBalanceSheetCOLGAAPStart,
|
||||||
account.PrintIncomeStatementCOLGAAPStart,
|
account.PrintIncomeStatementCOLGAAPStart,
|
||||||
module='syncronize_companies', type_='model')
|
module='syncronize_companies', type_='model')
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
import time
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
import requests
|
import requests
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
from datetime import datetime, date
|
from trytond.model import fields
|
||||||
from trytond.model import ModelView, fields
|
|
||||||
from trytond.pool import PoolMeta, Pool
|
from trytond.pool import PoolMeta, Pool
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from trytond.pyson import Bool, Eval, Or, Not
|
|
||||||
from trytond.wizard import (
|
|
||||||
Wizard, StateView, StateAction, StateReport, StateTransition, Button)
|
|
||||||
from trytond.report import Report
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'PrintBalanceSheetCOLGAAPStart', 'PrintBalanceSheetCOLGAAP',
|
'PrintBalanceSheetCOLGAAPStart', 'PrintBalanceSheetCOLGAAP',
|
||||||
|
|
111
account.xml
111
account.xml
|
@ -2,67 +2,64 @@
|
||||||
|
|
||||||
<tryton>
|
<tryton>
|
||||||
<data>
|
<data>
|
||||||
|
<record model="ir.ui.view" id="print_balance_sheet_colgaap_start_view_form">
|
||||||
|
<field name="model">account_col.print_balance_sheet_colgaap.start</field>
|
||||||
|
<field name="inherit" ref="account_col.print_balance_sheet_colgaap_start_view_form"/>
|
||||||
|
<field name="name">print_balance_sheet_colgaap_start_form</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="print_balance_sheet_colgaap_start_view_form">
|
<record model="ir.ui.view" id="print_income_statement_colgaap_start_view_form">
|
||||||
<field name="model">account_col.print_balance_sheet_colgaap.start</field>
|
<field name="model">account_col.print_income_statement_colgaap.start</field>
|
||||||
<field name="inherit" ref="account_col.print_balance_sheet_colgaap_start_view_form"/>
|
<field name="inherit" ref="account_col.print_income_statement_colgaap_start_view_form"/>
|
||||||
<field name="name">print_balance_sheet_colgaap_start_form</field>
|
<field name="name">print_income_statement_colgaap_start_form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.ui.view" id="print_income_statement_colgaap_start_view_form">
|
<record model="ir.rule.group" id="rule_group_voucher">
|
||||||
<field name="model">account_col.print_income_statement_colgaap.start</field>
|
<field name="model" search="[('model', '=', 'account.voucher')]"/>
|
||||||
<field name="inherit" ref="account_col.print_income_statement_colgaap_start_view_form"/>
|
<field name="default_p" eval="False"/>
|
||||||
<field name="name">print_income_statement_colgaap_start_form</field>
|
<field name="global_p" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
|
<record model="ir.rule" id="rule_voucher1">
|
||||||
|
<field name="domain"
|
||||||
|
eval="[('create_uid', '=', Eval('user', {}).get('id', []))]"
|
||||||
|
pyson="1"/>
|
||||||
|
<field name="rule_group" ref="rule_group_voucher"/>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record model="ir.rule.group" id="rule_group_voucher">
|
<record model="ir.rule.group" id="rule_group_purchase">
|
||||||
<field name="model" search="[('model', '=', 'account.voucher')]"/>
|
<field name="model" search="[('model', '=', 'purchase.purchase')]"/>
|
||||||
<field name="default_p" eval="False"/>
|
<field name="default_p" eval="False"/>
|
||||||
<field name="global_p" eval="False"/>
|
<field name="global_p" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.rule" id="rule_voucher1">
|
<record model="ir.rule" id="rule_purchase1">
|
||||||
<field name="domain"
|
<field name="domain"
|
||||||
eval="[('create_uid', '=', Eval('user', {}).get('id', []))]"
|
eval="[('create_uid', '=', Eval('user', {}).get('id', []))]"
|
||||||
pyson="1"/>
|
pyson="1"/>
|
||||||
<field name="rule_group" ref="rule_group_voucher"/>
|
<field name="rule_group" ref="rule_group_purchase"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.rule.group" id="rule_group_purchase">
|
<record model="ir.rule.group" id="rule_group_party">
|
||||||
<field name="model" search="[('model', '=', 'purchase.purchase')]"/>
|
<field name="model" search="[('model', '=', 'party.party')]"/>
|
||||||
<field name="default_p" eval="False"/>
|
<field name="default_p" eval="False"/>
|
||||||
<field name="global_p" eval="False"/>
|
<field name="global_p" eval="False"/>
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.rule" id="rule_purchase1">
|
<record model="ir.rule" id="rule_party1">
|
||||||
<field name="domain"
|
<field name="domain"
|
||||||
eval="[('create_uid', '=', Eval('user', {}).get('id', []))]"
|
eval="[('create_uid', '=', Eval('user', {}).get('id', []))]"
|
||||||
pyson="1"/>
|
pyson="1"/>
|
||||||
<field name="rule_group" ref="rule_group_purchase"/>
|
<field name="rule_group" ref="rule_group_party"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record model="ir.rule.group" id="rule_group_party">
|
|
||||||
<field name="model" search="[('model', '=', 'party.party')]"/>
|
|
||||||
<field name="default_p" eval="False"/>
|
|
||||||
<field name="global_p" eval="False"/>
|
|
||||||
</record>
|
|
||||||
<record model="ir.rule" id="rule_party1">
|
|
||||||
<field name="domain"
|
|
||||||
eval="[('create_uid', '=', Eval('user', {}).get('id', []))]"
|
|
||||||
pyson="1"/>
|
|
||||||
<field name="rule_group" ref="rule_group_party"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<record model="ir.rule.group" id="rule_group_shop">
|
|
||||||
<field name="model" search="[('model', '=', 'sale.shop')]"/>
|
|
||||||
<field name="default_p" eval="False"/>
|
|
||||||
<field name="global_p" eval="False"/>
|
|
||||||
</record>
|
|
||||||
<record model="ir.rule" id="rule_shop1">
|
|
||||||
<field name="domain"
|
|
||||||
eval="[('create_uid', '=', Eval('user', {}).get('id', []))]"
|
|
||||||
pyson="1"/>
|
|
||||||
<field name="rule_group" ref="rule_group_shop"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
|
<record model="ir.rule.group" id="rule_group_shop">
|
||||||
|
<field name="model" search="[('model', '=', 'sale.shop')]"/>
|
||||||
|
<field name="default_p" eval="False"/>
|
||||||
|
<field name="global_p" eval="False"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.rule" id="rule_shop1">
|
||||||
|
<field name="domain"
|
||||||
|
eval="[('create_uid', '=', Eval('user', {}).get('id', []))]"
|
||||||
|
pyson="1"/>
|
||||||
|
<field name="rule_group" ref="rule_group_shop"/>
|
||||||
|
</record>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
</tryton>
|
</tryton>
|
||||||
|
|
13
company.py
13
company.py
|
@ -2,9 +2,9 @@
|
||||||
# The COPYRIGHT file at the top level of this repository contains
|
# The COPYRIGHT file at the top level of this repository contains
|
||||||
# the full copyright notices and license terms.
|
# the full copyright notices and license terms.
|
||||||
|
|
||||||
from trytond.model import Workflow, ModelView, ModelSQL, fields
|
from trytond.model import ModelView, ModelSQL, fields
|
||||||
from trytond.pool import PoolMeta
|
from trytond.pool import PoolMeta
|
||||||
from trytond.pyson import Bool, Eval, Or, Not
|
from trytond.pyson import Bool, Eval
|
||||||
|
|
||||||
__all__ = ['Company']
|
__all__ = ['Company']
|
||||||
|
|
||||||
|
@ -12,8 +12,10 @@ __all__ = ['Company']
|
||||||
class Company(metaclass=PoolMeta):
|
class Company(metaclass=PoolMeta):
|
||||||
__name__ = 'company.company'
|
__name__ = 'company.company'
|
||||||
sincronize_companies = fields.Boolean('Syncronize Companies')
|
sincronize_companies = fields.Boolean('Syncronize Companies')
|
||||||
connection_companies = fields.One2Many('company.connection_companies', 'company', 'Connection Companies',
|
connection_companies = fields.One2Many('company.connection_companies',
|
||||||
states={'invisible': ~Bool(Eval('sincronize_companies')),})
|
'company', 'Connection Companies', states={
|
||||||
|
'invisible': ~Bool(Eval('sincronize_companies')),
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
class ConnectionCompanies(ModelSQL, ModelView):
|
class ConnectionCompanies(ModelSQL, ModelView):
|
||||||
|
@ -22,4 +24,5 @@ class ConnectionCompanies(ModelSQL, ModelView):
|
||||||
database = fields.Char('Database', required=True)
|
database = fields.Char('Database', required=True)
|
||||||
api_connection = fields.Char('Api Connection', required=True)
|
api_connection = fields.Char('Api Connection', required=True)
|
||||||
company = fields.Many2One('company.company', 'Company', select=True,
|
company = fields.Many2One('company.company', 'Company', select=True,
|
||||||
ondelete='CASCADE')
|
ondelete='CASCADE')
|
||||||
|
|
||||||
|
|
38
sale.py
38
sale.py
|
@ -1,25 +1,17 @@
|
||||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
import time
|
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
import requests
|
|
||||||
import simplejson as json
|
|
||||||
from datetime import datetime, date
|
|
||||||
from trytond.model import ModelView, fields
|
|
||||||
from trytond.pool import PoolMeta, Pool
|
from trytond.pool import PoolMeta, Pool
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from trytond.pyson import Bool, Eval, Or, Not
|
from trytond.pyson import Eval
|
||||||
from trytond.wizard import (
|
|
||||||
Wizard, StateView, StateAction, StateReport, StateTransition, Button)
|
|
||||||
from trytond.report import Report
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
'SaleIncomeDailyStart', 'SaleDailyReport',
|
'SaleIncomeDailyStart', 'SaleDailyReport', 'SaleMonthByShopStart',
|
||||||
'SaleMonthByShopStart', 'SaleGoalMonthRankingReport', 'SaleDetailedStart',
|
'SaleDetailedStart', 'SaleDetailedReport', 'ShopDailySummaryStart',
|
||||||
'SaleDetailedReport', 'ShopDailySummaryStart', 'PortfolioDetailedReport',
|
'PortfolioDetailedReport', 'ExpiredPortfolioReport', 'MovesInvoicesReport',
|
||||||
'ExpiredPortfolioReport', 'InvoicesStart', 'PortfolioBySalesmanReport',
|
'PortfolioBySalesmanReport'
|
||||||
'MovesInvoicesReport'
|
|
||||||
]
|
]
|
||||||
|
# 'InvoicesStart'
|
||||||
|
|
||||||
_ZERO = Decimal('0.00')
|
_ZERO = Decimal('0.00')
|
||||||
|
|
||||||
|
@ -270,15 +262,15 @@ class ExpiredPortfolioReport(metaclass=PoolMeta):
|
||||||
return domain
|
return domain
|
||||||
|
|
||||||
|
|
||||||
class InvoicesStart(metaclass=PoolMeta):
|
# class InvoicesStart(metaclass=PoolMeta):
|
||||||
__name__ = 'invoice_report.print_invoices.start'
|
# __name__ = 'invoice_report.print_invoices.start'
|
||||||
|
#
|
||||||
@classmethod
|
# @classmethod
|
||||||
def __setup__(cls):
|
# def __setup__(cls):
|
||||||
super(InvoicesStart, cls).__setup__()
|
# super(InvoicesStart, cls).__setup__()
|
||||||
cls.shop.domain.append(
|
# cls.shop.domain.append(
|
||||||
('id', 'in', Eval('context', {}).get('shops', -1))
|
# ('id', 'in', Eval('context', {}).get('shops', -1))
|
||||||
)
|
# )
|
||||||
|
|
||||||
|
|
||||||
class PortfolioBySalesmanReport(metaclass=PoolMeta):
|
class PortfolioBySalesmanReport(metaclass=PoolMeta):
|
||||||
|
|
|
@ -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='purchase_process_after']" position="after">
|
|
||||||
<newline/>
|
|
||||||
<separator string="" id="separator" colspan="4" />
|
|
||||||
<field name="authorized_users_limit_amount" colspan="4"/>
|
|
||||||
</xpath>
|
|
||||||
</data>
|
|
|
@ -1,14 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!-- 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='info']/field[@name='company']"
|
|
||||||
position="after">
|
|
||||||
<label name="sign"/>
|
|
||||||
<field name="sign"/>
|
|
||||||
<label name="signed_date"/>
|
|
||||||
<field name="signed_date"/>
|
|
||||||
<label name="sign_image"/>
|
|
||||||
<field name="sign_image" widget="image"/>
|
|
||||||
</xpath>
|
|
||||||
</data>
|
|
|
@ -1,9 +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. -->
|
|
||||||
<form>
|
|
||||||
<label name="user"/>
|
|
||||||
<field name="user"/>
|
|
||||||
<label name="limit_amount_confirm"/>
|
|
||||||
<field name="limit_amount_confirm"/>
|
|
||||||
</form>
|
|
|
@ -1,8 +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. -->
|
|
||||||
|
|
||||||
<tree editable="bottom">
|
|
||||||
<field name="user"/>
|
|
||||||
<field name="limit_amount_confirm"/>
|
|
||||||
</tree>
|
|
Loading…
Reference in a new issue