Skip to content

Commit

Permalink
[MIG] account_invoice_control: Migration to 17.0
Browse files Browse the repository at this point in the history
closes #182

Signed-off-by: rov-adhoc <[email protected]>
  • Loading branch information
cav-adhoc committed Jul 12, 2024
1 parent 4af9e30 commit d78d87e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 117 deletions.
4 changes: 2 additions & 2 deletions account_invoice_control/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
'name': 'Account Invoice Control',
'author': 'ADHOC SA',
'version': "16.0.0.1.0",
'version': "17.0.0.1.0",
'license': 'AGPL-3',
'category': 'Accounting & Finance',
'depends': [
Expand All @@ -31,5 +31,5 @@
'views/account_move_views.xml',
],
'website': 'www.adhoc.com.ar',
'installable': False,
'installable': True,
}
130 changes: 15 additions & 115 deletions account_invoice_control/views/account_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,148 +4,48 @@
<record id="invoice_restrict_edit_form" model="ir.ui.view">
<field name="name">account.move.form.inherit</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="sale_ux.account_invoice_form" />
<field name="groups_id" eval="[(6, 0, [ref('group_restrict_edit_invoice')])]" />
<field name="priority">20</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="priority">30</field>
<field name="arch" type="xml">
<<<<<<< HEAD
<field name="invoice_line_ids" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<form position='inside'>
<field name="has_sales" invisible="1"/>
</form>
<field name="invoice_line_ids" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<form position='inside'>
<field name="has_sales" invisible="1"/>
<field name="restrict_edit_invoice" invisible="1"/>
</form>
<field name="invoice_line_ids" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
</field>
<<<<<<< HEAD
<field name="line_ids" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="line_ids" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<field name="line_ids" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<field name="journal_id" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="journal_id" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="journal_id" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<field name="team_id" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="team_id" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="team_id" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<xpath expr="//page[@name='other_info']//field[contains(@name, 'origin')]" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<xpath expr="//page[@name='other_info']//field[contains(@name, 'origin')]" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<xpath expr="//page[@name='other_info']//field[contains(@name, 'origin')]" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</xpath>
<<<<<<< HEAD
<field name="invoice_date" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="invoice_date" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="invoice_date" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<field name="partner_id" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="partner_id" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="partner_id" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<field name="invoice_user_id" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="invoice_user_id" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="invoice_user_id" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<field name="fiscal_position_id" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="fiscal_position_id" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="fiscal_position_id" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<field name="invoice_date_due" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="invoice_date_due" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="invoice_date_due" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<field name="invoice_payment_term_id" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="invoice_payment_term_id" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="invoice_payment_term_id" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
<<<<<<< HEAD
<field name="partner_bank_id" position="attributes">
<attribute name="attrs">{'readonly':[('move_type','=','out_invoice'),('has_sales','!=',True)]}</attribute>
||||||| parent of bc527af5 (temp)
<field name="partner_bank_id" groups="account_invoice_control.group_restrict_edit_invoice" position="attributes">
<attribute name="attrs">{'readonly':['|',('state', '!=', 'draft'),('has_sales','=',True)]}</attribute>
=======
<field name="partner_bank_id" position="attributes">
<attribute name="attrs">{'readonly': ['|', ('state', '!=', 'draft'), '&amp;', ('has_sales','=',True), ('restrict_edit_invoice','=',True)]}</attribute>
>>>>>>> bc527af5 (temp)
<attribute name="readonly">state != 'draft' or (has_sales and restrict_edit_invoice)</attribute>
</field>
</field>
</record>
Expand Down

0 comments on commit d78d87e

Please sign in to comment.